/usr/share/cruisecontrol-bin-2.6.1/projects/qpid-trunk/cpp/src/gen/qpid/amqp_0_10/ControlHolder.h

00001 #ifndef QPID_AMQP_0_10_CONTROLHOLDER_H
00002 #define QPID_AMQP_0_10_CONTROLHOLDER_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 #include "qpid/amqp_0_10/ApplyControl.h"
00031 #include "qpid/amqp_0_10/Holder.h"
00032 
00033 namespace qpid {
00034 namespace amqp_0_10 {
00035 
00036 
00037 namespace control_max {
00038 
00039 template <class M, class X> struct Max
00040 {
00041     static const size_t max=(M::max > sizeof(X)) ? M::max : sizeof(X);
00042 };
00043 struct Max000 { static const size_t max=0; };
00044 typedef Max<Max000, connection::Start> Max001;
00045 typedef Max<Max001, connection::StartOk> Max002;
00046 typedef Max<Max002, connection::Secure> Max003;
00047 typedef Max<Max003, connection::SecureOk> Max004;
00048 typedef Max<Max004, connection::Tune> Max005;
00049 typedef Max<Max005, connection::TuneOk> Max006;
00050 typedef Max<Max006, connection::Open> Max007;
00051 typedef Max<Max007, connection::OpenOk> Max008;
00052 typedef Max<Max008, connection::Redirect> Max009;
00053 typedef Max<Max009, connection::Heartbeat> Max010;
00054 typedef Max<Max010, connection::Close> Max011;
00055 typedef Max<Max011, connection::CloseOk> Max012;
00056 typedef Max<Max012, session::Attach> Max013;
00057 typedef Max<Max013, session::Attached> Max014;
00058 typedef Max<Max014, session::Detach> Max015;
00059 typedef Max<Max015, session::Detached> Max016;
00060 typedef Max<Max016, session::RequestTimeout> Max017;
00061 typedef Max<Max017, session::Timeout> Max018;
00062 typedef Max<Max018, session::CommandPoint> Max019;
00063 typedef Max<Max019, session::Expected> Max020;
00064 typedef Max<Max020, session::Confirmed> Max021;
00065 typedef Max<Max021, session::Completed> Max022;
00066 typedef Max<Max022, session::KnownCompleted> Max023;
00067 typedef Max<Max023, session::Flush> Max024;
00068 typedef Max<Max024, session::Gap> Max025;
00069 static const int MAX=Max025::max;
00070 
00071 } // namespace control_max
00072 
00073 struct ControlHolder:
00074     public amqp_0_10::Holder<ControlHolder, Control, control_max::MAX>
00075 {
00076     ControlHolder() {}
00077     template <class T> explicit ControlHolder(const T& t) : amqp_0_10::Holder<ControlHolder, Control, control_max::MAX>(t) {}
00078     using amqp_0_10::Holder<ControlHolder, Control, control_max::MAX>::operator=;
00079     void set(uint8_t classCode, uint8_t code);
00080 };
00081 
00082 std::ostream& operator<<(std::ostream& o, const ControlHolder& h);
00083 
00084 }} // namespace qpid::amqp_0_10
00085 
00086 #endif  

Generated on Thu Apr 10 11:08:15 2008 for Qpid by  doxygen 1.4.7