DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
FSMxTransition.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _FSMxTransition_0_dunedaq__confmodel_0_confmodel_H_
4#define _FSMxTransition_0_dunedaq__confmodel_0_confmodel_H_
5
6#include <stdint.h> // to define 64 bits types
7#include <iostream>
8#include <sstream>
9#include <string>
10#include <map>
11#include <vector>
12
14#include "conffwk/DalObject.hpp"
15
16
17namespace dunedaq {
18 namespace confmodel {
19
21
22 friend class conffwk::Configuration;
23 friend class conffwk::DalObject;
24 friend class conffwk::DalFactory;
25 friend class conffwk::DalRegistry;
26
27 protected:
28
30 virtual ~FSMxTransition() noexcept;
31 virtual void init(bool init_children);
32
33 public:
34
37 static const std::string& s_class_name;
38
39
49 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
50
51
61 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
62
63
64 protected:
65
66 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
67
68
69 private:
70
71 std::string m_transition;
72 std::vector<std::string> m_order;
73 std::vector<std::string> m_mandatory;
74
75
76 public:
77
78 // attribute names
79
80 inline static const std::string s_transition = "transition";
81 inline static const std::string s_order = "order";
82 inline static const std::string s_mandatory = "mandatory";
83
84 static const std::string& __get_transition_str() noexcept { return s_transition; }
85 static const std::string& __get_order_str() noexcept { return s_order; }
86 static const std::string& __get_mandatory_str() noexcept { return s_mandatory; }
87
88
96 const std::string&
98 {
99 std::lock_guard scoped_lock(m_mutex);
100 check();
101 check_init();
102 return m_transition;
103 }
104
112 void
113 set_transition(const std::string& value)
114 {
115 std::lock_guard scoped_lock(m_mutex);
116 check();
117 clear();
119 }
120
121
128 const std::vector<std::string>&
129 get_order() const
130 {
131 std::lock_guard scoped_lock(m_mutex);
132 check();
133 check_init();
134 return m_order;
135 }
136
143 void
144 set_order(const std::vector<std::string>& value)
145 {
146 std::lock_guard scoped_lock(m_mutex);
147 check();
148 clear();
149 p_obj.set_by_val(s_order, value);
150 }
151
152
159 const std::vector<std::string>&
161 {
162 std::lock_guard scoped_lock(m_mutex);
163 check();
164 check_init();
165 return m_mandatory;
166 }
167
174 void
175 set_mandatory(const std::vector<std::string>& value)
176 {
177 std::lock_guard scoped_lock(m_mutex);
178 check();
179 clear();
181 }
182
183
184 };
185
186 // out stream operator
187
188 inline std::ostream& operator<<(std::ostream& s, const FSMxTransition& obj)
189 {
190 return obj.print_object(s);
191 }
192
193 typedef std::vector<const FSMxTransition*>::const_iterator FSMxTransitionIterator;
194
195 }
196}
197
198#endif
void set_by_val(const std::string &name, T value)
Set attribute value.
void set_by_ref(const std::string &name, T &value)
Set attribute value.
The base class for any generated DAL object.
Definition DalObject.hpp:45
std::mutex m_mutex
Used to protect changes of DAL object.
ConfigObject p_obj
Config object used by given template object.
void check_init() const
Check and initialize object if necessary.
DalRegistry: A registry of DalObjects It provides a single interface to create, cache and manage DalO...
static const std::string & __get_transition_str() noexcept
const std::vector< std::string > & get_mandatory() const
Get "mandatory" attribute value.
static const std::string & __get_mandatory_str() noexcept
void set_order(const std::vector< std::string > &value)
Set "order" attribute value.
static const std::string & s_class_name
static const std::string & __get_order_str() noexcept
void set_mandatory(const std::vector< std::string > &value)
Set "mandatory" attribute value.
static const std::string s_mandatory
virtual ~FSMxTransition() noexcept
std::vector< std::string > m_order
const std::vector< std::string > & get_order() const
Get "order" attribute value.
void set_transition(const std::string &value)
Set "transition" attribute value. The main transition that this pre/post transition applies to.
virtual std::vector< const dunedaq::conffwk::DalObject * > get(const std::string &name, bool upcast_unregistered=true) const
Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject...
const std::string & get_transition() const
Get "transition" attribute value. The main transition that this pre/post transition applies to.
std::vector< std::string > m_mandatory
FSMxTransition(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string s_order
virtual void init(bool init_children)
static const std::string s_transition
conffwk entry point
double offset
std::vector< constFSMxTransition * >::const_iterator FSMxTransitionIterator
std::ostream & operator<<(std::ostream &s, const ActionPlan &obj)
Including Qt Headers.