[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] object copying in c++/otcl
hi there,
im currently writing a new queue class in ns, and am facing the following
problem:
my class contains an stl vector object within it. during initialization, i
add elements to this vector.
later, however, when i try to access elements in the vector, i find that
the vector is empty.
ive noticed that the otcl object name of my queue instantiation changes
from initialization time (e.g. when im adding stuff to the vector, the
vector-containing queue object name is _o81, but later when im trying to
look stuff up in the vector, the queue object name is _o91).
it appears that some sort of copy construction is
happening... perhaps. and in the process the vectors arent getting copied
correctly.
my queue also contains another ns otcl/c++ object (droptail queue) and
this object also appears to get copied, though correctly, in this case.
does anyone have any idea whats going on, or what im doing wrong?
any help would be greatly appreciated!
thanks!
nikhil
-----
If you feel that you have both feet planted on level ground, then the
university has failed you.
Robert Goheen, President, Princeton University