DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Change.hpp
Go to the documentation of this file.
1
8#ifndef CONFFWK_CONFIGURATION__CHANGE_H_
9#define CONFFWK_CONFIGURATION__CHANGE_H_
10
11#include <string>
12#include <vector>
13#include <iostream>
14
15namespace dunedaq {
16namespace conffwk {
17
36
37 friend class Configuration;
38 friend class ConfigurationImpl;
39
40 public:
41
43
44 const std::string& get_class_name() const {return m_class_name;}
45
46
48
49 const std::vector<std::string>& get_modified_objs() const {return m_modified;}
50
51
53
54 const std::vector<std::string>& get_created_objs() const {return m_created;}
55
56
58
59 const std::vector<std::string>& get_removed_objs() const {return m_removed;}
60
61
80 static void add(std::vector<ConfigurationChange *>& changes,
81 const std::string& class_name,
82 const std::string& obj_id,
83 const char action);
84
93 static void clear(std::vector<ConfigurationChange *>& changes);
94
95
96 private:
97
100
101 ConfigurationChange(const std::string& name) : m_class_name(name) {}
102
103
104 private:
105
106 std::string m_class_name;
107
108 std::vector<std::string> m_modified;
109 std::vector<std::string> m_created;
110 std::vector<std::string> m_removed;
111
112};
113
116std::ostream& operator<<(std::ostream&, const ConfigurationChange&);
117
118
121std::ostream& operator<<(std::ostream&, const std::vector<ConfigurationChange *>&);
122
123} // namespace conffwk
124} // namespace dunedaq
125
126#endif // CONFFWK_CONFIGURATION__CHANGE_H_
Describes changes inside a class returned by the notification mechanism.
Definition Change.hpp:35
const std::vector< std::string > & get_created_objs() const
Return vector of identies of created objects.
Definition Change.hpp:54
std::vector< std::string > m_removed
Definition Change.hpp:110
ConfigurationChange & operator=(const ConfigurationChange &)
ConfigurationChange(const std::string &name)
Definition Change.hpp:101
static void clear(std::vector< ConfigurationChange * > &changes)
Helper method to clear vector of changes (pointers).
ConfigurationChange(const ConfigurationChange &)
std::vector< std::string > m_created
Definition Change.hpp:109
std::vector< std::string > m_modified
Definition Change.hpp:108
const std::string & get_class_name() const
Get name of class which objects were modified.
Definition Change.hpp:44
static void add(std::vector< ConfigurationChange * > &changes, const std::string &class_name, const std::string &obj_id, const char action)
Helper method to add object to the vector of existing changes.
const std::vector< std::string > & get_modified_objs() const
Return vector of identies of modified objects.
Definition Change.hpp:49
const std::vector< std::string > & get_removed_objs() const
Return vector of identies of removed objects.
Definition Change.hpp:59
Provides pure virtual interface used by the Configuration class.
Defines base class for cache of template objects.
std::ostream & operator<<(std::ostream &, const ConfigurationChange &)
Including Qt Headers.