DHTMessage_m.h

Go to the documentation of this file.
00001 //
00002 // Generated file, do not edit! Created by opp_msgc 4.0 from applications/dht/DHTMessage.msg.
00003 //
00004 
00005 #ifndef _DHTMESSAGE_M_H_
00006 #define _DHTMESSAGE_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 <OverlayKey.h>
00019 #include <IPvXAddress.h>
00020 #include <BinaryValue.h>
00021 #include <NodeHandle.h>
00022 #include <CommonMessages_m.h>
00023 
00024 #define DHTCALL_L(msg) (BASECALL_L(msg) + KEY_L)
00025 #define PUTCALL_L(msg) (DHTCALL_L(msg) + msg->getValue().size() * sizeof(char) + sizeof(int) + sizeof(bool) * 2 + NODEHANDLE_L)
00026 #define GETCALL_L(msg) (DHTCALL_L(msg) + sizeof(bool))
00027 #define DHTRESPONSE_L(msg) (BASERESPONSE_L(msg) + KEY_L + msg->getValue().size() * sizeof(char))
00028 #define PUTRESPONSE_L(msg) (DHTRESPONSE_L(msg))
00029 #define GETRESPONSE_L(msg) (DHTRESPONSE_L(msg) + sizeof(bool))
00030 // end cplusplus
00031 
00032 
00033 
00044 class DHTMessageCall : public BaseCallMessage
00045 {
00046   protected:
00047     OverlayKey key_var;
00048 
00049     // protected and unimplemented operator==(), to prevent accidental usage
00050     bool operator==(const DHTMessageCall&);
00051 
00052   public:
00053     DHTMessageCall(const char *name=NULL, int kind=0);
00054     DHTMessageCall(const DHTMessageCall& other);
00055     virtual ~DHTMessageCall();
00056     DHTMessageCall& operator=(const DHTMessageCall& other);
00057     virtual DHTMessageCall *dup() const {return new DHTMessageCall(*this);}
00058     virtual void parsimPack(cCommBuffer *b);
00059     virtual void parsimUnpack(cCommBuffer *b);
00060 
00061     // field getter/setter methods
00062     virtual OverlayKey& getKey();
00063     virtual const OverlayKey& getKey() const {return const_cast<DHTMessageCall*>(this)->getKey();}
00064     virtual void setKey(const OverlayKey& key_var);
00065 };
00066 
00067 inline void doPacking(cCommBuffer *b, DHTMessageCall& obj) {obj.parsimPack(b);}
00068 inline void doUnpacking(cCommBuffer *b, DHTMessageCall& obj) {obj.parsimUnpack(b);}
00069 
00083 class DHTPutCall : public DHTMessageCall
00084 {
00085   protected:
00086     BinaryValue value_var;
00087     int ttl_var;
00088     bool isModifiable_var;
00089     bool maintenance_var;
00090     NodeHandle ownerNode_var;
00091 
00092     // protected and unimplemented operator==(), to prevent accidental usage
00093     bool operator==(const DHTPutCall&);
00094 
00095   public:
00096     DHTPutCall(const char *name=NULL, int kind=0);
00097     DHTPutCall(const DHTPutCall& other);
00098     virtual ~DHTPutCall();
00099     DHTPutCall& operator=(const DHTPutCall& other);
00100     virtual DHTPutCall *dup() const {return new DHTPutCall(*this);}
00101     virtual void parsimPack(cCommBuffer *b);
00102     virtual void parsimUnpack(cCommBuffer *b);
00103 
00104     // field getter/setter methods
00105     virtual BinaryValue& getValue();
00106     virtual const BinaryValue& getValue() const {return const_cast<DHTPutCall*>(this)->getValue();}
00107     virtual void setValue(const BinaryValue& value_var);
00108     virtual int getTtl() const;
00109     virtual void setTtl(int ttl_var);
00110     virtual bool getIsModifiable() const;
00111     virtual void setIsModifiable(bool isModifiable_var);
00112     virtual bool getMaintenance() const;
00113     virtual void setMaintenance(bool maintenance_var);
00114     virtual NodeHandle& getOwnerNode();
00115     virtual const NodeHandle& getOwnerNode() const {return const_cast<DHTPutCall*>(this)->getOwnerNode();}
00116     virtual void setOwnerNode(const NodeHandle& ownerNode_var);
00117 };
00118 
00119 inline void doPacking(cCommBuffer *b, DHTPutCall& obj) {obj.parsimPack(b);}
00120 inline void doUnpacking(cCommBuffer *b, DHTPutCall& obj) {obj.parsimUnpack(b);}
00121 
00131 class DHTGetCall : public DHTMessageCall
00132 {
00133   protected:
00134     bool isHash_var;
00135 
00136     // protected and unimplemented operator==(), to prevent accidental usage
00137     bool operator==(const DHTGetCall&);
00138 
00139   public:
00140     DHTGetCall(const char *name=NULL, int kind=0);
00141     DHTGetCall(const DHTGetCall& other);
00142     virtual ~DHTGetCall();
00143     DHTGetCall& operator=(const DHTGetCall& other);
00144     virtual DHTGetCall *dup() const {return new DHTGetCall(*this);}
00145     virtual void parsimPack(cCommBuffer *b);
00146     virtual void parsimUnpack(cCommBuffer *b);
00147 
00148     // field getter/setter methods
00149     virtual bool getIsHash() const;
00150     virtual void setIsHash(bool isHash_var);
00151 };
00152 
00153 inline void doPacking(cCommBuffer *b, DHTGetCall& obj) {obj.parsimPack(b);}
00154 inline void doUnpacking(cCommBuffer *b, DHTGetCall& obj) {obj.parsimUnpack(b);}
00155 
00166 class DHTMessageResponse : public BaseResponseMessage
00167 {
00168   protected:
00169     OverlayKey key_var;
00170     BinaryValue value_var;
00171 
00172     // protected and unimplemented operator==(), to prevent accidental usage
00173     bool operator==(const DHTMessageResponse&);
00174 
00175   public:
00176     DHTMessageResponse(const char *name=NULL, int kind=0);
00177     DHTMessageResponse(const DHTMessageResponse& other);
00178     virtual ~DHTMessageResponse();
00179     DHTMessageResponse& operator=(const DHTMessageResponse& other);
00180     virtual DHTMessageResponse *dup() const {return new DHTMessageResponse(*this);}
00181     virtual void parsimPack(cCommBuffer *b);
00182     virtual void parsimUnpack(cCommBuffer *b);
00183 
00184     // field getter/setter methods
00185     virtual OverlayKey& getKey();
00186     virtual const OverlayKey& getKey() const {return const_cast<DHTMessageResponse*>(this)->getKey();}
00187     virtual void setKey(const OverlayKey& key_var);
00188     virtual BinaryValue& getValue();
00189     virtual const BinaryValue& getValue() const {return const_cast<DHTMessageResponse*>(this)->getValue();}
00190     virtual void setValue(const BinaryValue& value_var);
00191 };
00192 
00193 inline void doPacking(cCommBuffer *b, DHTMessageResponse& obj) {obj.parsimPack(b);}
00194 inline void doUnpacking(cCommBuffer *b, DHTMessageResponse& obj) {obj.parsimUnpack(b);}
00195 
00204 class DHTPutResponse : public DHTMessageResponse
00205 {
00206   protected:
00207 
00208     // protected and unimplemented operator==(), to prevent accidental usage
00209     bool operator==(const DHTPutResponse&);
00210 
00211   public:
00212     DHTPutResponse(const char *name=NULL, int kind=0);
00213     DHTPutResponse(const DHTPutResponse& other);
00214     virtual ~DHTPutResponse();
00215     DHTPutResponse& operator=(const DHTPutResponse& other);
00216     virtual DHTPutResponse *dup() const {return new DHTPutResponse(*this);}
00217     virtual void parsimPack(cCommBuffer *b);
00218     virtual void parsimUnpack(cCommBuffer *b);
00219 
00220     // field getter/setter methods
00221 };
00222 
00223 inline void doPacking(cCommBuffer *b, DHTPutResponse& obj) {obj.parsimPack(b);}
00224 inline void doUnpacking(cCommBuffer *b, DHTPutResponse& obj) {obj.parsimUnpack(b);}
00225 
00235 class DHTGetResponse : public DHTMessageResponse
00236 {
00237   protected:
00238     bool isHash_var;
00239 
00240     // protected and unimplemented operator==(), to prevent accidental usage
00241     bool operator==(const DHTGetResponse&);
00242 
00243   public:
00244     DHTGetResponse(const char *name=NULL, int kind=0);
00245     DHTGetResponse(const DHTGetResponse& other);
00246     virtual ~DHTGetResponse();
00247     DHTGetResponse& operator=(const DHTGetResponse& other);
00248     virtual DHTGetResponse *dup() const {return new DHTGetResponse(*this);}
00249     virtual void parsimPack(cCommBuffer *b);
00250     virtual void parsimUnpack(cCommBuffer *b);
00251 
00252     // field getter/setter methods
00253     virtual bool getIsHash() const;
00254     virtual void setIsHash(bool isHash_var);
00255 };
00256 
00257 inline void doPacking(cCommBuffer *b, DHTGetResponse& obj) {obj.parsimPack(b);}
00258 inline void doUnpacking(cCommBuffer *b, DHTGetResponse& obj) {obj.parsimUnpack(b);}
00259 
00269 class DHTTtlTimer : public cMessage
00270 {
00271   protected:
00272     OverlayKey key_var;
00273 
00274     // protected and unimplemented operator==(), to prevent accidental usage
00275     bool operator==(const DHTTtlTimer&);
00276 
00277   public:
00278     DHTTtlTimer(const char *name=NULL, int kind=0);
00279     DHTTtlTimer(const DHTTtlTimer& other);
00280     virtual ~DHTTtlTimer();
00281     DHTTtlTimer& operator=(const DHTTtlTimer& other);
00282     virtual DHTTtlTimer *dup() const {return new DHTTtlTimer(*this);}
00283     virtual void parsimPack(cCommBuffer *b);
00284     virtual void parsimUnpack(cCommBuffer *b);
00285 
00286     // field getter/setter methods
00287     virtual OverlayKey& getKey();
00288     virtual const OverlayKey& getKey() const {return const_cast<DHTTtlTimer*>(this)->getKey();}
00289     virtual void setKey(const OverlayKey& key_var);
00290 };
00291 
00292 inline void doPacking(cCommBuffer *b, DHTTtlTimer& obj) {obj.parsimPack(b);}
00293 inline void doUnpacking(cCommBuffer *b, DHTTtlTimer& obj) {obj.parsimUnpack(b);}
00294 
00295 
00296 #endif // _DHTMESSAGE_M_H_

Generated on Fri Mar 20 18:40:25 2009 for OverSim by  doxygen 1.5.5