dimanche 29 mars 2015

How to inherit a SimpleRefCount subclass for a class in ns3 (Network Simulator 3)


In network simulator 3, I want to create a Ptr< RoutingTable > object. However, the compiler returns as such:



./ns3/ptr.h:457:7: error: 'class ns3::dsdv::RoutingTable' has no member named 'Unref'
m_ptr->Unref();


I've searched through ns3's doxygen, and I now understand that I should inherit SimpleRefCount which provides Ref and Unref methods for the class. To help me, I've reviewed the class OutputStreamWrapper which inherits from a SimpleRefCount< OutputStreamWrapper >. I have some understanding of generic types. However, I cannot for the life of me see where the actual inheritance takes place. I cannot find the link between OutputStreamWrapper and its SimpleRefCount parent.


Your help would be greatly appreciated.




Aucun commentaire:

Enregistrer un commentaire