$treeview $search $mathjax $extrastylesheet
otsdaq
v2_03_00
$projectbrief
|
$projectbrief
|
$searchbox |
00001 #ifndef _ots_TableGroupKey_h_ 00002 #define _ots_TableGroupKey_h_ 00003 00004 #include <ostream> 00005 00006 namespace ots 00007 { 00008 // TableGroupKey is the type used for versions association with global configurations 00009 //(whereas TableVersion is the type used for version associated with a configuration 00010 // table) 00011 class TableGroupKey 00012 { 00013 public: 00014 explicit TableGroupKey(unsigned int key = INVALID); 00015 explicit TableGroupKey(char* const& groupString); 00016 explicit TableGroupKey(const std::string& groupString); 00017 virtual ~TableGroupKey(void); 00018 00019 unsigned int key(void) const; 00020 bool isInvalid(void) const; 00021 std::string toString(void) const; 00022 00023 // Operators 00024 TableGroupKey& operator=(const unsigned int key); 00025 bool operator==(unsigned int key) const; 00026 bool operator==(const TableGroupKey& key) const; 00027 bool operator!=(unsigned int key) const; 00028 bool operator!=(const TableGroupKey& key) const; 00029 bool operator<(const TableGroupKey& key) const; 00030 bool operator>(const TableGroupKey& key) const; 00031 00032 friend std::ostream& operator<<(std::ostream& out, const TableGroupKey& key) 00033 { 00034 out << key.toString(); 00035 return out; 00036 } 00037 00038 static TableGroupKey getNextKey(const TableGroupKey& key = TableGroupKey()); 00039 static std::string getFullGroupString(const std::string& groupName, 00040 const TableGroupKey& key); 00041 static void getGroupNameAndKey(const std::string& fullGroupString, 00042 std::string& groupName, 00043 TableGroupKey& key); 00044 static const unsigned int getDefaultKey(void); 00045 static const unsigned int getInvalidKey(void); 00046 00047 private: 00048 static const unsigned int INVALID; 00049 static const unsigned int DEFAULT; 00050 unsigned int key_; 00051 }; 00052 } // namespace ots 00053 #endif