Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

EtherApp_m.cc

Go to the documentation of this file.
00001 //
00002 // Generated file, do not edit! Created by opp_msgc.
00003 //
00004 
00005 // Disable warnings about unused variables, empty switch stmts, etc:
00006 #ifdef _MSC_VER
00007 #  pragma warning(disable:4101)
00008 #  pragma warning(disable:4065)
00009 #endif
00010 
00011 #include <iostream>
00012 #include <sstream>
00013 #include "EtherApp_m.h"
00014 
00015 // Template rule which fires if a struct or class doesn't have operator<<
00016 template<typename T> std::ostream& operator<<(std::ostream& out,const T&) {return out;}
00017 
00018 Register_Class(EtherAppReq);
00019 
00020 EtherAppReq::EtherAppReq(const char *name, int kind) : cMessage30(name,kind)
00021 {
00022     unsigned int i;
00023     this->requestId_var = 0;
00024     this->responseBytes_var = 0;
00025 }
00026 
00027 EtherAppReq::EtherAppReq(const EtherAppReq& other) : cMessage30()
00028 {
00029     unsigned int i;
00030     setName(other.name());
00031     operator=(other);
00032 }
00033 
00034 EtherAppReq::~EtherAppReq()
00035 {
00036     unsigned int i;
00037 }
00038 
00039 EtherAppReq& EtherAppReq::operator=(const EtherAppReq& other)
00040 {
00041     if (this==&other) return *this;
00042     unsigned int i;
00043     cMessage30::operator=(other);
00044     this->requestId_var = other.requestId_var;
00045     this->responseBytes_var = other.responseBytes_var;
00046     return *this;
00047 }
00048 
00049 long EtherAppReq::getRequestId() const
00050 {
00051     return requestId_var;
00052 }
00053 
00054 void EtherAppReq::setRequestId(long requestId_var)
00055 {
00056     this->requestId_var = requestId_var;
00057 }
00058 
00059 long EtherAppReq::getResponseBytes() const
00060 {
00061     return responseBytes_var;
00062 }
00063 
00064 void EtherAppReq::setResponseBytes(long responseBytes_var)
00065 {
00066     this->responseBytes_var = responseBytes_var;
00067 }
00068 
00069 class EtherAppReqDescriptor : public cStructDescriptor
00070 {
00071   public:
00072     EtherAppReqDescriptor(void *p=NULL);
00073     virtual ~EtherAppReqDescriptor();
00074     EtherAppReqDescriptor& operator=(const EtherAppReqDescriptor& other);
00075     virtual cObject *dup() const {return new EtherAppReqDescriptor(*this);}
00076 
00077     virtual int getFieldCount();
00078     virtual const char *getFieldName(int field);
00079     virtual int getFieldType(int field);
00080     virtual const char *getFieldTypeString(int field);
00081     virtual const char *getFieldEnumName(int field);
00082     virtual int getArraySize(int field);
00083 
00084     virtual bool getFieldAsString(int field, int i, char *resultbuf, int bufsize);
00085     virtual bool setFieldAsString(int field, int i, const char *value);
00086 
00087     virtual const char *getFieldStructName(int field);
00088     virtual void *getFieldStructPointer(int field, int i);
00089     virtual sFieldWrapper *getFieldWrapper(int field, int i);
00090 };
00091 
00092 Register_Class(EtherAppReqDescriptor);
00093 
00094 EtherAppReqDescriptor::EtherAppReqDescriptor(void *p) : cStructDescriptor(p)
00095 {
00096 }
00097 
00098 EtherAppReqDescriptor::~EtherAppReqDescriptor()
00099 {
00100 }
00101 
00102 int EtherAppReqDescriptor::getFieldCount()
00103 {
00104     return 2;
00105 }
00106 
00107 int EtherAppReqDescriptor::getFieldType(int field)
00108 {
00109     switch (field) {
00110         case 0: return FT_BASIC;
00111         case 1: return FT_BASIC;
00112         default: return FT_INVALID;
00113     }
00114 }
00115 
00116 const char *EtherAppReqDescriptor::getFieldName(int field)
00117 {
00118     switch (field) {
00119         case 0: return "requestId";
00120         case 1: return "responseBytes";
00121         default: return NULL;
00122     }
00123 }
00124 
00125 const char *EtherAppReqDescriptor::getFieldTypeString(int field)
00126 {
00127     switch (field) {
00128         case 0: return "long";
00129         case 1: return "long";
00130         default: return NULL;
00131     }
00132 }
00133 
00134 const char *EtherAppReqDescriptor::getFieldEnumName(int field)
00135 {
00136     switch (field) {
00137         default: return NULL;
00138     }
00139 }
00140 
00141 int EtherAppReqDescriptor::getArraySize(int field)
00142 {
00143     EtherAppReq *pp = (EtherAppReq *)p;
00144     switch (field) {
00145         default: return 0;
00146     }
00147 }
00148 
00149 bool EtherAppReqDescriptor::getFieldAsString(int field, int i, char *resultbuf, int bufsize)
00150 {
00151     EtherAppReq *pp = (EtherAppReq *)p;
00152     switch (field) {
00153         case 0: long2string(pp->getRequestId(),resultbuf,bufsize); return true;
00154         case 1: long2string(pp->getResponseBytes(),resultbuf,bufsize); return true;
00155         default: return false;
00156     }
00157 }
00158 
00159 bool EtherAppReqDescriptor::setFieldAsString(int field, int i, const char *value)
00160 {
00161     EtherAppReq *pp = (EtherAppReq *)p;
00162     switch (field) {
00163         case 0: pp->setRequestId(string2long(value)); return true;
00164         case 1: pp->setResponseBytes(string2long(value)); return true;
00165         default: return false;
00166     }
00167 }
00168 
00169 const char *EtherAppReqDescriptor::getFieldStructName(int field)
00170 {
00171     switch (field) {
00172         default: return NULL;
00173     }
00174 }
00175 
00176 void *EtherAppReqDescriptor::getFieldStructPointer(int field, int i)
00177 {
00178     EtherAppReq *pp = (EtherAppReq *)p;
00179     switch (field) {
00180         default: return NULL;
00181     }
00182 }
00183 
00184 sFieldWrapper *EtherAppReqDescriptor::getFieldWrapper(int field, int i)
00185 {
00186     return NULL;
00187 }
00188 
00189 Register_Class(EtherAppResp);
00190 
00191 EtherAppResp::EtherAppResp(const char *name, int kind) : cMessage30(name,kind)
00192 {
00193     unsigned int i;
00194     this->requestId_var = 0;
00195     this->numFrames_var = 0;
00196 }
00197 
00198 EtherAppResp::EtherAppResp(const EtherAppResp& other) : cMessage30()
00199 {
00200     unsigned int i;
00201     setName(other.name());
00202     operator=(other);
00203 }
00204 
00205 EtherAppResp::~EtherAppResp()
00206 {
00207     unsigned int i;
00208 }
00209 
00210 EtherAppResp& EtherAppResp::operator=(const EtherAppResp& other)
00211 {
00212     if (this==&other) return *this;
00213     unsigned int i;
00214     cMessage30::operator=(other);
00215     this->requestId_var = other.requestId_var;
00216     this->numFrames_var = other.numFrames_var;
00217     return *this;
00218 }
00219 
00220 int EtherAppResp::getRequestId() const
00221 {
00222     return requestId_var;
00223 }
00224 
00225 void EtherAppResp::setRequestId(int requestId_var)
00226 {
00227     this->requestId_var = requestId_var;
00228 }
00229 
00230 int EtherAppResp::getNumFrames() const
00231 {
00232     return numFrames_var;
00233 }
00234 
00235 void EtherAppResp::setNumFrames(int numFrames_var)
00236 {
00237     this->numFrames_var = numFrames_var;
00238 }
00239 
00240 class EtherAppRespDescriptor : public cStructDescriptor
00241 {
00242   public:
00243     EtherAppRespDescriptor(void *p=NULL);
00244     virtual ~EtherAppRespDescriptor();
00245     EtherAppRespDescriptor& operator=(const EtherAppRespDescriptor& other);
00246     virtual cObject *dup() const {return new EtherAppRespDescriptor(*this);}
00247 
00248     virtual int getFieldCount();
00249     virtual const char *getFieldName(int field);
00250     virtual int getFieldType(int field);
00251     virtual const char *getFieldTypeString(int field);
00252     virtual const char *getFieldEnumName(int field);
00253     virtual int getArraySize(int field);
00254 
00255     virtual bool getFieldAsString(int field, int i, char *resultbuf, int bufsize);
00256     virtual bool setFieldAsString(int field, int i, const char *value);
00257 
00258     virtual const char *getFieldStructName(int field);
00259     virtual void *getFieldStructPointer(int field, int i);
00260     virtual sFieldWrapper *getFieldWrapper(int field, int i);
00261 };
00262 
00263 Register_Class(EtherAppRespDescriptor);
00264 
00265 EtherAppRespDescriptor::EtherAppRespDescriptor(void *p) : cStructDescriptor(p)
00266 {
00267 }
00268 
00269 EtherAppRespDescriptor::~EtherAppRespDescriptor()
00270 {
00271 }
00272 
00273 int EtherAppRespDescriptor::getFieldCount()
00274 {
00275     return 2;
00276 }
00277 
00278 int EtherAppRespDescriptor::getFieldType(int field)
00279 {
00280     switch (field) {
00281         case 0: return FT_BASIC;
00282         case 1: return FT_BASIC;
00283         default: return FT_INVALID;
00284     }
00285 }
00286 
00287 const char *EtherAppRespDescriptor::getFieldName(int field)
00288 {
00289     switch (field) {
00290         case 0: return "requestId";
00291         case 1: return "numFrames";
00292         default: return NULL;
00293     }
00294 }
00295 
00296 const char *EtherAppRespDescriptor::getFieldTypeString(int field)
00297 {
00298     switch (field) {
00299         case 0: return "int";
00300         case 1: return "int";
00301         default: return NULL;
00302     }
00303 }
00304 
00305 const char *EtherAppRespDescriptor::getFieldEnumName(int field)
00306 {
00307     switch (field) {
00308         default: return NULL;
00309     }
00310 }
00311 
00312 int EtherAppRespDescriptor::getArraySize(int field)
00313 {
00314     EtherAppResp *pp = (EtherAppResp *)p;
00315     switch (field) {
00316         default: return 0;
00317     }
00318 }
00319 
00320 bool EtherAppRespDescriptor::getFieldAsString(int field, int i, char *resultbuf, int bufsize)
00321 {
00322     EtherAppResp *pp = (EtherAppResp *)p;
00323     switch (field) {
00324         case 0: long2string(pp->getRequestId(),resultbuf,bufsize); return true;
00325         case 1: long2string(pp->getNumFrames(),resultbuf,bufsize); return true;
00326         default: return false;
00327     }
00328 }
00329 
00330 bool EtherAppRespDescriptor::setFieldAsString(int field, int i, const char *value)
00331 {
00332     EtherAppResp *pp = (EtherAppResp *)p;
00333     switch (field) {
00334         case 0: pp->setRequestId(string2long(value)); return true;
00335         case 1: pp->setNumFrames(string2long(value)); return true;
00336         default: return false;
00337     }
00338 }
00339 
00340 const char *EtherAppRespDescriptor::getFieldStructName(int field)
00341 {
00342     switch (field) {
00343         default: return NULL;
00344     }
00345 }
00346 
00347 void *EtherAppRespDescriptor::getFieldStructPointer(int field, int i)
00348 {
00349     EtherAppResp *pp = (EtherAppResp *)p;
00350     switch (field) {
00351         default: return NULL;
00352     }
00353 }
00354 
00355 sFieldWrapper *EtherAppRespDescriptor::getFieldWrapper(int field, int i)
00356 {
00357     return NULL;
00358 }
00359 

Generated on Sat May 15 20:30:42 2004 for Ethernet by doxygen1.2.17