// Generated by the C++ Middleware Writer version 1.13 #include #include #include #include #include using boost::intrusive::rbtree; extern uint32_t msg_length_max; struct message_manager { static void Send(SendBuffer* buf, const rbtree& abt1) { Counter cntr(msg_length_max); cntr.Add(sizeof(int)); groupCount(cntr, true, sizeof(uint16_t), abt1); buf->Receive(&cntr.value_, sizeof(cntr.value_)); groupSend(buf, true, abt1); buf->Flush(); } template static void Receive(B* buf, rbtree& abt1) { rbtreeReceive(buf, abt1); } }; uint16_t const Base_num = 7001; uint16_t const Derived_num = 7002; template inline Base* Base::BuildPolyInstance(B* buf) { uint16_t type_num; buf->Give(type_num); switch (type_num) { case Base_num: return new Base(buf); case Derived_num: return new Derived(buf); default: throw failure("Base::BuildPolyInstance: Unknown type"); } } template inline Base::Base(B* buf) { buf->Give(b_); } inline void Base::CalculateMarshallingSize(Counter& cntr) const { cntr.Add(sizeof(uint32_t)); } inline void Base::SendMemberData(SendBuffer* buf) const { buf->Receive(&b_, sizeof(uint32_t)); } inline void Base::SendTypeNum(SendBuffer* buf) const { buf->Receive(&Base_num, sizeof(Base_num)); } template inline Derived::Derived(B* buf) : Base(buf) { stringReceive(buf, s_); } inline void Derived::CalculateMarshallingSize(Counter& cntr) const { Base::CalculateMarshallingSize(cntr); stringCount(cntr, s_); } inline void Derived::SendMemberData(SendBuffer* buf) const { Base::SendMemberData(buf); stringSend(buf, s_); } inline void Derived::SendTypeNum(SendBuffer* buf) const { buf->Receive(&Derived_num, sizeof(Derived_num)); }