/usr/share/cruisecontrol-bin-2.6.1/projects/qpid-trunk/cpp/src/gen/qpid/framing/Exchange010DeclareBody.h

00001 #ifndef QPID_FRAMING_EXCHANGE010DECLAREBODY_H
00002 #define QPID_FRAMING_EXCHANGE010DECLAREBODY_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/framing/AMQMethodBody.h"
00031 #include "qpid/framing/AMQP_ServerOperations.h"
00032 #include "qpid/framing/MethodBodyConstVisitor.h"
00033 #include "qpid/framing/ModelMethod.h"
00034 
00035 #include <ostream>
00036 #include "qpid/framing/amqp_types_full.h"
00037 
00038 namespace qpid {
00039 namespace framing {
00040 
00041 class Exchange010DeclareBody : public ModelMethod {
00042     string name;
00043     string type;
00044     string alternateExchange;
00045     FieldTable arguments;
00046     uint16_t flags;
00047 public:
00048     static const ClassId CLASS_ID = 7;
00049     static const MethodId METHOD_ID = 1;
00050     Exchange010DeclareBody(
00051         ProtocolVersion, const string& _name,
00052         const string& _type,
00053         const string& _alternateExchange,
00054         bool _passive,
00055         bool _durable,
00056         bool _autoDelete,
00057         const FieldTable& _arguments) : 
00058         name(_name),
00059         type(_type),
00060         alternateExchange(_alternateExchange),
00061         arguments(_arguments),
00062         flags(0){
00063         setPassive(_passive);
00064         setDurable(_durable);
00065         setAutoDelete(_autoDelete);
00066         flags |= (1 << 8);
00067         flags |= (1 << 9);
00068         flags |= (1 << 10);
00069         flags |= (1 << 14);
00070     }
00071     Exchange010DeclareBody(ProtocolVersion=ProtocolVersion())  : flags(0) {}
00072     
00073     void setName(const string& _name);
00074     const string& getName() const;
00075     bool hasName() const;
00076     void clearNameFlag();
00077     void setType(const string& _type);
00078     const string& getType() const;
00079     bool hasType() const;
00080     void clearTypeFlag();
00081     void setAlternateExchange(const string& _alternateExchange);
00082     const string& getAlternateExchange() const;
00083     bool hasAlternateExchange() const;
00084     void clearAlternateExchangeFlag();
00085     void setPassive(bool _passive);
00086     bool getPassive() const;
00087     void setDurable(bool _durable);
00088     bool getDurable() const;
00089     void setAutoDelete(bool _autoDelete);
00090     bool getAutoDelete() const;
00091     void setArguments(const FieldTable& _arguments);
00092     const FieldTable& getArguments() const;
00093     FieldTable& getArguments();
00094     bool hasArguments() const;
00095     void clearArgumentsFlag();
00096     typedef void ResultType;
00097 
00098     template <class T> ResultType invoke(T& invocable) const {
00099         return invocable.declare(getName(), getType(), getAlternateExchange(), getPassive(), getDurable(), getAutoDelete(), getArguments());
00100     }
00101 
00102     using  AMQMethodBody::accept;
00103     void accept(MethodBodyConstVisitor& v) const { v.visit(*this); }
00104 
00105     ClassId amqpClassId() const { return CLASS_ID; }
00106     MethodId amqpMethodId() const { return METHOD_ID; }
00107     bool isContentBearing() const { return  false; }
00108     bool resultExpected() const { return  false; }
00109     bool responseExpected() const { return  false; }
00110     void encode(Buffer&) const;
00111     void decode(Buffer&, uint32_t=0);
00112     void encodeStructBody(Buffer&) const;
00113     void decodeStructBody(Buffer&, uint32_t=0);
00114     uint32_t size() const;
00115     uint32_t bodySize() const;
00116     void print(std::ostream& out) const;
00117 }; /* class Exchange010DeclareBody */
00118 
00119 }}
00120 #endif  

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