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

#include <config_api_graph.hpp>

Static Private Member Functions

template<typename T>
static T linked (dunedaq::conffwk::ConfigObject &item, dunedaq::conffwk::relationship_t const &relation)
template<typename T>
static T linked (dunedaq::conffwk::ConfigObject &item, dunedaq::conffwk::attribute_t const &relation)
template<>
QStringList linked (ConfigObject &input, dunedaq::conffwk::relationship_t const &relation)

Friends

class dbe::ui::config::info

Detailed Description

Provide direct access to config object methods for retrieval

Definition at line 151 of file config_api_graph.hpp.

Member Function Documentation

◆ linked() [1/3]

template<>
QStringList dbe::config::api::graph::direct::linked ( ConfigObject & input,
dunedaq::conffwk::relationship_t const & relation )
inlinestaticprivate

Definition at line 217 of file config_api_graph.cpp.

219{
220 QStringList result;
221 std::vector<ConfigObject> adjacent;
222
223 if (info::relation::is_simple(relation)) {
224 adjacent = { direct::linked<ConfigObject>(input, relation) };
225 } else {
227 }
228
229 for (auto const& x : adjacent) {
230 result.push_back(x.UID().c_str());
231 }
232
233 return result;
234}
static T linked(dunedaq::conffwk::ConfigObject &item, dunedaq::conffwk::relationship_t const &relation)
T relation(tref item, dunedaq::conffwk::relationship_t const &relation)
bool is_simple(dunedaq::conffwk::relationship_t const &)

◆ linked() [2/3]

template<typename T>
T dbe::config::api::graph::direct::linked ( dunedaq::conffwk::ConfigObject & item,
dunedaq::conffwk::attribute_t const & relation )
inlinestaticprivate

Get object reference/s through a specified relation, acting directly on a ConfigObject

e.g. A-C->B

returns B for object A through relation C

Parameters
itemis the object to retrieve the relation value
relationis the relation to retrieve the value for
Returns
the value of the relation converted to the specified type

Definition at line 209 of file config_api_graph.cpp.

210{
211 T value;
212 input.get(relation.p_name, value);
213 return value;
214}

◆ linked() [3/3]

template<typename T>
T dbe::config::api::graph::direct::linked ( dunedaq::conffwk::ConfigObject & item,
dunedaq::conffwk::relationship_t const & relation )
inlinestaticprivate

Get object reference/s through a specified relation, acting directly on a ConfigObject

e.g. A-C->B

returns B for object A through relation C

Parameters
itemis the object to retrieve the relation value
relationis the relation to retrieve the value for
Returns
the value of the relation converted to the specified type

Definition at line 143 of file config_api_graph.cpp.

144{
145 T value;
146 input.get(relation.p_name, value);
147 return value;
148}

◆ dbe::ui::config::info

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

Definition at line 153 of file config_api_graph.hpp.


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