MyMessage_m.h

Go to the documentation of this file.
00001 //
00002 // Generated file, do not edit! Created by opp_msgc 4.1 from applications/myapplication/MyMessage.msg.
00003 //
00004 
00005 #ifndef _MYMESSAGE_M_H_
00006 #define _MYMESSAGE_M_H_
00007 
00008 #include <omnetpp.h>
00009 
00010 // opp_msgc version check
00011 #define MSGC_VERSION 0x0401
00012 #if (MSGC_VERSION!=OMNETPP_VERSION)
00013 #    error Version mismatch! Probably this file was generated by an earlier version of opp_msgc: 'make clean' should help.
00014 #endif
00015 
00016 // cplusplus {{
00017 #include <TransportAddress.h>
00018 // }}
00019 
00020 
00021 
00032 enum MessageType {
00033     MYMSG_PING = 1,
00034     MYMSG_PONG = 2
00035 };
00036 
00047 class MyMessage : public ::cPacket
00048 {
00049   protected:
00050     int type_var;
00051     ::TransportAddress senderAddress_var;
00052 
00053     // protected and unimplemented operator==(), to prevent accidental usage
00054     bool operator==(const MyMessage&);
00055 
00056   public:
00057     MyMessage(const char *name=NULL, int kind=0);
00058     MyMessage(const MyMessage& other);
00059     virtual ~MyMessage();
00060     MyMessage& operator=(const MyMessage& other);
00061     virtual MyMessage *dup() const {return new MyMessage(*this);}
00062     virtual void parsimPack(cCommBuffer *b);
00063     virtual void parsimUnpack(cCommBuffer *b);
00064 
00065     // field getter/setter methods
00066     virtual int getType() const;
00067     virtual void setType(int type_var);
00068     virtual TransportAddress& getSenderAddress();
00069     virtual const TransportAddress& getSenderAddress() const {return const_cast<MyMessage*>(this)->getSenderAddress();}
00070     virtual void setSenderAddress(const TransportAddress& senderAddress_var);
00071 };
00072 
00073 inline void doPacking(cCommBuffer *b, MyMessage& obj) {obj.parsimPack(b);}
00074 inline void doUnpacking(cCommBuffer *b, MyMessage& obj) {obj.parsimUnpack(b);}
00075 
00076 
00077 #endif // _MYMESSAGE_M_H_