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

Re: C++ Constructor Arguments in Tcl



Jeff,

Take a look at the Trace object definitions in ~ns/tcl/lib/ns-trace.tcl
and ~ns/trace.cc


Kannan

> From: Jeff Donahoo <[email protected]>
> Date: Tue, 28 Apr 1998 18:37:34 EDT

> Hi!  How do I pass arguments to the constructor of a C++ Agent from Tcl?
> For example, I want a C++ agent, wonderProtocol, with constructor
> 
> wonderProtocol::wonderProtocol(string favoriteColor)
> 
> From Tcl I should be able to invoke this with something like
> 
> set w [new Agent/wonderProtocol "Blue"]
> 
> How do you do this?
> 
> Thanks,
> Jeff
> 
> Michael J. Donahoo
> Georgia Institute of Technology College of Computing
> 801 Atlantic Drive, Atlanta Georgia, 30332-0280
> Internet: [email protected]                 Office: GCATT, 2nd Floor
> Work: (404) 894-6735  Lab:  (404) 876-3209 x124
> Fax:  (404) 894-0272  Home: (770) 819-1870
> finger [email protected] for my public key
> 

--
[email protected]
http://www.isi.edu/~kannan