|
INET Framework for OMNeT++/OMNEST
|
#include <RSVPHello_m.h>
Public Member Functions | |
| virtual | ~RSVPHelloMsg_Base () |
| virtual RSVPHelloMsg_Base * | dup () const |
| virtual void | parsimPack (cCommBuffer *b) |
| virtual void | parsimUnpack (cCommBuffer *b) |
| virtual bool | getRequest () const |
| virtual void | setRequest (bool request) |
| virtual bool | getAck () const |
| virtual void | setAck (bool ack) |
| virtual int | getSrcInstance () const |
| virtual void | setSrcInstance (int srcInstance) |
| virtual int | getDstInstance () const |
| virtual void | setDstInstance (int dstInstance) |
| virtual int | getRsvpKind () const |
| virtual void | setRsvpKind (int rsvpKind) |
Protected Member Functions | |
| bool | operator== (const RSVPHelloMsg_Base &) |
| RSVPHelloMsg_Base (const char *name=NULL, int kind=0) | |
| RSVPHelloMsg_Base (const RSVPHelloMsg_Base &other) | |
| RSVPHelloMsg_Base & | operator= (const RSVPHelloMsg_Base &other) |
Protected Attributes | |
| bool | request_var |
| bool | ack_var |
| int | srcInstance_var |
| int | dstInstance_var |
| int | rsvpKind_var |
Private Member Functions | |
| void | copy (const RSVPHelloMsg_Base &other) |
Class generated from networklayer/rsvp_te/RSVPHello.msg by opp_msgc.
packet RSVPHelloMsg extends RSVPMessage { (true); bool request; bool ack;
int srcInstance;
int dstInstance;int rsvpKind = HELLO_MESSAGE; }
RSVPHelloMsg_Base is only useful if it gets subclassed, and RSVPHelloMsg is derived from it. The minimum code to be written for RSVPHelloMsg is the following:
class RSVPHelloMsg : public RSVPHelloMsg_Base { private: void copy(const RSVPHelloMsg& other) { ... }
public:
RSVPHelloMsg(const char *name=NULL, int kind=0) : RSVPHelloMsg_Base(name,kind) {}
RSVPHelloMsg(const RSVPHelloMsg& other) : RSVPHelloMsg_Base(other) {copy(other);}
RSVPHelloMsg& operator=(const RSVPHelloMsg& other) {if (this==&other) return *this; RSVPHelloMsg_Base::operator=(other); copy(other); return *this;}
virtual RSVPHelloMsg *dup() const {return new RSVPHelloMsg(*this);}
// ADD CODE HERE to redefine and implement pure virtual functions from RSVPHelloMsg_Base
};
The following should go into a .cc (.cpp) file:
Register_Class(RSVPHelloMsg);
Definition at line 62 of file RSVPHello_m.h.
| RSVPHelloMsg_Base::RSVPHelloMsg_Base | ( | const char * | name = NULL, |
| int | kind = 0 |
||
| ) | [protected] |
| RSVPHelloMsg_Base::RSVPHelloMsg_Base | ( | const RSVPHelloMsg_Base & | other | ) | [protected] |
| virtual RSVPHelloMsg_Base::~RSVPHelloMsg_Base | ( | ) | [virtual] |
| void RSVPHelloMsg_Base::copy | ( | const RSVPHelloMsg_Base & | other | ) | [private] |
| virtual RSVPHelloMsg_Base* RSVPHelloMsg_Base::dup | ( | ) | const [inline, virtual] |
Reimplemented from RSVPMessage.
Reimplemented in RSVPHelloMsg.
Definition at line 85 of file RSVPHello_m.h.
{throw cRuntimeError("You forgot to manually add a dup() function to class RSVPHelloMsg");}
| virtual bool RSVPHelloMsg_Base::getAck | ( | ) | const [virtual] |
Referenced by RSVP::processHelloMsg().
| virtual int RSVPHelloMsg_Base::getDstInstance | ( | ) | const [virtual] |
Referenced by RSVP::processHelloMsg().
| virtual bool RSVPHelloMsg_Base::getRequest | ( | ) | const [virtual] |
Referenced by RSVP::processHelloMsg().
| virtual int RSVPHelloMsg_Base::getRsvpKind | ( | ) | const [virtual] |
Reimplemented from RSVPMessage.
| virtual int RSVPHelloMsg_Base::getSrcInstance | ( | ) | const [virtual] |
Referenced by RSVP::processHelloMsg().
| RSVPHelloMsg_Base& RSVPHelloMsg_Base::operator= | ( | const RSVPHelloMsg_Base & | other | ) | [protected] |
| bool RSVPHelloMsg_Base::operator== | ( | const RSVPHelloMsg_Base & | ) | [protected] |
| virtual void RSVPHelloMsg_Base::parsimPack | ( | cCommBuffer * | b | ) | [virtual] |
Reimplemented from RSVPMessage.
| virtual void RSVPHelloMsg_Base::parsimUnpack | ( | cCommBuffer * | b | ) | [virtual] |
Reimplemented from RSVPMessage.
| virtual void RSVPHelloMsg_Base::setAck | ( | bool | ack | ) | [virtual] |
Referenced by RSVP::processHELLO_TIMER().
| virtual void RSVPHelloMsg_Base::setDstInstance | ( | int | dstInstance | ) | [virtual] |
Referenced by RSVP::processHELLO_TIMER().
| virtual void RSVPHelloMsg_Base::setRequest | ( | bool | request | ) | [virtual] |
Referenced by RSVP::processHELLO_TIMER().
| virtual void RSVPHelloMsg_Base::setRsvpKind | ( | int | rsvpKind | ) | [virtual] |
Reimplemented from RSVPMessage.
| virtual void RSVPHelloMsg_Base::setSrcInstance | ( | int | srcInstance | ) | [virtual] |
Referenced by RSVP::processHELLO_TIMER().
bool RSVPHelloMsg_Base::ack_var [protected] |
Definition at line 66 of file RSVPHello_m.h.
int RSVPHelloMsg_Base::dstInstance_var [protected] |
Definition at line 68 of file RSVPHello_m.h.
bool RSVPHelloMsg_Base::request_var [protected] |
Definition at line 65 of file RSVPHello_m.h.
int RSVPHelloMsg_Base::rsvpKind_var [protected] |
Reimplemented from RSVPMessage.
Definition at line 69 of file RSVPHello_m.h.
int RSVPHelloMsg_Base::srcInstance_var [protected] |
Definition at line 67 of file RSVPHello_m.h.