DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dbe::config_object_extractor< C > Class Template Reference

#include <confobject_extra.hpp>

Public Types

typedef C::t_confobjects t_confobjects
typedef C::t_attrmap t_attrmap
typedef C::t_relmap t_relmap

Static Public Member Functions

static t_attrmap getattr (typename C::t_confobject const &obj)
static t_relmap getrel (typename C::t_confobject const &obj)

Detailed Description

template<typename C>
class dbe::config_object_extractor< C >

Definition at line 29 of file confobject_extra.hpp.

Member Typedef Documentation

◆ t_attrmap

template<typename C>
typedef C::t_attrmap dbe::config_object_extractor< C >::t_attrmap

Definition at line 33 of file confobject_extra.hpp.

◆ t_confobjects

template<typename C>
typedef C::t_confobjects dbe::config_object_extractor< C >::t_confobjects

Definition at line 32 of file confobject_extra.hpp.

◆ t_relmap

template<typename C>
typedef C::t_relmap dbe::config_object_extractor< C >::t_relmap

Definition at line 34 of file confobject_extra.hpp.

Member Function Documentation

◆ getattr()

template<typename C>
t_attrmap dbe::config_object_extractor< C >::getattr ( typename C::t_confobject const & obj)
inlinestatic

Get attributes defined for an object

Parameters
objthe object to parse
Returns
the relational map of attribute names and value lists

Definition at line 41 of file confobject_extra.hpp.

42 {
44 obj.class_name(), false );
46
47 for ( dunedaq::conffwk::attribute_t const & attr : classt.p_attributes )
48 {
50 {
52 attr ) };
53 attributes[attr.p_name] = values;
54 }
55
56 return attributes;
57 }
static T list(dbe::inner::configobject::tref obj, dunedaq::conffwk::attribute_t const &attr)
static dunedaq::conffwk::class_t definition(std::string const &cn, bool direct_only)

◆ getrel()

template<typename C>
t_relmap dbe::config_object_extractor< C >::getrel ( typename C::t_confobject const & obj)
inlinestatic

Get relations for an object

Relations can be filtered depending on the filter function defined in base class C

Parameters
objthe object to lookup relations for
Returns
the relational map of relations name and linked objects

Definition at line 67 of file confobject_extra.hpp.

68 {
70 obj.class_name(), false );
72
73 for ( dunedaq::conffwk::relationship_t const & link : classt.p_relationships )
74 {
75 if ( C::filter ( link ) )
76 {
78 {
80 link ) };
81
82 if ( not linked.empty() )
83 {
84 relations[link.p_name] = linked;
85 }
86 }
87 }
88
89 return relations;
90 }
T relation(tref item, dunedaq::conffwk::relationship_t const &relation)

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