[Ns-developers] ns-3-nsc sysctl attribute support

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Mon Jul 7 12:21:48 PDT 2008


On Mon, 2008-07-07 at 20:52 +0200, Florian Westphal wrote:

> 
> >       // Now, we register a new TypeId for this stack which will look
> > like a subclass of the Ns3NscStack. The class Ns3NscStack is effectively
> > mutating into a subclass of itself from the point of view of the TypeId
> > system _here_
> >       tid = TypeId (name);
> >       tid.SetParent<Ns3NscStack> ();
> >       char buf[256]
> 
> I get a compile error here:
> debug/ns3/type-id.h: In member function `ns3::TypeId ns3::TypeId::SetParent() [with T = ns3::Ns3NscStack]':
> ../src/internet-stack/nsc-sysctl.cc:90:   instantiated from here
> debug/ns3/type-id.h:404: error: cannot call member function `ns3::TypeId ns3::Ns3NscStack::GetTypeId()' without object

ah. I see :) GetTypeId must be static. That might solve the other
problem you saw above.

Mathieu



More information about the Ns-developers mailing list