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

Re: [ns] Problem with Agent::command()



On Tue, 10 Jul 2001, Kristian Svensson wrote:


> Hi!
>
> I'm in the beginning of making a routing agent (MyProto), and have a problem
> with reaching C++ from TCL via MyProto::command(). It seems that when i
> calls "$self cmd mycmd" from Agent/rtProto/MyProto, the command function of
> MyProto isn't called, but Agent::command is. MyProto inherits from Agent,
> and I've set up the connections as follows, the usual way:
>
> static class MyProtoclass : public TclClass {
> public:
> 	MyProtoclass() : TclClass("Agent/rtProto/MyProto") {}
> 	TclObject* create(int, const char*const*) {
> 		return (new MyProto());
> 	}
> } class_MyProto;
>
> And MyProto::command() is defined of course.

I'm assuming you have defined your class as well with

class MyProto : public Agent { .. }

--Padma

>
> Can someone please give me a hint on what I might be doing wrong?
>
> Regards,
> Kristian Svensson
>

-- 
------------------------------------------------
Be true to your work, your word, and your friend.
--Thoreau

Padmaparna Haldar