Deleting table rows
Frank Fock
Frank.Fock____t-online.de
Fri Jul 13 00:02:58 CEST 2001
Hello Christian,
A clean way to delete the row from within row_deactivated is to
add the row to the delete_rows list of the table:
delete_rows.add(row);
Then you have to add the following code to your table:
void myEntry::cleanup_set_request(Request* req, int ind)
{
ListCursor<MibTableRow> cur;
for (cur.init(&delete_rows); cur.get(); cur.next()) {
Oidx index(cur.get()->get_index());
// check whether row has been already destroyed.
if (find_index(index)) {
remove_row(index);
notify_change(ind, REMOVE);
}
}
// delete_rows will be cleared here:
MibTable::cleanup_set_request(req, ind);
}
Best regards,
Frank
"Bettendorf, Cristian" wrote:
> Hello,
>
> my agent logic needs to remove a table row if the rowstate is changed from
> active to notInService. The detection code for the delete condition was put
> in the overloaded method "myEntry::row_deactivated(MibTableRow* row, const
> Oidx& index, MibTable* src)"
> but from here I can't delete the specific row, a call to remove_row(index)
> can't be made here.
>
> How can I handle this?
>
> Manny thanks in advance
> Cristian
More information about the AGENTPP
mailing list