10 std::vector<conffwk::ConfigObject> c_objs;
55 s <<
"(deleted object)";
61 s <<
"ERROR in generated DAL print method:\n\twas caused by: " << ex << std::endl;
65DalObject::p_hdr(std::ostream &s,
unsigned int indent,
const std::string &cl,
const char *nm)
const
67 const std::string str(indent,
' ');
76 std::ostringstream text;
77 text <<
"failed to init " <<
this <<
":\n\twas caused by: " << ex << std::endl;
84 std::ostringstream text;
85 text <<
"cannot find relationship or algorithm \"" << what <<
"\" in c++ class \"" <<
class_name <<
"\" for object " << obj;
95 else if (obj->is_deleted())
96 s <<
"(deleted object " << obj->UID() <<
'@' << obj->class_name() <<
')';
98 s <<
'\'' << obj->UID() <<
'@' << obj->class_name() <<
'\'';
107 s << str << name <<
": " << obj <<
'\n';
The base class for any generated DAL object.
void p_hdr(std::ostream &s, unsigned int indent, const std::string &cl, const char *nm=nullptr) const
print object headers
static void p_null(std::ostream &s)
print "(null)"
static void p_rm(std::ostream &s)
print "(deleted object)"
void throw_init_ex(dunedaq::conffwk::Exception &ex)
throw object initialisation exception (i.e.
const std::string & class_name() const noexcept
static void p_error(std::ostream &s, dunedaq::conffwk::Exception &ex)
print error text
bool get_rel_objects(const std::string &name, bool upcast_unregistered, std::vector< const DalObject * > &objs) const
Read relationship values as DAL objects using DAL factory.
static void throw_get_ex(const std::string &what, const std::string &class_name, const DalObject *obj)
throw exception in generated get method (i.e.
const std::string & UID() const noexcept
DalRegistry & p_registry
Configuration object.
bool p_was_read
is true, if the object was read
bool get_algo_objects(const std::string &name, std::vector< const DalObject * > &objs) const
Run algorithm and return result as DAL objects using DAL factory.
ConfigObject p_obj
Config object used by given template object.
DalObject * get(ConfigObject &obj, bool upcast_unregistered=false)
Generic configuration exception.
void p_sv_rel(std::ostream &s, const std::string &str, const std::string &name, const DalObject *obj)
print weak single-value relationship
std::ostream & operator<<(std::ostream &, const ConfigurationChange &)