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

#include <confobject_desc.hpp>

Inheritance diagram for dbe::config_object_description< S >:
[legend]
Collaboration diagram for dbe::config_object_description< S >:
[legend]

Public Member Functions

 config_object_description (dbe::inner::configobject::tref const &o) noexcept(false)
 
 config_object_description (config_object_description const &other)
 
config_object_description operator= (config_object_description other)
 
UID () const
 
class_name () const
 
contained_in () const
 
bool is_valid () const
 
inner::configobject::tref ref () const
 

Private Attributes

inner::configobject::tref this_referenced_object
 
this_file
 
- Private Attributes inherited from dbe::config_object_key< std::string >
std::string this_name
 
std::string this_class
 

Friends

void transfer (config_object_description &one, config_object_description &another) noexcept
 

Additional Inherited Members

- Private Member Functions inherited from dbe::config_object_key< std::string >
 config_object_key (std::string const &oname, std::string const &cname)
 

Detailed Description

template<typename S = std::string>
class dbe::config_object_description< S >

Provides a shallow copy holder , copies name, class and file only

Permits to create an identical object and populate with new information

An reference to the object is held internally, but this may be in an inconsistent state with respect to the information held inside this descriptor

Definition at line 32 of file confobject_desc.hpp.

Constructor & Destructor Documentation

◆ config_object_description() [1/2]

template<typename S = std::string>
dbe::config_object_description< S >::config_object_description ( dbe::inner::configobject::tref const & o)
inline

Definition at line 48 of file confobject_desc.hpp.

49 : config_object_key<S>
50 { o.UID(), o.class_name() },
52 this_file ( o.contained_in() )
53 {
54 }
inner::configobject::tref this_referenced_object

◆ config_object_description() [2/2]

template<typename S = std::string>
dbe::config_object_description< S >::config_object_description ( config_object_description< S > const & other)
inline

Definition at line 56 of file confobject_desc.hpp.

57 : config_object_key<S>
58 { other.this_name, other.this_class },
60 { other.this_referenced_object },
61 this_file ( other.this_file )
62 {
63
64 }

Member Function Documentation

◆ class_name()

template<typename S = std::string>
S dbe::config_object_description< S >::class_name ( ) const
inline

Definition at line 77 of file confobject_desc.hpp.

78 {
79 return this->this_class;
80 }

◆ contained_in()

template<typename S = std::string>
S dbe::config_object_description< S >::contained_in ( ) const
inline

Definition at line 82 of file confobject_desc.hpp.

83 {
84 return this->this_file;
85 }

◆ is_valid()

template<typename S = std::string>
bool dbe::config_object_description< S >::is_valid ( ) const
inline

Definition at line 87 of file confobject_desc.hpp.

◆ operator=()

template<typename S = std::string>
config_object_description dbe::config_object_description< S >::operator= ( config_object_description< S > other)
inline

Definition at line 66 of file confobject_desc.hpp.

67 {
68 transfer ( *this, other );
69 return *this;
70 }
friend void transfer(config_object_description &one, config_object_description &another) noexcept

◆ ref()

template<typename S >
inner::configobject::tref dbe::config_object_description< S >::ref ( ) const

Returns an always valid reference to the underlying object

If the object cannot be found in the database , an appropriate exception will be thrown from the underlyin dbcontroller::get() lookup , and should be handled by caller, accordingly.

Returns
a transaction reference (tref) to the underlying object

Definition at line 495 of file dbcontroller.cpp.

496{
498 {
500 { this->this_name, this->this_class });
501 }
503}
static configobject::tref get(dbe::cokey const &desc)

◆ UID()

template<typename S = std::string>
S dbe::config_object_description< S >::UID ( ) const
inline

Definition at line 72 of file confobject_desc.hpp.

73 {
74 return this->this_name;
75 }

Friends And Related Symbol Documentation

◆ transfer

template<typename S = std::string>
void transfer ( config_object_description< S > & one,
config_object_description< S > & another )
friend

Definition at line 38 of file confobject_desc.hpp.

40 {
41 std::swap ( one.this_referenced_object, another.this_referenced_object );
42 std::swap ( one.this_class, another.this_class );
43 std::swap ( one.this_name, another.this_name );
44 std::swap ( one.this_file, another.this_file );
45 }

Member Data Documentation

◆ this_file

template<typename S = std::string>
S dbe::config_object_description< S >::this_file
private

Definition at line 36 of file confobject_desc.hpp.

◆ this_referenced_object

template<typename S = std::string>
inner::configobject::tref dbe::config_object_description< S >::this_referenced_object
mutableprivate

Definition at line 35 of file confobject_desc.hpp.


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