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.
ConfigObject & operator= (const ConfigObject &other) noexcept
 Assignment operator.
ConfigObject & operator= (ConfigObjectImpl *impl) noexcept
 Assignment from implementation object.
bool operator== (const ConfigObject &other) const noexcept
 Compare two objects.
ConfigObject * get_obj_pybind (const std::string &attrname)
template<typename T>
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.
Configuration * get_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 ConfigObjectImpl * implementation () 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

ConfigObjectImpl * m_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.

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.

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.

31 : m_impl(impl)
32{
33}

◆ ~ConfigObject()

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

Destructor.

Definition at line 35 of file ConfigObject.cpp.

35{}

Member Function Documentation

◆ _clear()

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

Definition at line 585 of file ConfigObject.hpp.

586 {
587 if (m_impl) {
588 m_impl->clear();
589 }
590 }
virtual void clear() noexcept
Virtual method to clean resources used by the implementation object.

◆ action_on_object_update()

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

Definition at line 95 of file ConfigObject.cpp.

96{
97 db->action_on_update(*this, name);
98}

◆ 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 217 of file ConfigObject.hpp.

217{ 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 233 of file ConfigObject.hpp.

233{ return m_impl->contained_in(); }
virtual const std::string contained_in() const =0
Virtual method to get object's database file name.

◆ 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 226 of file ConfigObject.hpp.

226{ 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 259 of file ConfigObject.hpp.

260 {
261 m_impl->get(name, value);
262 m_impl->convert(value, *this, name);
263 }
void convert(bool &value, const ConfigObject &obj, const std::string &attr_name) noexcept
virtual void get(const std::string &attribute, bool &value)=0
Virtual method to read boolean attribute value.

◆ get_configuration()

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

Get pointer to configuration object.

Definition at line 82 of file ConfigObject.cpp.

83{
84 return m_impl->m_impl->m_conf;
85}
Configuration * m_conf
Configuration pointer is needed for notification on changes, e.g. in case of subscription or an objec...

◆ get_list_pybind()

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

Definition at line 126 of file ConfigObject.hpp.

127 {
128 std::vector<T> attrvals;
129 this->get(attrname, attrvals);
130 return attrvals;
131 }
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 307 of file ConfigObject.cpp.

308{
309
310 ConfigObject* newobject = new ConfigObject;
311
312 if (newobject) {
313 this->get(attrname, *newobject);
314
315 if (newobject->is_null()) {
316 delete newobject;
317 return nullptr;
318 }
319 }
320
321 return newobject;
322}
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 118 of file ConfigObject.hpp.

119 {
120 T attrval;
121 this->get(attrname, attrval);
122 return attrval;
123 }

◆ implementation()

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

Returns pointer on implementation.

This method exists only by the performance reasons.

Definition at line 582 of file ConfigObject.hpp.

582{ return m_impl; }

◆ is_deleted()

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

Check if object was deleted.

Definition at line 188 of file ConfigObject.hpp.

188{ return (m_impl->is_deleted()); }
bool is_deleted() const
Check object and return true if the object has been deleted.

◆ 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 182 of file ConfigObject.hpp.

182{ return (m_impl == nullptr); }

◆ 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 546 of file ConfigObject.hpp.

546{ m_impl->move(at); }
virtual void move(const std::string &at)=0
Virtual method to move object to a file.

◆ operator=() [1/2]

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

Assignment from implementation object.

Definition at line 48 of file ConfigObject.cpp.

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

◆ 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 38 of file ConfigObject.cpp.

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

◆ operator==()

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

Compare two objects.

Definition at line 58 of file ConfigObject.cpp.

59{
60 if (this == &other || m_impl == other.m_impl)
61 return true; // the objects or implementations are the same
62 if (!m_impl || !other.m_impl)
63 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 if (m_impl->is_deleted()) {
72 s << "(deleted object " << full_name() << ')';
73 } else {
74 s << full_name();
75 }
76 } else {
77 s << "(null)";
78 }
79}
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 188 of file ConfigObject.cpp.

192{
193 static bool expand_aggregation = (getenv(
194 "TDAQ_CONFFWK_PRINT_EXPAND_AGGREGATIONS")); // FIXME tdaq-09-05-00 => add new parameter to conffwk and add fuse
195
196 // check if it is not a reference to 0
197 if (is_null_obj(this)) {
198 s << prefix << "(null)";
199 return;
200 }
201
202 // print out object-id and class-name
203 s << prefix << "Object:\n" << prefix << " id: \'" << UID() << "\', class name: \'" << class_name() << "\'\n";
204
205 if (show_contained_in)
206 s << prefix << " contained in: \'" << contained_in() << "\'\n";
207
208 try {
209 const dunedaq::conffwk::class_t& cd(conffwk.get_class_info(class_name()));
210
211 // print attributes
212 for (const auto& i : cd.p_attributes) {
213 const std::string& aname(i.p_name); // attribute name
214 const bool ismv(i.p_is_multi_value); // attribute is multi-value
215
216 s << prefix << " " << aname << ": ";
217
218 switch (i.p_type) {
224 print_value<std::string>(*this, aname, ismv, '\"', s);
225 break;
227 print_value<bool>(*this, aname, ismv, 0, s);
228 break;
230 print_value<uint8_t>(*this, aname, ismv, 0, s);
231 break;
233 print_value<int8_t>(*this, aname, ismv, 0, s);
234 break;
236 print_value<uint16_t>(*this, aname, ismv, 0, s);
237 break;
239 print_value<int16_t>(*this, aname, ismv, 0, s);
240 break;
242 print_value<uint32_t>(*this, aname, ismv, 0, s);
243 break;
245 print_value<int32_t>(*this, aname, ismv, 0, s);
246 break;
248 print_value<uint64_t>(*this, aname, ismv, 0, s);
249 break;
251 print_value<int64_t>(*this, aname, ismv, 0, s);
252 break;
254 print_value<float>(*this, aname, ismv, 0, s);
255 break;
257 print_value<double>(*this, aname, ismv, 0, s);
258 break;
259 default:
260 s << "*** bad type ***";
261 }
262
263 s << std::endl;
264 }
265
266 // print relationships
267 for (const auto& i : cd.p_relationships) {
268 s << prefix << " " << i.p_name << ':';
269 if (expand_aggregation == false || i.p_is_aggregation == false) {
270 s << ' ';
272 i.p_name,
273 (i.p_cardinality == dunedaq::conffwk::zero_or_many) ||
274 (i.p_cardinality == dunedaq::conffwk::one_or_many),
275 '\"',
276 s);
277 s << std::endl;
278 } else {
279 s << std::endl;
280 std::string prefix2(prefix + " ");
281 ConfigObject& obj = const_cast<ConfigObject&>(*this);
282 if ((i.p_cardinality == dunedaq::conffwk::zero_or_many) || (i.p_cardinality == dunedaq::conffwk::one_or_many)) {
283 std::vector<ConfigObject> value;
284 obj.get(i.p_name, value);
285 if (value.empty())
286 s << prefix2 << "(null)\n";
287 else
288 for (const auto& x : value)
289 x.print_ref(s, conffwk, prefix2, show_contained_in);
290 } else {
291 ConfigObject value;
292 obj.get(i.p_name, value);
293 if (value.is_null())
294 s << prefix2 << "(null)\n";
295 else
296 value.print_ref(s, conffwk, prefix2, show_contained_in);
297 }
298 }
299 }
300 } catch (dunedaq::conffwk::Exception& ex) {
301 s << "cannot get schema description: caught dunedaq::conffwk::Exception exception" << std::endl;
302 std::cerr << "ERROR: " << ex << std::endl;
303 }
304}
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 307 of file ConfigObject.hpp.

312 {
313 m_impl->referenced_by(value, relationship_name, check_composite_only, rlevel, rclasses);
314 }
virtual void referenced_by(std::vector< ConfigObject > &value, const std::string &association, bool check_composite_only, unsigned long rlevel, const std::vector< std::string > *rclasses) const =0
Virtual method to read vector-of-conffwk-object referencing this object.

◆ 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 277 of file ConfigObject.hpp.

278 {
279 if (m_impl->rel(name, value)) {
280 m_impl->convert(value, *this, name);
281 return true;
282 }
283
284 return false;
285 }
virtual bool rel(const std::string &name, std::vector< ConfigObject > &value)=0

◆ 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 88 of file ConfigObject.cpp.

89{
90 get_configuration()->rename_object(*this, new_id);
92}
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 394 of file ConfigObject.hpp.

395 {
396 m_impl->set(name, value);
398 }
virtual void set(const std::string &attribute, bool value)=0
Virtual method to set boolean attribute value.

◆ 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 372 of file ConfigObject.hpp.

373 {
374 m_impl->set(name, value);
376 }

◆ 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 428 of file ConfigObject.hpp.

429 {
430 m_impl->set_class(name, value);
432 }
virtual void set_class(const std::string &attribute, const std::string &value)=0
Virtual method to set enumeration attribute value.

◆ 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 496 of file ConfigObject.hpp.

497 {
498 m_impl->set_class(name, value);
500 }

◆ 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 445 of file ConfigObject.hpp.

446 {
447 m_impl->set_date(name, value);
449 }
virtual void set_date(const std::string &attribute, const std::string &value)=0
Virtual method to set date attribute value.

◆ 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 513 of file ConfigObject.hpp.

514 {
515 m_impl->set_date(name, value);
517 }

◆ 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 411 of file ConfigObject.hpp.

412 {
413 m_impl->set_enum(name, value);
415 }
virtual void set_enum(const std::string &attribute, const std::string &value)=0
Virtual method to set enumeration attribute value.

◆ 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 479 of file ConfigObject.hpp.

480 {
481 m_impl->set_enum(name, value);
483 }

◆ 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 134 of file ConfigObject.hpp.

135 {
136 this->set_by_ref(attrname, l);
137 }
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 329 of file ConfigObject.hpp.

330 {
331 m_impl->set(name, o, skip_non_null_check);
333 }

◆ 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 345 of file ConfigObject.hpp.

346 {
347 m_impl->set(name, o, skip_non_null_check);
349 }

◆ 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 462 of file ConfigObject.hpp.

463 {
464 m_impl->set_time(name, value);
466 }
virtual void set_time(const std::string &attribute, const std::string &value)=0
Virtual method to set time attribute value.

◆ 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 530 of file ConfigObject.hpp.

531 {
532 m_impl->set_time(name, value);
534 }

◆ 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 205 of file ConfigObject.hpp.

◆ Configuration

friend class Configuration
friend

Definition at line 56 of file ConfigObject.hpp.

◆ ConfigurationImpl

friend class ConfigurationImpl
friend

Definition at line 57 of file ConfigObject.hpp.

◆ DalObject

friend class DalObject
friend

Definition at line 58 of file ConfigObject.hpp.

◆ DalRegistry

friend class DalRegistry
friend

Definition at line 59 of file ConfigObject.hpp.

Member Data Documentation

◆ m_impl

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

Definition at line 593 of file ConfigObject.hpp.


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