INET Framework for OMNeT++/OMNEST
inet::TLVOptions_Base Class Referenceabstract

Class generated from inet/common/TLVOption.msg:39 by nedtool. More...

#include <TLVOption_m.h>

Inheritance diagram for inet::TLVOptions_Base:
inet::TLVOptions

Public Member Functions

virtual ~TLVOptions_Base ()
 
virtual TLVOptions_Basedup () 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 TLVOptionBasegetTlvOption (unsigned int k)=0
 
virtual const TLVOptionBasegetTlvOption (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_Baseoperator= (const TLVOptions_Base &other)
 

Private Member Functions

void copy (const TLVOptions_Base &other)
 

Detailed Description

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)

Constructor & Destructor Documentation

inet::TLVOptions_Base::TLVOptions_Base ( )
protected
inet::TLVOptions_Base::TLVOptions_Base ( const TLVOptions_Base other)
protected
virtual inet::TLVOptions_Base::~TLVOptions_Base ( )
virtual

Member Function Documentation

void inet::TLVOptions_Base::copy ( const TLVOptions_Base other)
private
virtual TLVOptions_Base* inet::TLVOptions_Base::dup ( ) const
inlineoverridevirtual

Reimplemented in inet::TLVOptions.

172 {throw omnetpp::cRuntimeError("You forgot to manually add a dup() function to class TLVOptions");}
virtual TLVOptionBase& inet::TLVOptions_Base::getTlvOption ( unsigned int  k)
pure virtual

Implemented in inet::TLVOptions.

virtual const TLVOptionBase& inet::TLVOptions_Base::getTlvOption ( unsigned int  k) const
inlinevirtual

Referenced by getTlvOption().

180 {return const_cast<TLVOptions_Base*>(this)->getTlvOption(k);}
virtual TLVOptionBase & getTlvOption(unsigned int k)=0
const double k
Definition: QAM16Modulation.cc:24
virtual unsigned int inet::TLVOptions_Base::getTlvOptionArraySize ( ) const
pure virtual

Implemented in inet::TLVOptions.

TLVOptions_Base& inet::TLVOptions_Base::operator= ( const TLVOptions_Base other)
protected
bool inet::TLVOptions_Base::operator== ( const TLVOptions_Base )
protected
virtual void inet::TLVOptions_Base::parsimPack ( omnetpp::cCommBuffer *  b) const
overridevirtual
virtual void inet::TLVOptions_Base::parsimUnpack ( omnetpp::cCommBuffer *  b)
overridevirtual
virtual void inet::TLVOptions_Base::setTlvOption ( unsigned int  k,
const TLVOptionBase tlvOption 
)
pure virtual

Implemented in inet::TLVOptions.

virtual void inet::TLVOptions_Base::setTlvOptionArraySize ( unsigned int  size)
pure virtual

Implemented in inet::TLVOptions.


The documentation for this class was generated from the following file: