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

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

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