NotificationID.h

Go to the documentation of this file.
00001 // Copyright CERN 2012 - Developed in collaboration with GSI
00002 
00003 #ifndef NOTIFICATION_ID_H_
00004 #define NOTIFICATION_ID_H_
00005 
00006 #include <string>
00007 #include <set>
00008 
00009 #include <stdint.h>
00010 
00011 namespace fesa
00012 {
00013 
00019 class NotificationID
00020 {
00021   public:
00022 
00030     NotificationID(uint32_t idKey, const std::string& className, const std::set<std::string>& deviceCol,
00031                    const std::set<std::string>& notifiedPropertyCol);
00032 
00036     ~NotificationID();
00037 
00042     const std::string& getClassName();
00043 
00048     const std::set<std::string>& getPropertyCol();
00049 
00054     const std::set<std::string>& getDeviceCol();
00055 
00060     uint32_t getIDKey();
00061 
00068     bool contains(const std::string& propName, const std::string& deviceName);
00069 
00074     void addDevice(const std::string& deviceName);
00075 
00080     void addProperty(const std::string& propertyName);
00081 
00082   private:
00083 
00087     uint32_t idKey_;
00088 
00092     std::string className_;
00093 
00097     std::set<std::string> deviceCol_;
00098 
00102     std::set<std::string> notifiedPropertyCol_;
00103 };
00104 
00105 /********************* INLINE METHODS **************************************/
00106 
00107 inline void NotificationID::addDevice(const std::string& deviceName)
00108 {
00109     deviceCol_.insert(deviceName);
00110 }
00111 
00112 inline void NotificationID::addProperty(const std::string& propertyName)
00113 {
00114     notifiedPropertyCol_.insert(propertyName);
00115 }
00116 
00117 inline const std::string& NotificationID::getClassName()
00118 {
00119     return className_;
00120 }
00121 
00122 inline const std::set<std::string>& NotificationID::getPropertyCol()
00123 {
00124     return notifiedPropertyCol_;
00125 }
00126 
00127 inline const std::set<std::string>& NotificationID::getDeviceCol()
00128 {
00129     return deviceCol_;
00130 }
00131 
00132 inline uint32_t NotificationID::getIDKey()
00133 {
00134     return idKey_;
00135 }
00136 
00137 } // fesa
00138 
00139 #endif // NOTIFICATION_ID_H

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1