[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] How many TclObject* create ?



Hi,

sorry for keep coming back to these issues, but i
really don't know how to get out of them!
hoping for some help...

" set tcp [Agent/TCP/Reno] " triggers the execution of
the procedures "init" and "new"

-------------------------------------------------------
SplitObject instproc init args {
      $self next
        if [catch "$self create-shadow $args"] {
        ........................................
}


* "create_shadow" invokes TclObject* create passing
"create-shadow" as an argument, what is the 
use of this ?
-------------------------------------------------------

Presumably, "new" is invoked after "init" (right ?)
 
proc new { className args } {
      set o [SplitObject getid]
        if [catch "$className create $o $args" msg] {
        .............................................
        return $o
}


* The Ns manual says that this function ("create",
which i couldn't find in the code)
triggers the execution of the TclObject* create method
(defined in RenoTcpClass)
HOW MANY TIMES IS THE TclObject* create PROCEDURE
INVOKED ?
It seems we have:

init ---> create_shadow ---> TclObject* create

and then

new --->create (??) ---> ---??????????---> 
TclObject* create

How can this be explained ?


Thanks in advance,
                      Andrea.

______________________________________________________________________
Do You Yahoo!?
Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.it