Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _QPID_CONSOLE_CLASSKEY_H_
00022 #define _QPID_CONSOLE_CLASSKEY_H_
00023
00024 #include <string>
00025 #include "qpid/console/ConsoleImportExport.h"
00026 #include "qpid/console/Package.h"
00027 #include "qpid/framing/Buffer.h"
00028
00029 namespace qpid {
00030 namespace console {
00031
00036 class QPID_CONSOLE_EXTERN ClassKey {
00037 public:
00038 static const int HASH_SIZE = 16;
00039
00040 ClassKey(const std::string& package, const std::string& name, const uint8_t* hash);
00041
00042 const std::string& getPackageName() const { return package; }
00043 const std::string& getClassName() const { return name; }
00044 const uint8_t* getHash() const { return hash; }
00045 std::string getHashString() const;
00046 std::string str() const;
00047 bool operator==(const ClassKey& other) const;
00048 bool operator!=(const ClassKey& other) const;
00049 bool operator<(const ClassKey& other) const;
00050 bool operator>(const ClassKey& other) const;
00051 bool operator<=(const ClassKey& other) const;
00052 bool operator>=(const ClassKey& other) const;
00053 void encode(framing::Buffer& buffer) const;
00054
00055 private:
00056 std::string package;
00057 std::string name;
00058 uint8_t hash[HASH_SIZE];
00059 };
00060
00061 QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const ClassKey& k);
00062 }
00063 }
00064
00065
00066 #endif