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 123 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 78 of file config_api_get.cpp.

80{
81 std::vector<std::string> data;
82
83 switch ( attr.p_type )
84 {
85
87 data = get::attribute::read<bool> ( input, attr );
88 break;
89
91
93
95
97
100 break;
101
103 data = get::attribute::read<float> ( input, attr );
104 break;
105
107 data = get::attribute::read<double> ( input, attr );
108 break;
109
111 data = get::attribute::read<int8_t> ( input, attr );
112 break;
113
115 data = get::attribute::read<u_int8_t> ( input, attr );
116 break;
117
119 data = get::attribute::read<int16_t> ( input, attr );
120 break;
121
123 data = get::attribute::read<u_int16_t> ( input, attr );
124 break;
125
127 data = get::attribute::read<int32_t> ( input, attr );
128 break;
129
131 data = get::attribute::read<u_int32_t> ( input, attr );
132 break;
133
135 data = get::attribute::read<int64_t> ( input, attr );
136 break;
137
139 data = get::attribute::read<u_int64_t> ( input, attr );
140 break;
141 }
142
143 QStringList result;
144
145 for ( auto const & x : data )
146 {
147 result.push_back ( x.c_str() );
148 }
149
150 return result;
151
152}
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 66 of file config_api_get.cpp.

68{
69 T value;
70 input.get ( attr.p_name, value );
71 return value;
72}
void get(const std::string &name, T &value)
Get value of object's attribute or relationship.

Friends And Related Symbol Documentation

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

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

Definition at line 126 of file config_api_get.hpp.

◆ dbe::ui::config::info

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

Definition at line 125 of file config_api_get.hpp.


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