Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
ClassKey.h
Go to the documentation of this file.
1 /*
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements. See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership. The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License. You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied. See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  */
21 #ifndef _QPID_CONSOLE_CLASSKEY_H_
22 #define _QPID_CONSOLE_CLASSKEY_H_
23 
24 #include <string>
26 #include "qpid/console/Package.h"
27 #include "qpid/framing/Buffer.h"
28 
29 namespace qpid {
30 namespace console {
31 
37  public:
38  QPID_CONSOLE_EXTERN static const int HASH_SIZE = 16;
39 
40  QPID_CONSOLE_EXTERN ClassKey(const std::string& package, const std::string& name, const uint8_t* hash);
41 
42  const QPID_CONSOLE_EXTERN std::string& getPackageName() const { return package; }
43  const QPID_CONSOLE_EXTERN std::string& getClassName() const { return name; }
44  const QPID_CONSOLE_EXTERN uint8_t* getHash() const { return hash; }
45  QPID_CONSOLE_EXTERN std::string getHashString() const;
46  QPID_CONSOLE_EXTERN std::string str() const;
47  QPID_CONSOLE_EXTERN bool operator==(const ClassKey& other) const;
48  QPID_CONSOLE_EXTERN bool operator!=(const ClassKey& other) const;
49  QPID_CONSOLE_EXTERN bool operator<(const ClassKey& other) const;
50  QPID_CONSOLE_EXTERN bool operator>(const ClassKey& other) const;
51  QPID_CONSOLE_EXTERN bool operator<=(const ClassKey& other) const;
52  QPID_CONSOLE_EXTERN bool operator>=(const ClassKey& other) const;
53  QPID_CONSOLE_EXTERN void encode(framing::Buffer& buffer) const;
54 
55  private:
56  std::string package;
57  std::string name;
58  uint8_t hash[HASH_SIZE];
59  };
60 
61  QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const ClassKey& k);
62 }
63 }
64 
65 
66 #endif
unsigned char uint8_t
Definition: IntegerTypes.h:24
std::ostream & operator<<(std::ostream &o, const Agent &agent)
const std::string & getClassName() const
Definition: ClassKey.h:43
bool operator>(const AbsTime &a, const AbsTime &b)
Definition: Time.h:134
#define QPID_CONSOLE_CLASS_EXTERN
bool operator<(const AbsTime &a, const AbsTime &b)
Definition: Time.h:132
QPID_TYPES_EXTERN bool operator<=(const Uuid &, const Uuid &)
const uint8_t * getHash() const
Definition: ClassKey.h:44
QPID_TYPES_EXTERN bool operator>=(const Uuid &, const Uuid &)
const std::string & getPackageName() const
Definition: ClassKey.h:42
void encode(const qpid::types::Variant::Map &map, Message &message, const std::string &encoding=std::string())
Encodes a Variant::Map into a message.
bool operator==(const Address &x, const Address &y)
bool operator!=(const Address &x, const Address &y)
#define QPID_CONSOLE_EXTERN

Qpid C++ API Reference
Generated on Fri Nov 1 2013 for Qpid C++ Client API by doxygen 1.8.5