|
INET Framework for OMNeT++/OMNEST
|
Class generated from inet/routing/pim/PIMPacket.msg:125 by nedtool.
More...
#include <PIMPacket_m.h>
Public Member Functions | |
| virtual | ~PIMHello_Base () |
| virtual PIMHello_Base * | dup () const override |
| virtual void | parsimPack (omnetpp::cCommBuffer *b) const override |
| virtual void | parsimUnpack (omnetpp::cCommBuffer *b) override |
| virtual void | setOptionsArraySize (unsigned int size)=0 |
| virtual unsigned int | getOptionsArraySize () const =0 |
| virtual HelloOptionPtr & | getOptions (unsigned int k)=0 |
| virtual const HelloOptionPtr & | getOptions (unsigned int k) const |
| virtual void | setOptions (unsigned int k, const HelloOptionPtr &options)=0 |
Public Member Functions inherited from inet::PIMPacket | |
| PIMPacket (const char *name=nullptr, short kind=0) | |
| PIMPacket (const PIMPacket &other) | |
| virtual | ~PIMPacket () |
| PIMPacket & | operator= (const PIMPacket &other) |
| virtual short | getVersion () const |
| virtual void | setVersion (short version) |
| virtual short | getType () const |
| virtual void | setType (short type) |
Protected Member Functions | |
| bool | operator== (const PIMHello_Base &) |
| PIMHello_Base (const char *name=nullptr, short kind=0) | |
| PIMHello_Base (const PIMHello_Base &other) | |
| PIMHello_Base & | operator= (const PIMHello_Base &other) |
Protected Member Functions inherited from inet::PIMPacket | |
| bool | operator== (const PIMPacket &) |
Private Member Functions | |
| void | copy (const PIMHello_Base &other) |
Additional Inherited Members | |
Protected Attributes inherited from inet::PIMPacket | |
| short | version |
| short | type |
Class generated from inet/routing/pim/PIMPacket.msg:125 by nedtool.
// Hello message // DM, SM packet PIMHello extends PIMPacket { @customize(true); type = Hello; abstract HelloOptionPtr options[]; }
PIMHello_Base is only useful if it gets subclassed, and PIMHello is derived from it. The minimum code to be written for PIMHello is the following:
class INET_API PIMHello : public PIMHello_Base { private: void copy(const PIMHello& other) { ... }
public:
PIMHello(const char *name=nullptr, short kind=0) : PIMHello_Base(name,kind) {}
PIMHello(const PIMHello& other) : PIMHello_Base(other) {copy(other);}
PIMHello& operator=(const PIMHello& other) {if (this==&other) return *this; PIMHello_Base::operator=(other); copy(other); return *this;}
virtual PIMHello *dup() const override {return new PIMHello(*this);}
// ADD CODE HERE to redefine and implement pure virtual functions from PIMHello_Base
};
The following should go into a .cc (.cpp) file:
Register_Class(PIMHello)
|
protected |
|
protected |
|
virtual |
|
private |
|
inlineoverridevirtual |
Reimplemented from inet::PIMPacket.
Reimplemented in inet::PIMHello.
|
pure virtual |
Implemented in inet::PIMHello.
|
inlinevirtual |
Reimplemented in inet::PIMHello.
Referenced by getOptions().
|
pure virtual |
Implemented in inet::PIMHello.
|
protected |
|
protected |
|
overridevirtual |
Reimplemented from inet::PIMPacket.
Referenced by inet::PIMHello::parsimPack().
|
overridevirtual |
Reimplemented from inet::PIMPacket.
Referenced by inet::PIMHello::parsimUnpack().
|
pure virtual |
Implemented in inet::PIMHello.
|
pure virtual |
Implemented in inet::PIMHello.