DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dbe::config_object_representation< S > Struct Template Reference

#include <confobject_desc.hpp>

Collaboration diagram for dbe::config_object_representation< S >:
[legend]

Public Types

typedef S t_str
 
typedef config_object_description< S > t_confobject
 
typedef std::vector< t_confobjectt_confobjects
 
typedef std::map< S, QStringList > t_attrmap
 
typedef std::map< S, t_confobjectst_relmap
 

Public Member Functions

t_config_object_preimage toimage ()
 

Public Attributes

t_attrmap attributes
 
t_relmap relations
 
t_confobject ref
 

Detailed Description

template<typename S = std::string>
struct dbe::config_object_representation< S >

Provides a holder for deep copies of a config object

Definition at line 147 of file confobject_desc.hpp.

Member Typedef Documentation

◆ t_attrmap

template<typename S = std::string>
std::map<S, QStringList> dbe::config_object_representation< S >::t_attrmap

Definition at line 152 of file confobject_desc.hpp.

◆ t_confobject

template<typename S = std::string>
config_object_description<S> dbe::config_object_representation< S >::t_confobject

Definition at line 150 of file confobject_desc.hpp.

◆ t_confobjects

template<typename S = std::string>
std::vector<t_confobject> dbe::config_object_representation< S >::t_confobjects

Definition at line 151 of file confobject_desc.hpp.

◆ t_relmap

template<typename S = std::string>
std::map<S, t_confobjects> dbe::config_object_representation< S >::t_relmap

Definition at line 153 of file confobject_desc.hpp.

◆ t_str

template<typename S = std::string>
S dbe::config_object_representation< S >::t_str

Definition at line 149 of file confobject_desc.hpp.

Member Function Documentation

◆ toimage()

template<typename S = std::string>
t_config_object_preimage dbe::config_object_representation< S >::toimage ( )
inline

Definition at line 160 of file confobject_desc.hpp.

161 {
164
165 std::for_each ( std::begin ( this->attributes ), std::end ( this->attributes ),
166 [&lattributes] ( typename std::pair<S, QStringList> const & e )
167 {
168 t_config_object_preimage::type_attrmap::value_type::second_type v;
169
170 for ( auto const & x : e.second )
171 {
172 v.push_back ( x.toStdString() );
173 }
174
175 lattributes.insert ( std::make_pair ( e.first, v ) );
176 } );
177
178 std::for_each ( std::begin ( this->relations ), std::end ( this->relations ),
179 [&lrelations] ( typename t_relmap::value_type const & e )
180 {
181 t_config_object_preimage::type_relmap::value_type::second_type v;
182
183 for ( t_confobject const & x : e.second )
184 {
185 v.push_back ( { x.UID(), x.class_name() } );
186 }
187
188 lrelations.insert ( std::make_pair ( e.first, v ) );
189 } );
190
191 return
192 {
193 lattributes, lrelations,
194 { this->ref.UID(), this->ref.class_name() }, this->ref.contained_in() };
195 }
M< type_str, type_attributes > type_attrmap
M< type_str, type_images > type_relmap
config_object_description< S > t_confobject

Member Data Documentation

◆ attributes

template<typename S = std::string>
t_attrmap dbe::config_object_representation< S >::attributes

Definition at line 155 of file confobject_desc.hpp.

◆ ref

template<typename S = std::string>
t_confobject dbe::config_object_representation< S >::ref

Definition at line 158 of file confobject_desc.hpp.

◆ relations

template<typename S = std::string>
t_relmap dbe::config_object_representation< S >::relations

Definition at line 156 of file confobject_desc.hpp.


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