Deleting table rows
Bettendorf, Cristian
Cristian.Bettendorf____softwareag.com
Fri Jul 13 08:16:40 CEST 2001
Hello Frank,
manny thanks
Best regards
Cristian
-----Original Message-----
From: Frank.Fock____t-online.de [mailto:Frank.Fock____t-online.de]
Sent: Freitag, 13. Juli 2001 00:03
To: Bettendorf, Cristian
Cc: Agent++ (E-mail)
Subject: Re: Deleting table rows
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