INET Framework for OMNeT++/OMNEST
|
Class generated from inet/common/TLVOption.msg:39
by nedtool.
More...
#include <TLVOption_m.h>
Public Member Functions | |
virtual | ~TLVOptions_Base () |
virtual TLVOptions_Base * | dup () const override |
virtual void | parsimPack (omnetpp::cCommBuffer *b) const override |
virtual void | parsimUnpack (omnetpp::cCommBuffer *b) override |
virtual void | setTlvOptionArraySize (unsigned int size)=0 |
virtual unsigned int | getTlvOptionArraySize () const =0 |
virtual TLVOptionBase & | getTlvOption (unsigned int k)=0 |
virtual const TLVOptionBase & | getTlvOption (unsigned int k) const |
virtual void | setTlvOption (unsigned int k, const TLVOptionBase &tlvOption)=0 |
Protected Member Functions | |
bool | operator== (const TLVOptions_Base &) |
TLVOptions_Base () | |
TLVOptions_Base (const TLVOptions_Base &other) | |
TLVOptions_Base & | operator= (const TLVOptions_Base &other) |
Private Member Functions | |
void | copy (const TLVOptions_Base &other) |
Class generated from inet/common/TLVOption.msg:39
by nedtool.
class TLVOptions { @customize(true); abstract TLVOptionBase tlvOption[]; }
TLVOptions_Base is only useful if it gets subclassed, and TLVOptions is derived from it. The minimum code to be written for TLVOptions is the following:
class INET_API TLVOptions : public TLVOptions_Base { private: void copy(const TLVOptions& other) { ... }
public: TLVOptions() : TLVOptions_Base() {} TLVOptions(const TLVOptions& other) : TLVOptions_Base(other) {copy(other);} TLVOptions& operator=(const TLVOptions& other) {if (this==&other) return *this; TLVOptions_Base::operator=(other); copy(other); return *this;} virtual TLVOptions *dup() const override {return new TLVOptions(*this);} // ADD CODE HERE to redefine and implement pure virtual functions from TLVOptions_Base };
The following should go into a .cc (.cpp) file:
Register_Class(TLVOptions)
|
protected |
|
protected |
|
virtual |
|
private |
|
inlineoverridevirtual |
Reimplemented in inet::TLVOptions.
|
pure virtual |
Implemented in inet::TLVOptions.
|
inlinevirtual |
Referenced by getTlvOption().
|
pure virtual |
Implemented in inet::TLVOptions.
|
protected |
Referenced by inet::TLVOptions::operator=().
|
protected |
|
overridevirtual |
Referenced by inet::TLVOptions::parsimPack().
|
overridevirtual |
Referenced by inet::TLVOptions::parsimUnpack().
|
pure virtual |
Implemented in inet::TLVOptions.
|
pure virtual |
Implemented in inet::TLVOptions.