00001 #ifndef QPID_AMQP_0_10_STRUCTHOLDER_H
00002 #define QPID_AMQP_0_10_STRUCTHOLDER_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00028
00029
00030 #include "qpid/amqp_0_10/ApplyStruct.h"
00031 #include "qpid/amqp_0_10/Holder.h"
00032 #include "qpid/amqp_0_10/structs.h"
00033
00034 namespace qpid {
00035 namespace amqp_0_10 {
00036
00037
00038 namespace struct_max {
00039
00040 static const size_t MAX000=0;
00041 static const size_t MAX001 = sizeof(message::DeliveryProperties) > MAX000 ? sizeof(message::DeliveryProperties) : MAX000;
00042 static const size_t MAX002 = sizeof(message::FragmentProperties) > MAX001 ? sizeof(message::FragmentProperties) : MAX001;
00043 static const size_t MAX003 = sizeof(message::MessageProperties) > MAX002 ? sizeof(message::MessageProperties) : MAX002;
00044 static const size_t MAX004 = sizeof(message::Acquired) > MAX003 ? sizeof(message::Acquired) : MAX003;
00045 static const size_t MAX005 = sizeof(message::MessageResumeResult) > MAX004 ? sizeof(message::MessageResumeResult) : MAX004;
00046 static const size_t MAX006 = sizeof(dtx::XaResult) > MAX005 ? sizeof(dtx::XaResult) : MAX005;
00047 static const size_t MAX007 = sizeof(dtx::Xid) > MAX006 ? sizeof(dtx::Xid) : MAX006;
00048 static const size_t MAX008 = sizeof(dtx::GetTimeoutResult) > MAX007 ? sizeof(dtx::GetTimeoutResult) : MAX007;
00049 static const size_t MAX009 = sizeof(dtx::RecoverResult) > MAX008 ? sizeof(dtx::RecoverResult) : MAX008;
00050 static const size_t MAX010 = sizeof(exchange::ExchangeQueryResult) > MAX009 ? sizeof(exchange::ExchangeQueryResult) : MAX009;
00051 static const size_t MAX011 = sizeof(exchange::ExchangeBoundResult) > MAX010 ? sizeof(exchange::ExchangeBoundResult) : MAX010;
00052 static const size_t MAX012 = sizeof(queue::QueueQueryResult) > MAX011 ? sizeof(queue::QueueQueryResult) : MAX011;
00053 static const size_t MAX013 = sizeof(file::FileProperties) > MAX012 ? sizeof(file::FileProperties) : MAX012;
00054 static const size_t MAX014 = sizeof(stream::StreamProperties) > MAX013 ? sizeof(stream::StreamProperties) : MAX013;
00055 static const size_t MAX015 = sizeof(UnknownStruct) > MAX014 ? sizeof(UnknownStruct) : MAX014;
00056 static const int MAX=MAX015;
00057
00058 }
00059
00060 struct StructHolder:
00061 public amqp_0_10::Holder<StructHolder, Struct, struct_max::MAX>
00062 {
00063 StructHolder() {}
00064 template <class T> explicit StructHolder(const T& t) : amqp_0_10::Holder<StructHolder, Struct, struct_max::MAX>(t) {}
00065 using amqp_0_10::Holder<StructHolder, Struct, struct_max::MAX>::operator=;
00066 void set(uint8_t classCode, uint8_t code);
00067 };
00068
00069 std::ostream& operator<<(std::ostream& o, const StructHolder& h);
00070
00071 }}
00072
00073 #endif