|
DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
Describes a subscription criteria. More...
#include <SubscriptionCriteria.hpp>
Public Types | |
| typedef std::map< std::string, std::set< std::string > > | ObjectMap |
| The map stores full subsription information. | |
Public Member Functions | |
| void | add (const std::string &class_name) |
| Add subscribtion on class changes. | |
| void | add (const std::string &class_name, const std::string &object_id) |
| Add subscribtion on object changes by class name and object id. | |
| void | add (const DalObject &object) |
| Add subscribtion on object changes by object's reference. | |
| void | remove (const std::string &class_name) |
| Remove subscribtion on class changes. | |
| void | remove (const std::string &class_name, const std::string &object_id) |
| Remove subscribtion on object changes by class name and object id. | |
| void | remove (const DalObject &object) |
| Remove subscribtion on object changes by reference. | |
| const std::set< std::string > & | get_classes_subscription () const |
| const ObjectMap & | get_objects_subscription () const |
Private Attributes | |
| std::set< std::string > | m_classes_subscription |
| ObjectMap | m_objects_subscription |
Describes a subscription criteria.
The class provides interfaces to describe a subscription criteria on configuration modifications. A user creates an object of given class and describes criteria using add(const std::string&, const std::string&) and add(const std::string&) methods.
When the subscription criteria is ready, it is necessary to use Configuration::subscribe() method providing subscription criteria and callback. When database information is modified and it matches the criteria, the user's callback with such changes will be invoked.
Definition at line 42 of file SubscriptionCriteria.hpp.
| typedef std::map< std::string , std::set<std::string> > dunedaq::conffwk::ConfigurationSubscriptionCriteria::ObjectMap |
The map stores full subsription information.
Definition at line 126 of file SubscriptionCriteria.hpp.
| void dunedaq::conffwk::ConfigurationSubscriptionCriteria::add | ( | const DalObject & | object | ) |
Add subscribtion on object changes by object's reference.
Subscribe on changes of object by object's reference. To be used for an object of class generated by genconffwk.
| object | reference to object |
Definition at line 27 of file SubscriptionCriteria.cpp.
| void dunedaq::conffwk::ConfigurationSubscriptionCriteria::add | ( | const std::string & | class_name | ) |
Add subscribtion on class changes.
The notification mechanism is started by the Configuration::subscribe() method. The user callback function passed to this method will be invoked in case of any modification of an object of this class or objects of derived classes.
| class_name | name of the class |
Definition at line 15 of file SubscriptionCriteria.cpp.
| void dunedaq::conffwk::ConfigurationSubscriptionCriteria::add | ( | const std::string & | class_name, |
| const std::string & | object_id ) |
Add subscribtion on object changes by class name and object id.
Subscribe on changes of object by class name and object identity.
| class_name | name of the class |
| object_id | object identity |
Definition at line 21 of file SubscriptionCriteria.cpp.
|
inline |
Return list of names of classes with subsriptions on any changes.
Definition at line 135 of file SubscriptionCriteria.hpp.
|
inline |
Return list of objects subsribed on notification in case of changes.
Definition at line 142 of file SubscriptionCriteria.hpp.
| void dunedaq::conffwk::ConfigurationSubscriptionCriteria::remove | ( | const DalObject & | object | ) |
Remove subscribtion on object changes by reference.
Removes subscription on object changes previously made with add(const std::string&, const std::string&) or add(const DalObject&) methods. To be used for an object of class generated by genconffwk.
| object | reference to object |
Definition at line 53 of file SubscriptionCriteria.cpp.
| void dunedaq::conffwk::ConfigurationSubscriptionCriteria::remove | ( | const std::string & | class_name | ) |
Remove subscribtion on class changes.
Removes subscription on class changes previously made with add(const std::string&) method.
| class_name | name of the class |
Definition at line 33 of file SubscriptionCriteria.cpp.
| void dunedaq::conffwk::ConfigurationSubscriptionCriteria::remove | ( | const std::string & | class_name, |
| const std::string & | object_id ) |
Remove subscribtion on object changes by class name and object id.
Removes subscription on object changes previously made with add(const std::string&, const std::string&) or add(const DalObject&) methods.
| class_name | name of the class |
| object_id | object identity |
Definition at line 39 of file SubscriptionCriteria.cpp.
|
private |
Definition at line 147 of file SubscriptionCriteria.hpp.
|
private |
Definition at line 148 of file SubscriptionCriteria.hpp.