OverSim
MyMessage_m.h
Go to the documentation of this file.
1 //
2 // Generated file, do not edit! Created by opp_msgc 4.2 from applications/myapplication/MyMessage.msg.
3 //
4 
5 #ifndef _MYMESSAGE_M_H_
6 #define _MYMESSAGE_M_H_
7 
8 #include <omnetpp.h>
9 
10 // opp_msgc version check
11 #define MSGC_VERSION 0x0402
12 #if (MSGC_VERSION!=OMNETPP_VERSION)
13 # error Version mismatch! Probably this file was generated by an earlier version of opp_msgc: 'make clean' should help.
14 #endif
15 
16 // cplusplus {{
17 #include <TransportAddress.h>
18 // }}
19 
20 
21 
35 };
36 
47 class MyMessage : public ::cPacket
48 {
49  protected:
50  int type_var;
52 
53  private:
54  void copy(const MyMessage& other);
55 
56  protected:
57  // protected and unimplemented operator==(), to prevent accidental usage
58  bool operator==(const MyMessage&);
59 
60  public:
61  MyMessage(const char *name=NULL, int kind=0);
62  MyMessage(const MyMessage& other);
63  virtual ~MyMessage();
64  MyMessage& operator=(const MyMessage& other);
65  virtual MyMessage *dup() const {return new MyMessage(*this);}
66  virtual void parsimPack(cCommBuffer *b);
67  virtual void parsimUnpack(cCommBuffer *b);
68 
69  // field getter/setter methods
70  virtual int getType() const;
71  virtual void setType(int type);
73  virtual const TransportAddress& getSenderAddress() const {return const_cast<MyMessage*>(this)->getSenderAddress();}
74  virtual void setSenderAddress(const TransportAddress& senderAddress);
75 };
76 
77 inline void doPacking(cCommBuffer *b, MyMessage& obj) {obj.parsimPack(b);}
78 inline void doUnpacking(cCommBuffer *b, MyMessage& obj) {obj.parsimUnpack(b);}
79 
80 
81 #endif // _MYMESSAGE_M_H_