ExtAPIMessages_m.h

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

Generated on Tue Sep 8 17:26:52 2009 for OverSim by  doxygen 1.5.8