ExtAPIMessages_m.h

Go to the documentation of this file.
00001 //
00002 // Generated file, do not edit! Created by opp_msgc 4.1 from common/ExtAPIMessages.msg.
00003 //
00004 
00005 #ifndef _EXTAPIMESSAGES_M_H_
00006 #define _EXTAPIMESSAGES_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 <CommonMessages_m.h>
00018 
00019 static const int GIAAPPCOMMAND_L = 8;
00020 #define GIASEARCHAPP_L(msg) (GIAAPPCOMMAND_L)
00021 #define GIAPUT_L(msg) (GIASEARCHAPP_L(msg) + msg->getKeysArraySize() * KEY_L)
00022 #define GIAGET_L(msg) (GIASEARCHAPP_L(msg) + KEY_L + MAXRESPONSES_L)
00023 #define GIAGETRSP_L(msg) (GIASEARCHAPP_L(msg) + KEY_L + NODEHANDLE_L)
00024 // }}
00025 
00026 
00027 
00040 enum GIAAppCommand {
00041     GIA_PUT = 0,
00042     GIA_SEARCH = 1,
00043     GIA_ANSWER = 2
00044 };
00045 
00055 class GIASearchAppMessage : public ::cPacket
00056 {
00057   protected:
00058     int command_var;
00059 
00060     // protected and unimplemented operator==(), to prevent accidental usage
00061     bool operator==(const GIASearchAppMessage&);
00062 
00063   public:
00064     GIASearchAppMessage(const char *name=NULL, int kind=0);
00065     GIASearchAppMessage(const GIASearchAppMessage& other);
00066     virtual ~GIASearchAppMessage();
00067     GIASearchAppMessage& operator=(const GIASearchAppMessage& other);
00068     virtual GIASearchAppMessage *dup() const {return new GIASearchAppMessage(*this);}
00069     virtual void parsimPack(cCommBuffer *b);
00070     virtual void parsimUnpack(cCommBuffer *b);
00071 
00072     // field getter/setter methods
00073     virtual int getCommand() const;
00074     virtual void setCommand(int command_var);
00075 };
00076 
00077 inline void doPacking(cCommBuffer *b, GIASearchAppMessage& obj) {obj.parsimPack(b);}
00078 inline void doUnpacking(cCommBuffer *b, GIASearchAppMessage& obj) {obj.parsimUnpack(b);}
00079 
00089 class GIAput : public ::GIASearchAppMessage
00090 {
00091   protected:
00092     ::OverlayKey *keys_var; // array ptr
00093     unsigned int keys_arraysize;
00094 
00095     // protected and unimplemented operator==(), to prevent accidental usage
00096     bool operator==(const GIAput&);
00097 
00098   public:
00099     GIAput(const char *name=NULL, int kind=0);
00100     GIAput(const GIAput& other);
00101     virtual ~GIAput();
00102     GIAput& operator=(const GIAput& other);
00103     virtual GIAput *dup() const {return new GIAput(*this);}
00104     virtual void parsimPack(cCommBuffer *b);
00105     virtual void parsimUnpack(cCommBuffer *b);
00106 
00107     // field getter/setter methods
00108     virtual void setKeysArraySize(unsigned int size);
00109     virtual unsigned int getKeysArraySize() const;
00110     virtual OverlayKey& getKeys(unsigned int k);
00111     virtual const OverlayKey& getKeys(unsigned int k) const {return const_cast<GIAput*>(this)->getKeys(k);}
00112     virtual void setKeys(unsigned int k, const OverlayKey& keys_var);
00113 };
00114 
00115 inline void doPacking(cCommBuffer *b, GIAput& obj) {obj.parsimPack(b);}
00116 inline void doUnpacking(cCommBuffer *b, GIAput& obj) {obj.parsimUnpack(b);}
00117 
00126 class GIAremove : public ::GIASearchAppMessage
00127 {
00128   protected:
00129 
00130     // protected and unimplemented operator==(), to prevent accidental usage
00131     bool operator==(const GIAremove&);
00132 
00133   public:
00134     GIAremove(const char *name=NULL, int kind=0);
00135     GIAremove(const GIAremove& other);
00136     virtual ~GIAremove();
00137     GIAremove& operator=(const GIAremove& other);
00138     virtual GIAremove *dup() const {return new GIAremove(*this);}
00139     virtual void parsimPack(cCommBuffer *b);
00140     virtual void parsimUnpack(cCommBuffer *b);
00141 
00142     // field getter/setter methods
00143 };
00144 
00145 inline void doPacking(cCommBuffer *b, GIAremove& obj) {obj.parsimPack(b);}
00146 inline void doUnpacking(cCommBuffer *b, GIAremove& obj) {obj.parsimUnpack(b);}
00147 
00158 class GIAsearch : public ::GIASearchAppMessage
00159 {
00160   protected:
00161     ::OverlayKey searchKey_var;
00162     int maxResponses_var;
00163 
00164     // protected and unimplemented operator==(), to prevent accidental usage
00165     bool operator==(const GIAsearch&);
00166 
00167   public:
00168     GIAsearch(const char *name=NULL, int kind=0);
00169     GIAsearch(const GIAsearch& other);
00170     virtual ~GIAsearch();
00171     GIAsearch& operator=(const GIAsearch& other);
00172     virtual GIAsearch *dup() const {return new GIAsearch(*this);}
00173     virtual void parsimPack(cCommBuffer *b);
00174     virtual void parsimUnpack(cCommBuffer *b);
00175 
00176     // field getter/setter methods
00177     virtual OverlayKey& getSearchKey();
00178     virtual const OverlayKey& getSearchKey() const {return const_cast<GIAsearch*>(this)->getSearchKey();}
00179     virtual void setSearchKey(const OverlayKey& searchKey_var);
00180     virtual int getMaxResponses() const;
00181     virtual void setMaxResponses(int maxResponses_var);
00182 };
00183 
00184 inline void doPacking(cCommBuffer *b, GIAsearch& obj) {obj.parsimPack(b);}
00185 inline void doUnpacking(cCommBuffer *b, GIAsearch& obj) {obj.parsimUnpack(b);}
00186 
00197 class GIAanswer : public ::GIASearchAppMessage
00198 {
00199   protected:
00200     ::OverlayKey searchKey_var;
00201     ::NodeHandle node_var;
00202 
00203     // protected and unimplemented operator==(), to prevent accidental usage
00204     bool operator==(const GIAanswer&);
00205 
00206   public:
00207     GIAanswer(const char *name=NULL, int kind=0);
00208     GIAanswer(const GIAanswer& other);
00209     virtual ~GIAanswer();
00210     GIAanswer& operator=(const GIAanswer& other);
00211     virtual GIAanswer *dup() const {return new GIAanswer(*this);}
00212     virtual void parsimPack(cCommBuffer *b);
00213     virtual void parsimUnpack(cCommBuffer *b);
00214 
00215     // field getter/setter methods
00216     virtual OverlayKey& getSearchKey();
00217     virtual const OverlayKey& getSearchKey() const {return const_cast<GIAanswer*>(this)->getSearchKey();}
00218     virtual void setSearchKey(const OverlayKey& searchKey_var);
00219     virtual NodeHandle& getNode();
00220     virtual const NodeHandle& getNode() const {return const_cast<GIAanswer*>(this)->getNode();}
00221     virtual void setNode(const NodeHandle& node_var);
00222 };
00223 
00224 inline void doPacking(cCommBuffer *b, GIAanswer& obj) {obj.parsimPack(b);}
00225 inline void doUnpacking(cCommBuffer *b, GIAanswer& obj) {obj.parsimUnpack(b);}
00226 
00227 
00228 #endif // _EXTAPIMESSAGES_M_H_