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 <iostream>
19#include <string>
20#include <vector>
21
22namespace dunedaq {
23namespace conffwk {
24
41
43{
44
45 friend class Configuration;
46 friend class ConfigurationImpl;
47
48public:
50
51 const std::string& get_class_name() const { return m_class_name; }
52
54
55 const std::vector<std::string>& get_modified_objs() const { return m_modified; }
56
58
59 const std::vector<std::string>& get_created_objs() const { return m_created; }
60
62
63 const std::vector<std::string>& get_removed_objs() const { return m_removed; }
64
82
83 static void add(std::vector<ConfigurationChange*>& changes,
84 const std::string& class_name,
85 const std::string& obj_id,
86 const char action);
87
95
96 static void clear(std::vector<ConfigurationChange*>& changes);
97
98private:
101
102 ConfigurationChange(const std::string& name)
103 : m_class_name(name)
104 {
105 }
106
107private:
108 std::string m_class_name;
109
110 std::vector<std::string> m_modified;
111 std::vector<std::string> m_created;
112 std::vector<std::string> m_removed;
113};
114
116
117std::ostream&
118operator<<(std::ostream&, const ConfigurationChange&);
119
121
122std::ostream&
123operator<<(std::ostream&, const std::vector<ConfigurationChange*>&);
124
125} // namespace conffwk
126} // namespace dunedaq
127
128#endif // CONFFWK_CONFIGURATION__CHANGE_H_
Describes changes inside a class returned by the notification mechanism.
Definition Change.hpp:43
const std::vector< std::string > & get_created_objs() const
Return vector of identies of created objects.
Definition Change.hpp:59
std::vector< std::string > m_removed
Definition Change.hpp:112
ConfigurationChange & operator=(const ConfigurationChange &)
ConfigurationChange(const std::string &name)
Definition Change.hpp:102
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:111
std::vector< std::string > m_modified
Definition Change.hpp:110
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:55
const std::vector< std::string > & get_removed_objs() const
Return vector of identies of removed objects.
Definition Change.hpp:63
std::ostream & operator<<(std::ostream &, const ConfigurationChange &)
The DUNE-DAQ namespace.