DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::conffwk::ConfigObject Class Reference

Represents database objects. More...

#include <ConfigObject.hpp>

Collaboration diagram for dunedaq::conffwk::ConfigObject:
[legend]

Public Member Functions

 ConfigObject () noexcept
 Default constructor.
 ConfigObject (const ConfigObject &other) noexcept
 Copy constructor.
 ConfigObject (ConfigObjectImpl *impl) noexcept
 Construct object from implementation object.
 ~ConfigObject () noexcept
 Destructor.
ConfigObjectoperator= (const ConfigObject &other) noexcept
 Assignment operator.
ConfigObjectoperator= (ConfigObjectImpl *impl) noexcept
 Assignment from implementation object.
bool operator== (const ConfigObject &other) const noexcept
 Compare two objects.
ConfigObjectget_obj_pybind (const std::string &attrname)
template<typename T>
get_value_pybind (const std::string &attrname)
template<typename T>
std::vector< T > get_list_pybind (const std::string &attrname)
template<typename T>
void set_list_pybind (const std::string &attrname, std::vector< T > l)
bool is_null () const noexcept
 Check if object's implementation points to null.
bool is_deleted () const
 Check if object was deleted.
const std::string & UID () const noexcept
 Return object identity.
const std::string & class_name () const noexcept
 Return object's class name.
const std::string full_name () const noexcept
 Return full object name.
const std::string contained_in () const
 Return the name of the database file this object belongs to.
template<class T>
void get (const std::string &name, T &value)
 Get value of object's attribute or relationship.
bool rel (const std::string &name, std::vector< ConfigObject > &value)
 Get value of object's relationship.
void referenced_by (std::vector< ConfigObject > &value, const std::string &relationship_name="*", bool check_composite_only=true, unsigned long rlevel=0, const std::vector< std::string > *rclasses=nullptr) const
 Get objects which have references to given object.
Configurationget_configuration () const
 Get pointer to configuration object.
void set_obj (const std::string &name, const ConfigObject *o, bool skip_non_null_check=false)
 Set relationship single-value.
void set_objs (const std::string &name, const std::vector< const ConfigObject * > &o, bool skip_non_null_check=false)
 Set relationship multi-value.
template<class T>
void set_by_val (const std::string &name, T value)
 Set attribute value.
template<class T>
void set_by_ref (const std::string &name, T &value)
 Set attribute value.
void set_enum (const std::string &name, const std::string &value)
 Set attribute enumeration value.
void set_class (const std::string &name, const std::string &value)
 Set attribute class value.
void set_date (const std::string &name, const std::string &value)
 Set attribute date value.
void set_time (const std::string &name, const std::string &value)
 Set attribute time value.
void set_enum (const std::string &name, const std::vector< std::string > &value)
 Set attribute vector-of-enumerations value.
void set_class (const std::string &name, const std::vector< std::string > &value)
 Set attribute vector-of-class value.
void set_date (const std::string &name, const std::vector< std::string > &value)
 Set attribute vector-of-dates value.
void set_time (const std::string &name, const std::vector< std::string > &value)
 Set attribute vector-of-times value.
void move (const std::string &at)
 Move object to a different database.
void rename (const std::string &new_id)
 Rename object.
void print_ptr (std::ostream &s) const noexcept
 Print object's pointer in format 'obj-id@class-name'.
void print_ref (std::ostream &s, Configuration &conf, const std::string &prefix="", bool show_contained_in=false) const noexcept
 Print details of object's attributes and relationships.
const ConfigObjectImplimplementation () const noexcept
 Returns pointer on implementation.

Private Member Functions

void action_on_object_update (Configuration *db, const std::string &name)
void _clear () noexcept

Private Attributes

ConfigObjectImplm_impl

Friends

class Configuration
class ConfigurationImpl
class DalObject
class DalRegistry

Detailed Description

Represents database objects.

The class has default constructor, so user can declare instances locally or as a part of an array as he likes. However, the only way to retrieve a valid instance of the class is to call either Configuration::get(const std::string&, const std::string&, ConfigObject&) or Configuration::get(const std::string&, std::vector<ConfigObject>&) method.

The class has a copy constructor and an assignment operator, i.e. instances can be copied, passed by value, etc. All necessary bookkeeping is done transparent to user.

The class has methods to report object's class and identity:

  • class_name() return actual class name of the object
  • UID() return object's unique identity inside given class

Apart from this there is only one template method get() to retrieve values of object's attributes and relationships.

Definition at line 53 of file ConfigObject.hpp.

Constructor & Destructor Documentation

◆ ConfigObject() [1/3]

dunedaq::conffwk::ConfigObject::ConfigObject ( )
noexcept

Default constructor.

The object is invalid until it is initialized by the Configuration::get(const std::string&, const std::string&, ConfigObject&) or Configuration::get(const std::string&, std::vector<ConfigObject>&) method.

Definition at line 20 of file ConfigObject.cpp.

20 :
21 m_impl(nullptr)
22{
23}

◆ ConfigObject() [2/3]

dunedaq::conffwk::ConfigObject::ConfigObject ( const ConfigObject & other)
noexcept

Copy constructor.

All necessary bookkeeping relevant to implementation is done transparent to user.

Definition at line 25 of file ConfigObject.cpp.

25 :
26 m_impl(other.m_impl)
27{
28}

◆ ConfigObject() [3/3]

dunedaq::conffwk::ConfigObject::ConfigObject ( ConfigObjectImpl * impl)
noexcept

Construct object from implementation object.

Definition at line 30 of file ConfigObject.cpp.

30 :
31 m_impl(impl)
32{
33}

◆ ~ConfigObject()

dunedaq::conffwk::ConfigObject::~ConfigObject ( )
noexcept

Destructor.

Definition at line 35 of file ConfigObject.cpp.

36{
37}

Member Function Documentation

◆ _clear()

void dunedaq::conffwk::ConfigObject::_clear ( )
inlineprivatenoexcept

Definition at line 621 of file ConfigObject.hpp.

622 {
623 if (m_impl)
624 {
625 m_impl->clear();
626 }
627 }

◆ action_on_object_update()

void dunedaq::conffwk::ConfigObject::action_on_object_update ( Configuration * db,
const std::string & name )
private

Definition at line 101 of file ConfigObject.cpp.

102{
103 db->action_on_update(*this, name);
104}

◆ class_name()

const std::string & dunedaq::conffwk::ConfigObject::class_name ( ) const
inlinenoexcept

Return object's class name.

It corresponds to the actual name of the class from the database implementation.

The pair UID (see UID() method) and class name allows to identify object inside database.

Definition at line 238 of file ConfigObject.hpp.

238{ return *m_impl->m_class_name; }

◆ contained_in()

const std::string dunedaq::conffwk::ConfigObject::contained_in ( ) const
inline

Return the name of the database file this object belongs to.

Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 256 of file ConfigObject.hpp.

257 {
258 return m_impl->contained_in();
259 }

◆ full_name()

const std::string dunedaq::conffwk::ConfigObject::full_name ( ) const
inlinenoexcept

Return full object name.

The method combines object identity and it's class name. Such full name is unique for any database object.

Definition at line 248 of file ConfigObject.hpp.

248{ return UID() + '@' + class_name(); }
const std::string & UID() const noexcept
Return object identity.
const std::string & class_name() const noexcept
Return object's class name.

◆ get()

template<class T>
void dunedaq::conffwk::ConfigObject::get ( const std::string & name,
T & value )
inline

Get value of object's attribute or relationship.

Template parameter T can be:

  • bool
  • int8_t and uint8_t
  • int16_t and uint16_t
  • int32_t and uint32_t
  • int64_t and uint64_t
  • float
  • double
  • std::string
  • ConfigObject&
  • std::vector<T> of above types

All operations are simply forwarded to the implementation.

Parameters
namename of attribute or relationship
valuetype of attribute or relationship
Exceptions
dunedaq::conffwk::Exceptionin case of an error

Definition at line 285 of file ConfigObject.hpp.

285 {
286 m_impl->get(name, value);
287 m_impl->convert(value, *this, name);
288 }

◆ get_configuration()

Configuration * dunedaq::conffwk::ConfigObject::get_configuration ( ) const

Get pointer to configuration object.

Definition at line 88 of file ConfigObject.cpp.

89{
90 return m_impl->m_impl->m_conf;
91}

◆ get_list_pybind()

template<typename T>
std::vector< T > dunedaq::conffwk::ConfigObject::get_list_pybind ( const std::string & attrname)
inline

Definition at line 131 of file ConfigObject.hpp.

131 {
132 std::vector<T> attrvals;
133 this->get(attrname, attrvals);
134 return attrvals;
135 }
void get(const std::string &name, T &value)
Get value of object's attribute or relationship.

◆ get_obj_pybind()

ConfigObject * dunedaq::conffwk::ConfigObject::get_obj_pybind ( const std::string & attrname)

Definition at line 304 of file ConfigObject.cpp.

304 {
305
306 ConfigObject* newobject = new ConfigObject;
307
308 if (newobject) {
309 this->get(attrname, *newobject);
310
311 if (newobject->is_null()) {
312 delete newobject;
313 return nullptr;
314 }
315 }
316
317 return newobject;
318}
ConfigObject() noexcept
Default constructor.

◆ get_value_pybind()

template<typename T>
T dunedaq::conffwk::ConfigObject::get_value_pybind ( const std::string & attrname)
inline

Definition at line 124 of file ConfigObject.hpp.

124 {
125 T attrval;
126 this->get(attrname, attrval);
127 return attrval;
128 }

◆ implementation()

const ConfigObjectImpl * dunedaq::conffwk::ConfigObject::implementation ( ) const
inlinenoexcept

Returns pointer on implementation.

This method exists only by the performance reasons.

Definition at line 615 of file ConfigObject.hpp.

615{return m_impl;}

◆ is_deleted()

bool dunedaq::conffwk::ConfigObject::is_deleted ( ) const
inline

Check if object was deleted.

Definition at line 199 of file ConfigObject.hpp.

200 {
201 return (m_impl->is_deleted());
202 }

◆ is_null()

bool dunedaq::conffwk::ConfigObject::is_null ( ) const
inlinenoexcept

Check if object's implementation points to null.

Returns false, if the object points to a valid implementation object. The object can point to null implementation object, if it was initialized via Configuration::get(relationship, object) and the relationship's value is not set.

Definition at line 188 of file ConfigObject.hpp.

189 {
190 return (m_impl == nullptr);
191 }

◆ move()

void dunedaq::conffwk::ConfigObject::move ( const std::string & at)
inline

Move object to a different database.

Forward operation to the implementation.

Parameters
atname of database file
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 571 of file ConfigObject.hpp.

571 {
572 m_impl->move(at);
573 }

◆ operator=() [1/2]

ConfigObject & dunedaq::conffwk::ConfigObject::operator= ( ConfigObjectImpl * impl)
noexcept

Assignment from implementation object.

Definition at line 50 of file ConfigObject.cpp.

51{
52 if(m_impl != impl) {
53 m_impl = impl;
54 }
55
56 return *this;
57}

◆ operator=() [2/2]

ConfigObject & dunedaq::conffwk::ConfigObject::operator= ( const ConfigObject & other)
noexcept

Assignment operator.

All necessary bookkeeping relevant to implementation is done transparent to user.

Definition at line 40 of file ConfigObject.cpp.

41{
42 if(this != &other) {
43 m_impl = other.m_impl;
44 }
45
46 return *this;
47}

◆ operator==()

bool dunedaq::conffwk::ConfigObject::operator== ( const ConfigObject & other) const
noexcept

Compare two objects.

Definition at line 60 of file ConfigObject.cpp.

61{
62 if(this == &other || m_impl == other.m_impl) return true; // the objects or implementations are the same
63 if(!m_impl || !other.m_impl) return false; // only one of objects has no implementation
64 return ((UID() == other.UID()) && (class_name() == other.class_name()));
65}

◆ print_ptr()

void dunedaq::conffwk::ConfigObject::print_ptr ( std::ostream & s) const
noexcept

Print object's pointer in format 'obj-id@class-name'.

Definition at line 68 of file ConfigObject.cpp.

69{
70 if(m_impl)
71 {
72 if(m_impl->is_deleted())
73 {
74 s << "(deleted object " << full_name() << ')';
75 }
76 else
77 {
78 s << full_name();
79 }
80 }
81 else
82 {
83 s << "(null)";
84 }
85}
const std::string full_name() const noexcept
Return full object name.

◆ print_ref()

void dunedaq::conffwk::ConfigObject::print_ref ( std::ostream & s,
Configuration & conf,
const std::string & prefix = "",
bool show_contained_in = false ) const
noexcept

Print details of object's attributes and relationships.

Parameters
sthe output stream
confthe configuration object (required to read schema description)
prefixoptional shift output using prefix
show_contained_inoptional print out info about object database file

Definition at line 201 of file ConfigObject.cpp.

202{
203 static bool expand_aggregation = (getenv("TDAQ_CONFFWK_PRINT_EXPAND_AGGREGATIONS")); // FIXME tdaq-09-05-00 => add new parameter to conffwk and add fuse
204
205 // check if it is not a reference to 0
206 if (is_null_obj(this))
207 {
208 s << prefix << "(null)";
209 return;
210 }
211
212 // print out object-id and class-name
213 s
214 << prefix << "Object:\n"
215 << prefix << " id: \'" << UID() << "\', class name: \'" << class_name() << "\'\n";
216
217 if (show_contained_in)
218 s << prefix << " contained in: \'" << contained_in() << "\'\n";
219
220 try
221 {
222 const dunedaq::conffwk::class_t& cd(conffwk.get_class_info(class_name()));
223
224 // print attributes
225 for (const auto& i : cd.p_attributes)
226 {
227 const std::string& aname(i.p_name); // attribute name
228 const bool ismv(i.p_is_multi_value); // attribute is multi-value
229
230 s << prefix << " " << aname << ": ";
231
232 switch (i.p_type)
233 {
239 print_value<std::string>(*this, aname, ismv, '\"', s); break;
240 case dunedaq::conffwk::bool_type: print_value<bool>(*this, aname, ismv, 0, s); break;
241 case dunedaq::conffwk::u8_type: print_value<uint8_t>(*this, aname, ismv, 0, s); break;
242 case dunedaq::conffwk::s8_type: print_value<int8_t>(*this, aname, ismv, 0, s); break;
243 case dunedaq::conffwk::u16_type: print_value<uint16_t>(*this, aname, ismv, 0, s); break;
244 case dunedaq::conffwk::s16_type: print_value<int16_t>(*this, aname, ismv, 0, s); break;
245 case dunedaq::conffwk::u32_type: print_value<uint32_t>(*this, aname, ismv, 0, s); break;
246 case dunedaq::conffwk::s32_type: print_value<int32_t>(*this, aname, ismv, 0, s); break;
247 case dunedaq::conffwk::u64_type: print_value<uint64_t>(*this, aname, ismv, 0, s); break;
248 case dunedaq::conffwk::s64_type: print_value<int64_t>(*this, aname, ismv, 0, s); break;
249 case dunedaq::conffwk::float_type: print_value<float>(*this, aname, ismv, 0, s); break;
250 case dunedaq::conffwk::double_type: print_value<double>(*this, aname, ismv, 0, s); break;
251 default: s << "*** bad type ***";
252 }
253
254 s << std::endl;
255 }
256
257 // print relationships
258 for (const auto& i : cd.p_relationships)
259 {
260 s << prefix << " " << i.p_name << ':';
261 if (expand_aggregation == false || i.p_is_aggregation == false)
262 {
263 s << ' ';
264 print_value<ConfigObject>(*this, i.p_name, (i.p_cardinality == dunedaq::conffwk::zero_or_many) || (i.p_cardinality == dunedaq::conffwk::one_or_many), '\"', s);
265 s << std::endl;
266 }
267 else
268 {
269 s << std::endl;
270 std::string prefix2(prefix + " ");
271 ConfigObject& obj = const_cast<ConfigObject&>(*this);
272 if ((i.p_cardinality == dunedaq::conffwk::zero_or_many) || (i.p_cardinality == dunedaq::conffwk::one_or_many))
273 {
274 std::vector<ConfigObject> value;
275 obj.get(i.p_name, value);
276 if (value.empty())
277 s << prefix2 << "(null)\n";
278 else
279 for (const auto& x : value)
280 x.print_ref(s, conffwk, prefix2, show_contained_in);
281 }
282 else
283 {
284 ConfigObject value;
285 obj.get(i.p_name, value);
286 if (value.is_null())
287 s << prefix2 << "(null)\n";
288 else
289 value.print_ref(s, conffwk, prefix2, show_contained_in);
290 }
291 }
292 }
293 }
294 catch (dunedaq::conffwk::Exception& ex)
295 {
296 s << "cannot get schema description: caught dunedaq::conffwk::Exception exception" << std::endl;
297 std::cerr << "ERROR: " << ex << std::endl;
298 }
299
300}
const std::string contained_in() const
Return the name of the database file this object belongs to.
bool is_null_obj(const ConfigObject *o)
void print_value(const ConfigObject &const_obj, const std::string &name, const bool ismv, const char sep, std::ostream &s)
msgpack::object obj

◆ referenced_by()

void dunedaq::conffwk::ConfigObject::referenced_by ( std::vector< ConfigObject > & value,
const std::string & relationship_name = "*",
bool check_composite_only = true,
unsigned long rlevel = 0,
const std::vector< std::string > * rclasses = nullptr ) const
inline

Get objects which have references to given object.

The method returns objects, which have references on given object via explicitly provided relationship name. If the relationship name is set to "*", then the method takes into account all relationships of all objects. The method is efficient only for composite relationships (i.e. when a parent has composite reference on this object). For generic relationships the method performs full scan of all database objects, so at large scale this method should not be applied to every object.

Parameters
valuereturned objects
relationship_namename of relationship (if "*", then return objects referencing via ANY relationship)
check_composite_onlyonly returned composite parent objects
rleveloptional references level to optimize performance (defines how many objects referenced by given object have also to be read to the implementation cache)
rclassesoptional array of class names to optimize performance (defines which referenced objects have to be read to the implementation cache)
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 334 of file ConfigObject.hpp.

338 {
339 m_impl->referenced_by(value, relationship_name, check_composite_only, rlevel, rclasses);
340 }

◆ rel()

bool dunedaq::conffwk::ConfigObject::rel ( const std::string & name,
std::vector< ConfigObject > & value )
inline

Get value of object's relationship.

Forward to implementation and convert value.

Parameters
namename of relationship
valuereturned value of relationship
Returns
true if there is such relationship and false otherwise
Exceptions
dunedaq::conffwk::Exceptionin case of an error

Definition at line 304 of file ConfigObject.hpp.

305 {
306 if (m_impl->rel(name, value))
307 {
308 m_impl->convert(value, *this, name);
309 return true;
310 }
311
312 return false;
313 }

◆ rename()

void dunedaq::conffwk::ConfigObject::rename ( const std::string & new_id)

Rename object.

Forward operation to the implementation.

Parameters
new_idnew object ID
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 94 of file ConfigObject.cpp.

95{
96 get_configuration()->rename_object(*this, new_id);
98}
Configuration * get_configuration() const
Get pointer to configuration object.
void action_on_object_update(Configuration *db, const std::string &name)
void rename_object(ConfigObject &obj, const std::string &new_id)
Cache of template object of given type.

◆ set_by_ref()

template<class T>
void dunedaq::conffwk::ConfigObject::set_by_ref ( const std::string & name,
T & value )
inline

Set attribute value.

Template parameter T can be:

  • std::string
  • std::vector<T> of bool, [un]signed char, [un]signed short, [un]signed long, float, double, std::string

All operations are simply forwarded to the implementation.

Parameters
namename of attribute
valuetype of attribute
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 419 of file ConfigObject.hpp.

419 {
420 m_impl->set(name, value);
422 }

◆ set_by_val()

template<class T>
void dunedaq::conffwk::ConfigObject::set_by_val ( const std::string & name,
T value )
inline

Set attribute value.

Template parameter T can be:

  • bool
  • int8_t and uint8_t (old char)
  • int16_t and uint16_t (old short)
  • int32_t and uint32_t (old long)
  • int64_t and uint64_t
  • float
  • double

All operations are simply forwarded to the implementation.

Parameters
namename of attribute
valuetype of attribute
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 398 of file ConfigObject.hpp.

398 {
399 m_impl->set(name, value);
401 }

◆ set_class() [1/2]

void dunedaq::conffwk::ConfigObject::set_class ( const std::string & name,
const std::string & value )
inline

Set attribute class value.

Forward operation to the implementation.

Parameters
namename of attribute
valuevalue of attribute
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 453 of file ConfigObject.hpp.

453 {
454 m_impl->set_class(name, value);
456 }

◆ set_class() [2/2]

void dunedaq::conffwk::ConfigObject::set_class ( const std::string & name,
const std::vector< std::string > & value )
inline

Set attribute vector-of-class value.

Forward operation to the implementation.

Parameters
namename of attribute
valuevalue of attribute
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 521 of file ConfigObject.hpp.

521 {
522 m_impl->set_class(name, value);
524 }

◆ set_date() [1/2]

void dunedaq::conffwk::ConfigObject::set_date ( const std::string & name,
const std::string & value )
inline

Set attribute date value.

Forward operation to the implementation.

Parameters
namename of attribute
valuevalue of attribute
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 470 of file ConfigObject.hpp.

470 {
471 m_impl->set_date(name, value);
473 }

◆ set_date() [2/2]

void dunedaq::conffwk::ConfigObject::set_date ( const std::string & name,
const std::vector< std::string > & value )
inline

Set attribute vector-of-dates value.

Forward operation to the implementation.

Parameters
namename of attribute
valuevalue of attribute
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 538 of file ConfigObject.hpp.

538 {
539 m_impl->set_date(name, value);
541 }

◆ set_enum() [1/2]

void dunedaq::conffwk::ConfigObject::set_enum ( const std::string & name,
const std::string & value )
inline

Set attribute enumeration value.

Forward operation to the implementation.

Parameters
namename of attribute
valuevalue of attribute
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 436 of file ConfigObject.hpp.

436 {
437 m_impl->set_enum(name, value);
439 }

◆ set_enum() [2/2]

void dunedaq::conffwk::ConfigObject::set_enum ( const std::string & name,
const std::vector< std::string > & value )
inline

Set attribute vector-of-enumerations value.

Forward operation to the implementation.

Parameters
namename of attribute
valuevalue of attribute
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 504 of file ConfigObject.hpp.

504 {
505 m_impl->set_enum(name, value);
507 }

◆ set_list_pybind()

template<typename T>
void dunedaq::conffwk::ConfigObject::set_list_pybind ( const std::string & attrname,
std::vector< T > l )
inline

Definition at line 138 of file ConfigObject.hpp.

138 {
139 this->set_by_ref(attrname, l);
140 }
void set_by_ref(const std::string &name, T &value)
Set attribute value.

◆ set_obj()

void dunedaq::conffwk::ConfigObject::set_obj ( const std::string & name,
const ConfigObject * o,
bool skip_non_null_check = false )
inline

Set relationship single-value.

Parameters
namename of relationship
opointer to object
skip_non_null_checkif true, ignore low cardinality constraint
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 356 of file ConfigObject.hpp.

356 {
357 m_impl->set(name, o, skip_non_null_check);
359 }

◆ set_objs()

void dunedaq::conffwk::ConfigObject::set_objs ( const std::string & name,
const std::vector< const ConfigObject * > & o,
bool skip_non_null_check = false )
inline

Set relationship multi-value.

Parameters
namename of relationship
ovector of pointers on conffwk object
skip_non_null_checkif true, ignore low cardinality constraint
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 372 of file ConfigObject.hpp.

372 {
373 m_impl->set(name, o, skip_non_null_check);
375 }

◆ set_time() [1/2]

void dunedaq::conffwk::ConfigObject::set_time ( const std::string & name,
const std::string & value )
inline

Set attribute time value.

Forward operation to the implementation.

Parameters
namename of attribute
valuevalue of attribute
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 487 of file ConfigObject.hpp.

487 {
488 m_impl->set_time(name, value);
490 }

◆ set_time() [2/2]

void dunedaq::conffwk::ConfigObject::set_time ( const std::string & name,
const std::vector< std::string > & value )
inline

Set attribute vector-of-times value.

Forward operation to the implementation.

Parameters
namename of attribute
valuevalue of attribute
Exceptions
dunedaq::conffwk::Genericin case of an error

Definition at line 555 of file ConfigObject.hpp.

555 {
556 m_impl->set_time(name, value);
558 }

◆ UID()

const std::string & dunedaq::conffwk::ConfigObject::UID ( ) const
inlinenoexcept

Return object identity.

The identity corresponds to the unique identity of object within it's class. It is taken from database implementation. For named objects it can be a meaningful string.

The pair UID and class name (see class_name() method) allows to identify object inside database.

Definition at line 225 of file ConfigObject.hpp.

225{ return m_impl->m_id; }

◆ Configuration

friend class Configuration
friend

Definition at line 55 of file ConfigObject.hpp.

◆ ConfigurationImpl

friend class ConfigurationImpl
friend

Definition at line 56 of file ConfigObject.hpp.

◆ DalObject

friend class DalObject
friend

Definition at line 57 of file ConfigObject.hpp.

◆ DalRegistry

friend class DalRegistry
friend

Definition at line 58 of file ConfigObject.hpp.

Member Data Documentation

◆ m_impl

ConfigObjectImpl* dunedaq::conffwk::ConfigObject::m_impl
private

Definition at line 632 of file ConfigObject.hpp.


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