DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dbe::config::api::get::direct Class Reference

#include <config_api_get.hpp>

Static Private Member Functions

template<typename T>
static T attribute (dunedaq::conffwk::ConfigObject &, dunedaq::conffwk::attribute_t const &)
template<>
QStringList attribute (ConfigObject &input, dunedaq::conffwk::attribute_t const &attr)

Friends

class dbe::ui::config::info
class dbe::config::api::get::attribute

Detailed Description

Provide direct access methods to config layer for retrieval of attribute values

Definition at line 118 of file config_api_get.hpp.

Member Function Documentation

◆ attribute() [1/2]

template<>
QStringList dbe::config::api::get::direct::attribute ( ConfigObject & input,
dunedaq::conffwk::attribute_t const & attr )
staticprivate

Definition at line 73 of file config_api_get.cpp.

75{
76 std::vector<std::string> data;
77
78 switch (attr.p_type) {
79
81 data = get::attribute::read<bool>(input, attr);
82 break;
83
85
87
89
91
94 break;
95
97 data = get::attribute::read<float>(input, attr);
98 break;
99
101 data = get::attribute::read<double>(input, attr);
102 break;
103
105 data = get::attribute::read<int8_t>(input, attr);
106 break;
107
110 break;
111
113 data = get::attribute::read<int16_t>(input, attr);
114 break;
115
118 break;
119
121 data = get::attribute::read<int32_t>(input, attr);
122 break;
123
126 break;
127
129 data = get::attribute::read<int64_t>(input, attr);
130 break;
131
134 break;
135 }
136
137 QStringList result;
138
139 for (auto const& x : data) {
140 result.push_back(x.c_str());
141 }
142
143 return result;
144}
static std::vector< std::string > read(dunedaq::conffwk::ConfigObject &, dunedaq::conffwk::attribute_t const &)

◆ attribute() [2/2]

template<typename T>
T dbe::config::api::get::direct::attribute ( dunedaq::conffwk::ConfigObject & input,
dunedaq::conffwk::attribute_t const & attr )
inlinestaticprivate

Definition at line 62 of file config_api_get.cpp.

63{
64 T value;
65 input.get(attr.p_name, value);
66 return value;
67}
void get(const std::string &name, T &value)
Get value of object's attribute or relationship.

◆ dbe::config::api::get::attribute

friend class dbe::config::api::get::attribute
friend

Definition at line 121 of file config_api_get.hpp.

◆ dbe::ui::config::info

friend class dbe::ui::config::info
friend

Definition at line 120 of file config_api_get.hpp.


The documentation for this class was generated from the following files: