// Generated by the C++ Middleware Writer version 1.13 #include #include #include #include #include #include #include #include uint16_t const msg_id_login = 1201; uint16_t const msg_id_direct = 1202; uint16_t const msg_id_max = 1203; extern uint32_t msg_length_max; struct msg_shepherd { static void Send(SendCompressedBuffer* buf, const std::vector& abt1) { Counter cntr(msg_length_max); cntr.Add(sizeof(uint32_t)); groupCount(cntr, false, sizeof(uint16_t), abt1); buf->Receive(&msg_id_login, sizeof(msg_id_login)); buf->Receive(&cntr.value_, sizeof(cntr.value_)); groupSend(buf, false, abt1); buf->Flush(); } template static void Receive(B* buf, std::vector& abt1) { uint32_t headCount[1]; buf->Give(headCount[0]); abt1.reserve(abt1.size() + headCount[0]); for (; headCount[0] > 0; --headCount[0]) { account_info rep2(buf); abt1.push_back(rep2); } } static void Send(SendCompressedBuffer* buf, const bool abt1) { Counter cntr(msg_length_max); cntr.Add(sizeof(unsigned char)); buf->Receive(&cntr.value_, sizeof(cntr.value_)); boolSend(buf, abt1); buf->Flush(); } template static void Receive(B* buf, bool& abt1) { boolReceive(buf, abt1); } static void Send(SendCompressedBuffer* buf, const uint32_t abt1, const uint32_t abt2, const std::vector& abt3, const std::auto_ptr& abt4, const uint32_t abt5) { Counter cntr(msg_length_max); cntr.Add(sizeof(uint32_t)); cntr.Add(sizeof(uint32_t)); cntr.Add(sizeof(uint32_t)); groupCount(cntr, false, sizeof(uint16_t), abt3); abt4->CalculateMarshallingSize(cntr); cntr.Add(sizeof(uint32_t)); buf->Receive(&msg_id_direct, sizeof(msg_id_direct)); buf->Receive(&cntr.value_, sizeof(cntr.value_)); buf->Receive(&abt1, sizeof(uint32_t)); buf->Receive(&abt2, sizeof(uint32_t)); groupSend(buf, false, abt3); abt4->Send(buf, false); buf->Receive(&abt5, sizeof(uint32_t)); buf->Flush(); } template static void Receive(B* buf, uint32_t& abt1, std::vector& abt2, std::auto_ptr& abt3, uint32_t& abt4) { uint32_t headCount[1]; buf->Give(abt1); buf->Give(headCount[0]); abt2.reserve(abt2.size() + headCount[0]); for (; headCount[0] > 0; --headCount[0]) { File rep3(buf); abt2.push_back(rep3); } abt3.reset(new File(buf)); buf->Give(abt4); } static void Send(SendCompressedBuffer* buf, const uint32_t abt1, const bool abt2, const std::vector& abt3) { Counter cntr(msg_length_max); cntr.Add(sizeof(uint32_t)); cntr.Add(sizeof(unsigned char)); cntr.Add(sizeof(uint32_t)); groupCount(cntr, false, sizeof(uint16_t), abt3); buf->Receive(&cntr.value_, sizeof(cntr.value_)); buf->Receive(&abt1, sizeof(uint32_t)); boolSend(buf, abt2); groupSend(buf, false, abt3); buf->Flush(); } static void Send(SendCompressedBuffer* buf, const uint32_t abt1, const bool abt2, const flex_string& abt3) { Counter cntr(msg_length_max); cntr.Add(sizeof(uint32_t)); cntr.Add(sizeof(unsigned char)); stringCount(cntr, abt3); buf->Receive(&cntr.value_, sizeof(cntr.value_)); buf->Receive(&abt1, sizeof(uint32_t)); boolSend(buf, abt2); stringSend(buf, abt3); buf->Flush(); } template static void Receive(B* buf, uint32_t& abt1, bool& abt2) { buf->Give(abt1); boolReceive(buf, abt2); } template static void Receive(B* buf, std::vector& abt1) { uint32_t headCount[1]; buf->Give(headCount[0]); abt1.reserve(abt1.size() + headCount[0]); for (; headCount[0] > 0; --headCount[0]) { File rep4(buf); abt1.push_back(rep4); } } template static void Receive(B* buf, flex_string& abt1) { stringReceive(buf, abt1); } static void Send(SendCompressedBuffer* buf, const bool abt1, const flex_string& abt2) { Counter cntr(msg_length_max); cntr.Add(sizeof(unsigned char)); stringCount(cntr, abt2); buf->Receive(&cntr.value_, sizeof(cntr.value_)); boolSend(buf, abt1); stringSend(buf, abt2); buf->Flush(); } template static void Receive(B* buf, bool& abt1, flex_string& abt2) { boolReceive(buf, abt1); stringReceive(buf, abt2); } static void Send(SendCompressedBuffer* buf, const user_info& abt1) { Counter cntr(msg_length_max); abt1.CalculateMarshallingSize(cntr); buf->Receive(&cntr.value_, sizeof(cntr.value_)); abt1.Send(buf, false); buf->Flush(); } template static void Receive(B* buf, user_info& abt1) { abt1 = user_info(buf); } }; uint16_t const account_info_num = 7001; uint16_t const user_info_num = 7002; uint16_t const File_num = 7003; template inline account_info::account_info(B* buf) { buf->Give(accountnumber_); password_ = lil_string(buf); } inline void account_info::CalculateMarshallingSize(Counter& cntr) const { cntr.Add(sizeof(uint32_t)); password_.CalculateMarshallingSize(cntr); } inline void account_info::SendMemberData(SendCompressedBuffer* buf) const { buf->Receive(&accountnumber_, sizeof(uint32_t)); password_.Send(buf, false); } inline void account_info::SendTypeNum(SendCompressedBuffer* buf) const { buf->Receive(&account_info_num, sizeof(account_info_num)); } template inline user_info::user_info(B* buf) { buf->Give(accountNbr_); stringReceive(buf, directory_); stringReceive(buf, filename_); } inline void user_info::CalculateMarshallingSize(Counter& cntr) const { cntr.Add(sizeof(uint32_t)); stringCount(cntr, directory_); stringCount(cntr, filename_); } inline void user_info::SendMemberData(SendCompressedBuffer* buf) const { buf->Receive(&accountNbr_, sizeof(uint32_t)); stringSend(buf, directory_); stringSend(buf, filename_); } inline void user_info::SendTypeNum(SendCompressedBuffer* buf) const { buf->Receive(&user_info_num, sizeof(user_info_num)); }