INET Framework for OMNeT++/OMNEST
IPv6ControlInfo_Base Class Reference

#include <IPv6ControlInfo_m.h>

Inheritance diagram for IPv6ControlInfo_Base:
IPv6ControlInfo

List of all members.

Public Member Functions

virtual ~IPv6ControlInfo_Base ()
virtual IPv6ControlInfo_Basedup () const
virtual void parsimPack (cCommBuffer *b)
virtual void parsimUnpack (cCommBuffer *b)
virtual int getProtocol () const
virtual void setProtocol (int protocol)
virtual IPv6AddressgetDestAddr ()
virtual const IPv6AddressgetDestAddr () const
virtual void setDestAddr (const IPv6Address &destAddr)
virtual IPv6AddressgetSrcAddr ()
virtual const IPv6AddressgetSrcAddr () const
virtual void setSrcAddr (const IPv6Address &srcAddr)
virtual short getHopLimit () const
virtual void setHopLimit (short hopLimit)
virtual int getInterfaceId () const
virtual void setInterfaceId (int interfaceId)

Protected Member Functions

bool operator== (const IPv6ControlInfo_Base &)
 IPv6ControlInfo_Base ()
 IPv6ControlInfo_Base (const IPv6ControlInfo_Base &other)
IPv6ControlInfo_Baseoperator= (const IPv6ControlInfo_Base &other)

Protected Attributes

int protocol_var
IPv6Address destAddr_var
IPv6Address srcAddr_var
short hopLimit_var
int interfaceId_var

Private Member Functions

void copy (const IPv6ControlInfo_Base &other)

Detailed Description

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

 class IPv6ControlInfo
 {
     (true);
     int protocol enum(IPProtocolId);  
     IPv6Address destAddr; 
     IPv6Address srcAddr;  
     short hopLimit;       
     int interfaceId = -1;
 }
 

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

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

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

 Register_Class(IPv6ControlInfo);
 

Definition at line 62 of file IPv6ControlInfo_m.h.


Constructor & Destructor Documentation


Member Function Documentation

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

Definition at line 85 of file IPv6ControlInfo_m.h.

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

Definition at line 93 of file IPv6ControlInfo_m.h.

Referenced by getDestAddr().

{return const_cast<IPv6ControlInfo_Base*>(this)->getDestAddr();}
virtual const IPv6Address& IPv6ControlInfo_Base::getSrcAddr ( ) const [inline, virtual]

Definition at line 96 of file IPv6ControlInfo_m.h.

Referenced by getSrcAddr().

{return const_cast<IPv6ControlInfo_Base*>(this)->getSrcAddr();}
IPv6ControlInfo_Base& IPv6ControlInfo_Base::operator= ( const IPv6ControlInfo_Base other) [protected]
bool IPv6ControlInfo_Base::operator== ( const IPv6ControlInfo_Base ) [protected]
virtual void IPv6ControlInfo_Base::parsimPack ( cCommBuffer *  b) [virtual]
virtual void IPv6ControlInfo_Base::parsimUnpack ( cCommBuffer *  b) [virtual]

Member Data Documentation

Definition at line 66 of file IPv6ControlInfo_m.h.

Definition at line 68 of file IPv6ControlInfo_m.h.

Definition at line 69 of file IPv6ControlInfo_m.h.

Definition at line 65 of file IPv6ControlInfo_m.h.

Definition at line 67 of file IPv6ControlInfo_m.h.


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