00001 #ifndef FEEGROUPEDCHANNEL
00002 #define FEEGROUPEDCHANNEL
00003
00004 #include <string>
00005
00006 namespace ztt { namespace dcs {
00007
00008 #define BUNDLE_STRUCTURE "I:1;F:1;C:256;"
00009 #define SERVICE_NAME 256
00010
00019 typedef struct GroupedMessage{
00020
00021 int iVal;
00022 float fVal;
00023 char cName[256];
00024
00025 GroupedMessage(){
00026 iVal = 0;
00027 fVal =0;
00028 std::memcpy(cName,"initial",256);
00029 }
00030
00031 GroupedMessage(int serviceInt,float serviceFloat, char* serviceName){
00032 iVal = serviceInt;
00033 fVal = serviceFloat;
00034 std::strcpy(cName,serviceName);
00035 }
00036
00037 GroupedMessage(const GroupedMessage& orig){
00038 iVal = orig.iVal;
00039 fVal = orig.fVal;
00040 memcpy(cName,orig.cName,256);
00041 }
00042 GroupedMessage& operator=(const GroupedMessage& rhs) {
00043 try{
00044 if (this == &rhs) {
00045 return *this;
00046 }
00047 iVal = rhs.iVal;
00048 fVal = rhs.fVal;
00049 std::memcpy(cName, rhs.cName,SERVICE_NAME);
00050 }catch(...){
00051
00052 }
00053
00054 return *this;
00055 }
00056
00057 }GroupedMessage;
00062 class FeeGroupedChannel{
00063
00064 public:
00065 FeeGroupedChannel(){};
00066 ~FeeGroupedChannel(){};
00067 FeeGroupedChannel(const FeeGroupedChannel& orig){
00068 gMsg = orig.gMsg;
00069 }
00070 FeeGroupedChannel& operator=(const FeeGroupedChannel& rhs){
00071 try{
00072 if(this == &rhs){
00073 return *this;
00074 }
00075 gMsg = rhs.gMsg;
00076
00077 }catch(...){}
00078 return *this;
00079 }
00080 GroupedMessage gMsg;
00081
00082 void setGroupedChannel(GroupedMessage* mes){
00083 gMsg = *mes;
00084 }
00085 };
00086 }}
00087 #endif
00088