DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Change.hpp
Go to the documentation of this file.
1//
2// DUNE DAQ modification notice:
3// This file has been modified from the original ATLAS config source for the DUNE DAQ project.
4// Fork baseline commit: 67a24e731 (2022-10-27).
5// Renamed since fork: yes (from config/Change.h to include/conffwk/Change.hpp).
6//
7
14
15#ifndef CONFFWK_CONFIGURATION__CHANGE_H_
16#define CONFFWK_CONFIGURATION__CHANGE_H_
17
18#include <string>
19#include <vector>
20#include <iostream>
21
22namespace dunedaq {
23namespace conffwk {
24
41
43
44 friend class Configuration;
45 friend class ConfigurationImpl;
46
47 public:
48
50
51 const std::string& get_class_name() const {return m_class_name;}
52
53
55
56 const std::vector<std::string>& get_modified_objs() const {return m_modified;}
57
58
60
61 const std::vector<std::string>& get_created_objs() const {return m_created;}
62
63
65
66 const std::vector<std::string>& get_removed_objs() const {return m_removed;}
67
68
86
87 static void add(std::vector<ConfigurationChange *>& changes,
88 const std::string& class_name,
89 const std::string& obj_id,
90 const char action);
91
99
100 static void clear(std::vector<ConfigurationChange *>& changes);
101
102
103 private:
104
107
108 ConfigurationChange(const std::string& name) : m_class_name(name) {}
109
110
111 private:
112
113 std::string m_class_name;
114
115 std::vector<std::string> m_modified;
116 std::vector<std::string> m_created;
117 std::vector<std::string> m_removed;
118
119};
120
122
123std::ostream& operator<<(std::ostream&, const ConfigurationChange&);
124
125
127
128std::ostream& operator<<(std::ostream&, const std::vector<ConfigurationChange *>&);
129
130} // namespace conffwk
131} // namespace dunedaq
132
133#endif // CONFFWK_CONFIGURATION__CHANGE_H_
Describes changes inside a class returned by the notification mechanism.
Definition Change.hpp:42
const std::vector< std::string > & get_created_objs() const
Return vector of identies of created objects.
Definition Change.hpp:61
std::vector< std::string > m_removed
Definition Change.hpp:117
ConfigurationChange & operator=(const ConfigurationChange &)
ConfigurationChange(const std::string &name)
Definition Change.hpp:108
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:116
std::vector< std::string > m_modified
Definition Change.hpp:115
const std::string & get_class_name() const
Get name of class which objects were modified.
Definition Change.hpp:51
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:56
const std::vector< std::string > & get_removed_objs() const
Return vector of identies of removed objects.
Definition Change.hpp:66
std::ostream & operator<<(std::ostream &, const ConfigurationChange &)
Including Qt Headers.
Definition module.cpp:16