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 128 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 83 of file config_api_get.cpp.

85{
86 std::vector<std::string> data;
87
88 switch ( attr.p_type )
89 {
90
92 data = get::attribute::read<bool> ( input, attr );
93 break;
94
96
98
100
102
104 data = get::attribute::read<std::string> ( input, attr );
105 break;
106
108 data = get::attribute::read<float> ( input, attr );
109 break;
110
112 data = get::attribute::read<double> ( input, attr );
113 break;
114
116 data = get::attribute::read<int8_t> ( input, attr );
117 break;
118
120 data = get::attribute::read<u_int8_t> ( input, attr );
121 break;
122
124 data = get::attribute::read<int16_t> ( input, attr );
125 break;
126
128 data = get::attribute::read<u_int16_t> ( input, attr );
129 break;
130
132 data = get::attribute::read<int32_t> ( input, attr );
133 break;
134
136 data = get::attribute::read<u_int32_t> ( input, attr );
137 break;
138
140 data = get::attribute::read<int64_t> ( input, attr );
141 break;
142
144 data = get::attribute::read<u_int64_t> ( input, attr );
145 break;
146 }
147
148 QStringList result;
149
150 for ( auto const & x : data )
151 {
152 result.push_back ( x.c_str() );
153 }
154
155 return result;
156
157}
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 71 of file config_api_get.cpp.

73{
74 T value;
75 input.get ( attr.p_name, value );
76 return value;
77}
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 131 of file config_api_get.hpp.

◆ dbe::ui::config::info

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

Definition at line 130 of file config_api_get.hpp.


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