Leaf initialization based on row index

Frank.Fock____t-online.de Frank.Fock____t-online.de
Sun Jun 1 23:21:36 CEST 2003


Hi Hugo,

The key (oid) of a leaf that is part of a table
is initialized after the leaf it is cloned from
from the generator row. So you can overwrite
the MibTableRow::set_index or better the add_row
method of your table. 

Best regards,
Frank

Hugo Krapf schrieb:
> Hi,
> Let's see if someone out there can help me.
> 
> I have leaves derived from MibLeaf.
> These leaves are added to MibTableRow.
> These leaves have a private variable whose value depends
> on the row index. Ok, I have "my_row->get_index()".
> But the private variable must be initialized at some
> point.
> MibLeaf::clone() would you say?  But when clone() is
> called,
> when MibTableRow is cloning the "generator row", the
> index isn't
> set yet (see MibTableRow's copy constructor... the call
> to
> set_index() is the very last thing...)
> 
> So my question is this: when do I have the opportunity
> to initialize private members of a MibLeaf object,
> depending
> on the row index ?
> Thanks for your time,
> Hugo.
> 
>



More information about the AGENTPP mailing list