next up previous contents index
Next: 9.4.3 OTcl Methods Up: 9.4 OTcl Linkage Previous: 9.4.1 Creating and Manipulating

   
9.4.2 Default Values

Default values for member variables, those visible in OTcl only and those linked between OTcl and C++ with bind are initialized in the tcl/lib/ns-default.tcl file. For example, Agent is initialized as follows:

        Agent set fid_ 0
        Agent set prio_ 0
        Agent set addr_ 0
        Agent set dst_ 0
        Agent set flags_ 0

Generally these initializations are placed in the OTcl namespace before any objects of these types are created. Thus, when an Agent object is created, the calls to bind in the objects' constructors will causes the corresponding member variables to be set to these specified defaults.




2000-08-24