/home/aconway/svn/qpid/cpp/lib/common/framing/ProtocolVersion.h

00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  * 
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  * 
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _ProtocolVersion_
00022 #define _ProtocolVersion_
00023 
00024 #include <amqp_types.h>
00025 
00026 namespace qpid
00027 {
00028 namespace framing
00029 {
00030 
00031 class ProtocolVersion
00032 {
00033 private:
00034     u_int8_t major_;
00035         u_int8_t minor_;
00036     
00037 public:
00038     ProtocolVersion();
00039     ProtocolVersion(u_int8_t _major, u_int8_t _minor);
00040     ProtocolVersion(const ProtocolVersion& p);
00041     virtual ~ProtocolVersion();
00042 
00043     inline u_int8_t getMajor() const { return major_; }
00044     inline void setMajor(u_int8_t major) { major_ = major; }
00045     inline u_int8_t getMinor() const { return minor_; }
00046     inline void setMinor(u_int8_t minor) { minor_ = minor; }
00047     virtual bool equals(u_int8_t _major, u_int8_t _minor) const;
00048     virtual bool equals(const ProtocolVersion& p) const;
00049     virtual const std::string toString() const;
00050     ProtocolVersion operator=(const ProtocolVersion& p);
00051 };
00052 
00053 } // namespace framing
00054 } // namespace qpid
00055 
00056 
00057 #endif // ifndef _ProtocolVersion_

Generated on Thu Jan 25 11:48:13 2007 for Qpid by  doxygen 1.5.1