INET Framework for OMNeT++/OMNEST
IPControlInfo_Base Class Reference

#include <IPControlInfo_m.h>

Inheritance diagram for IPControlInfo_Base:
IPControlInfo

List of all members.

Public Member Functions

virtual ~IPControlInfo_Base ()
virtual IPControlInfo_Basedup () const
virtual void parsimPack (cCommBuffer *b)
virtual void parsimUnpack (cCommBuffer *b)
virtual IPAddressgetDestAddr ()
virtual const IPAddressgetDestAddr () const
virtual void setDestAddr (const IPAddress &destAddr)
virtual IPAddressgetSrcAddr ()
virtual const IPAddressgetSrcAddr () const
virtual void setSrcAddr (const IPAddress &srcAddr)
virtual int getInterfaceId () const
virtual void setInterfaceId (int interfaceId)
virtual short getProtocol () const
virtual void setProtocol (short protocol)
virtual unsigned char getDiffServCodePoint () const
virtual void setDiffServCodePoint (unsigned char diffServCodePoint)
virtual short getTimeToLive () const
virtual void setTimeToLive (short timeToLive)
virtual bool getDontFragment () const
virtual void setDontFragment (bool dontFragment)

Protected Member Functions

bool operator== (const IPControlInfo_Base &)
 IPControlInfo_Base ()
 IPControlInfo_Base (const IPControlInfo_Base &other)
IPControlInfo_Baseoperator= (const IPControlInfo_Base &other)

Protected Attributes

IPAddress destAddr_var
IPAddress srcAddr_var
int interfaceId_var
short protocol_var
unsigned char diffServCodePoint_var
short timeToLive_var
bool dontFragment_var

Private Member Functions

void copy (const IPControlInfo_Base &other)

Detailed Description

Class generated from networklayer/contract/IPControlInfo.msg by opp_msgc.

 class IPControlInfo
 {
     (true);
     IPAddress destAddr;   
     IPAddress srcAddr;    
     int interfaceId = -1;
     short protocol enum(IPProtocolId);  
     unsigned char diffServCodePoint;  
     short timeToLive;     
     bool dontFragment;    
 }
 

IPControlInfo_Base is only useful if it gets subclassed, and IPControlInfo is derived from it. The minimum code to be written for IPControlInfo is the following:

 class IPControlInfo : public IPControlInfo_Base
 {
   private:
     void copy(const IPControlInfo& other) { ... }
   public:
     IPControlInfo() : IPControlInfo_Base() {}
     IPControlInfo(const IPControlInfo& other) : IPControlInfo_Base(other) {copy(other);}
     IPControlInfo& operator=(const IPControlInfo& other) {if (this==&other) return *this; IPControlInfo_Base::operator=(other); copy(other); return *this;}
     virtual IPControlInfo *dup() const {return new IPControlInfo(*this);}
     // ADD CODE HERE to redefine and implement pure virtual functions from IPControlInfo_Base
 };
 

The following should go into a .cc (.cpp) file:

 Register_Class(IPControlInfo);
 

Definition at line 64 of file IPControlInfo_m.h.


Constructor & Destructor Documentation


Member Function Documentation

void IPControlInfo_Base::copy ( const IPControlInfo_Base other) [private]
virtual IPControlInfo_Base* IPControlInfo_Base::dup ( ) const [inline, virtual]

Definition at line 89 of file IPControlInfo_m.h.

{throw cRuntimeError("You forgot to manually add a dup() function to class IPControlInfo");}
virtual const IPAddress& IPControlInfo_Base::getDestAddr ( ) const [inline, virtual]

Definition at line 95 of file IPControlInfo_m.h.

Referenced by getDestAddr().

{return const_cast<IPControlInfo_Base*>(this)->getDestAddr();}
virtual unsigned char IPControlInfo_Base::getDiffServCodePoint ( ) const [virtual]

Referenced by IP::encapsulate().

virtual bool IPControlInfo_Base::getDontFragment ( ) const [virtual]

Referenced by IP::encapsulate().

virtual const IPAddress& IPControlInfo_Base::getSrcAddr ( ) const [inline, virtual]

Definition at line 98 of file IPControlInfo_m.h.

Referenced by getSrcAddr().

{return const_cast<IPControlInfo_Base*>(this)->getSrcAddr();}
virtual short IPControlInfo_Base::getTimeToLive ( ) const [virtual]
IPControlInfo_Base& IPControlInfo_Base::operator= ( const IPControlInfo_Base other) [protected]
bool IPControlInfo_Base::operator== ( const IPControlInfo_Base ) [protected]
virtual void IPControlInfo_Base::parsimPack ( cCommBuffer *  b) [virtual]
virtual void IPControlInfo_Base::parsimUnpack ( cCommBuffer *  b) [virtual]
virtual void IPControlInfo_Base::setDiffServCodePoint ( unsigned char  diffServCodePoint) [virtual]
virtual void IPControlInfo_Base::setDontFragment ( bool  dontFragment) [virtual]

Member Data Documentation

Definition at line 67 of file IPControlInfo_m.h.

unsigned char IPControlInfo_Base::diffServCodePoint_var [protected]

Definition at line 71 of file IPControlInfo_m.h.

Definition at line 73 of file IPControlInfo_m.h.

Definition at line 69 of file IPControlInfo_m.h.

Definition at line 70 of file IPControlInfo_m.h.

Definition at line 68 of file IPControlInfo_m.h.

Definition at line 72 of file IPControlInfo_m.h.


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