00001 #ifndef QPID_AMQP_0_10_CODEFORTYPE_H
00002 #define QPID_AMQP_0_10_CODEFORTYPE_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/built_in_types.h"
00031
00032 namespace qpid {
00033 namespace amqp_0_10 {
00034
00035
00036 template <class T> struct CodeForType;
00037
00038 template <> struct CodeForType<Bin8> { static const uint8_t value; };
00039 template <> struct CodeForType<Int8> { static const uint8_t value; };
00040 template <> struct CodeForType<Uint8> { static const uint8_t value; };
00041 template <> struct CodeForType<Char> { static const uint8_t value; };
00042 template <> struct CodeForType<Boolean> { static const uint8_t value; };
00043 template <> struct CodeForType<Bin16> { static const uint8_t value; };
00044 template <> struct CodeForType<Int16> { static const uint8_t value; };
00045 template <> struct CodeForType<Uint16> { static const uint8_t value; };
00046 template <> struct CodeForType<Bin32> { static const uint8_t value; };
00047 template <> struct CodeForType<Int32> { static const uint8_t value; };
00048 template <> struct CodeForType<Uint32> { static const uint8_t value; };
00049 template <> struct CodeForType<Float> { static const uint8_t value; };
00050 template <> struct CodeForType<CharUtf32> { static const uint8_t value; };
00051 template <> struct CodeForType<Bin64> { static const uint8_t value; };
00052 template <> struct CodeForType<Int64> { static const uint8_t value; };
00053 template <> struct CodeForType<Uint64> { static const uint8_t value; };
00054 template <> struct CodeForType<Double> { static const uint8_t value; };
00055 template <> struct CodeForType<Datetime> { static const uint8_t value; };
00056 template <> struct CodeForType<Bin128> { static const uint8_t value; };
00057 template <> struct CodeForType<Uuid> { static const uint8_t value; };
00058 template <> struct CodeForType<Bin256> { static const uint8_t value; };
00059 template <> struct CodeForType<Bin512> { static const uint8_t value; };
00060 template <> struct CodeForType<Bin1024> { static const uint8_t value; };
00061 template <> struct CodeForType<Vbin8> { static const uint8_t value; };
00062 template <> struct CodeForType<Str8Latin> { static const uint8_t value; };
00063 template <> struct CodeForType<Str8> { static const uint8_t value; };
00064 template <> struct CodeForType<Str8Utf16> { static const uint8_t value; };
00065 template <> struct CodeForType<Vbin16> { static const uint8_t value; };
00066 template <> struct CodeForType<Str16Latin> { static const uint8_t value; };
00067 template <> struct CodeForType<Str16> { static const uint8_t value; };
00068 template <> struct CodeForType<Str16Utf16> { static const uint8_t value; };
00069 template <> struct CodeForType<Vbin32> { static const uint8_t value; };
00070 template <> struct CodeForType<Map> { static const uint8_t value; };
00071 template <> struct CodeForType<List> { static const uint8_t value; };
00072 template <> struct CodeForType<Array> { static const uint8_t value; };
00073 template <> struct CodeForType<Struct32> { static const uint8_t value; };
00074 template <> struct CodeForType<Bin40> { static const uint8_t value; };
00075 template <> struct CodeForType<Dec32> { static const uint8_t value; };
00076 template <> struct CodeForType<Bin72> { static const uint8_t value; };
00077 template <> struct CodeForType<Dec64> { static const uint8_t value; };
00078 template <> struct CodeForType<Void> { static const uint8_t value; };
00079 template <> struct CodeForType<Bit> { static const uint8_t value; };
00080
00081 template <class T> uint8_t codeFor(const T&) { return CodeForType<T>::value; }
00082
00083 }}
00084
00085 #endif