43 return std::string(
"cannot find superclass \'") + name +
"\' of class \'" + c.get_name() +
'\'';
50 s <<
"failed to convert \'" << a.get_name() <<
"\" value of object " << o <<
" because:\n" + reason;
57 return std::string(
"cannot register class \'") + c.get_name() +
"\' " +
what +
"because:\n" + reason;
63 return std::string(
"cannot destroy class \'") + c.get_name() +
"\' because:\n" + reason;
68 const std::string& oid,
70 const std::string& reason)
noexcept
72 return std::string(
"cannot ") + op +
" object \'" + oid +
"\' in class \'" + c.get_name() +
"\' because:\n" + reason;
78 return std::string(
"method \'") + op +
"()\' failed because:\n" + reason;
160 ,
p_file(kernel->p_active_schema)
176 if (!c->p_transient && c->p_kernel) {
177 std::unique_lock lock(c->p_kernel->p_kernel_mutex);
181 c->p_file->set_updated();
201 for (
const auto& x : *list)
213 for (
const auto& x : *map)
241 c->create_sub_classes();
255 std::cerr <<
"internal OKS error: registrate_class_change() failed during \'" <<
get_name()
256 <<
"\' class destruction\ncaused by: " << ex.
what() << std::endl;
306 int l2 = (c.p_attributes == 0) ? 0 : c.p_attributes->size();
312 std::list<OksAttribute*>::const_iterator i1 =
p_attributes->begin();
313 std::list<OksAttribute*>::const_iterator i2 = c.p_attributes->begin();
316 if (!(*(*i1) == *(*i2)))
321 l2 = (c.p_relationships == 0) ? 0 : c.p_relationships->size();
327 std::list<OksRelationship*>::const_iterator i1 =
p_relationships->begin();
328 std::list<OksRelationship*>::const_iterator i2 = c.p_relationships->begin();
331 if (!(*(*i1) == *(*i2)))
336 l2 = (c.p_super_classes == 0) ? 0 : c.p_super_classes->size();
343 std::list<std::string*>::const_iterator i2 = c.p_super_classes->begin();
346 if (!(*(*i1) == *(*i2)))
363 int l2 = (c.p_methods == 0) ? 0 : c.p_methods->size();
369 std::list<OksMethod*>::const_iterator i1 =
p_methods->begin();
370 std::list<OksMethod*>::const_iterator i2 = c.p_methods->begin();
372 for (; i1 !=
p_methods->end(); ++i1, ++i2)
373 if (!(*(*i1) == *(*i2)))
385 s <<
"Class name: \"" << c.p_name
387 " has description: \""
388 << c.p_description <<
"\"\n"
389 << (c.p_abstract ==
true ?
" is abstract\n" :
" is not abstract\n");
391 if (c.p_super_classes) {
392 s <<
"The class has superclasses:\n";
393 for (std::list<std::string*>::const_iterator i = c.p_super_classes->begin(); i != c.p_super_classes->end(); ++i) {
394 s <<
" - " << *(*i) << std::endl;
397 s <<
"The class has no superclasses\n";
399 if (c.p_attributes) {
400 s <<
"The attributes are:\n";
401 for (std::list<OksAttribute*>::const_iterator i = c.p_attributes->begin(); i != c.p_attributes->end(); ++i) {
405 s <<
"There are no attributes\n";
407 if (c.p_relationships) {
408 s <<
"The relationships are:\n";
409 for (std::list<OksRelationship*>::const_iterator i = c.p_relationships->begin(); i != c.p_relationships->end();
414 s <<
"There are no relationships\n";
417 s <<
"The methods are:\n";
418 for (std::list<OksMethod*>::const_iterator i = c.p_methods->begin(); i != c.p_methods->end(); ++i) {
422 s <<
"There are no methods\n";
427 s <<
"The objects are:\n";
429 for (OksObject::Map::iterator i = c.p_objects->begin(); i != c.p_objects->end(); ++i) {
430 sorted[i->first] = i->second;
433 for (OksObject::SMap::iterator i = sorted.begin(); i != sorted.end(); ++i) {
437 s <<
"There are no objects\n";
439 s <<
"End of Class \"" << c.p_name <<
"\"\n";
493 catch (std::exception& e) {
523 const char* tag_start = s.get_tag_start();
526 if (!strcmp(tag_start,
"/oks-schema")) {
533 }
catch (std::exception& e) {
559 s.throw_unexpected_tag(attr.
name(),
"oks-class\' attribute");
564 }
catch (std::exception& e) {
570 }
catch (std::exception& ex) {
580 const char* tag_start = s.get_tag_start();
591 unsigned long scl_pos = s.get_line_no();
597 std::string* scl =
new std::string(attr.
value(), attr.
value_len());
599 std::ostringstream text;
600 text <<
"second inclusion of super-class \"" + *scl +
"\" at line " << scl_pos;
602 throw std::runtime_error(text.str().c_str());
609 }
catch (std::exception& e) {
617 unsigned long attr_pos = s.get_line_no();
623 std::ostringstream text;
624 text <<
"redefinition of attribute with name \"" + a->
get_name() +
"\" at line " << attr_pos;
626 throw std::runtime_error(text.str().c_str());
631 }
catch (std::exception& e) {
639 unsigned long rel_pos = s.get_line_no();
645 std::ostringstream text;
646 text <<
"redefinition of relationship with name \"" + r->get_name() +
"\" at line " << rel_pos;
648 throw std::runtime_error(text.str().c_str());
653 }
catch (std::exception& e) {
661 unsigned long method_pos = s.get_line_no();
667 std::ostringstream text;
668 text <<
"redefinition of method with name \"" + m->get_name() +
"\" at line " << method_pos;
670 throw std::runtime_error(text.str().c_str());
675 }
catch (std::exception& e) {
684 s.throw_unexpected_tag(tag_start);
691 }
catch (std::exception& e) {
712 if ((*i)->get_name() == nm)
796 const char* item_type,
797 const std::string& item1_name,
798 const std::string& item2_name,
799 const std::string& class_name,
806 const std::string* name;
807 } info[] = { { b1, &item1_name }, { b2, &item2_name } };
809 for (
int i = 0; i < 2; ++i) {
811 std::string text(
"cannot find direct ");
814 text += *info[i].name;
815 text +=
"\" in class \"";
826 return (std::string(
"cannot add superclass \"") + c1 +
"\" to class \"" + c2 +
'\"');
847 text +=
" because class \"" +
p_name +
"\" already has such superclass.";
854 text +=
" because names of classes are the same.";
863 text +=
" because class \"" + nm +
"\" is already direct superclass of \"" +
p_name +
"\".";
867 text +=
" because class \"" + nm +
"\" is already non-direct superclass of \"" +
p_name +
"\".";
883 return (std::string(
"cannot remove superclass \"") + c1 +
"\" from class \"" + c2 +
'\"');
891 text +=
" because class \"" +
p_name +
"\" has no superclasses at all.";
898 lock_file(
"OksClass::remove_super_class");
915 text +=
" because class \"" +
p_name +
"\" has no superclass with this name.";
922 const char* fname =
"OksClass::swap_super_classes()";
941 else if (*(*i) == c2)
957 lock_file(
"OksClass::swap_super_classes");
959 std::string* s1 = *i1;
960 std::string* s2 = *i2;
977 if (_name == (*i)->get_name())
989 if (_name == (*i)->get_name())
1005 attribute->p_class =
this;
1011 const char* fname =
"OksClass::add(OksAttribute *)";
1017 std::ostringstream text;
1018 text <<
"cannot add attribute \"" << attribute->get_name() <<
"\" to class \"" <<
p_name
1020 "because the class already has attribute with this name.\n";
1025 lock_file(
"OksClass::add[OksAttribute]");
1028 attribute->p_class =
this;
1036 const char* fname =
"OksClass::swap(const OksAttribute *, const OksAttribute *)";
1049 std::list<OksAttribute*>::iterator i1 =
p_attributes->end();
1050 std::list<OksAttribute*>::iterator i2 =
p_attributes->end();
1055 else if ((*i) == a2)
1071 lock_file(
"OksClass::swap[OksAttribute]");
1084 const char* fname =
"OksClass::remove(OksAttribute *)";
1087 std::ostringstream text;
1088 text <<
"cannot remove attribute \"" << attribute->get_name() <<
"\" from class \"" <<
p_name
1090 "because the class has no attributes.\n";
1095 if (attribute == *i) {
1096 lock_file(
"OksClass::remove[OksAttribute]");
1112 std::ostringstream text;
1113 text <<
"cannot remove attribute \"" << attribute->get_name() <<
"\" from class \"" <<
p_name
1115 "because the class has no such attribute with this name.\n";
1134 if (_name == (*i)->get_name())
1147 if (_name == (*i)->get_name())
1169 const char* fname =
"OksClass::add(OksRelationship *)";
1175 std::ostringstream text;
1176 text <<
"cannot add relationship \"" << relationship->
get_name() <<
"\" to class \"" <<
p_name
1178 "because the class already has relationship with this name.\n";
1183 lock_file(
"OksClass::add[OksRelationship]");
1194 const char* fname =
"OksClass::remove(OksRelationship *)";
1197 std::ostringstream text;
1198 text <<
"cannot remove relationship \"" << relationship->
get_name() <<
"\" from class \"" <<
p_name
1200 "because the class has no relationships.\n";
1205 if (relationship == *i) {
1206 lock_file(
"OksClass::remove[OksRelationship]");
1224 std::ostringstream text;
1225 text <<
"cannot remove relationship \"" << relationship->
get_name() <<
"\" from class \"" <<
p_name
1227 "because the class has no such relationship with this name.\n";
1234 const char* fname =
"OksClass::swap(const OksRelationship *, const OksRelationship *)";
1253 else if ((*i) == r2)
1269 lock_file(
"OksClass::swap[OksRelationship]");
1293 for (std::list<OksMethod*>::const_iterator i =
p_methods->begin(); i !=
p_methods->end(); ++i)
1294 if (_name == (*i)->get_name())
1306 if (_name == (*i)->get_name())
1317 const char* fname =
"OksClass::add(OksMethod *)";
1320 p_methods =
new std::list<OksMethod*>();
1323 std::ostringstream text;
1324 text <<
"cannot add method \"" << method->
get_name() <<
"\" to class \"" <<
p_name
1326 "because the class already has method with this name.\n";
1344 const char* fname =
"OksClass::remove(OksMethod *)";
1347 std::ostringstream text;
1348 text <<
"cannot remove method \"" << method->
get_name() <<
"\" from class \"" <<
p_name
1350 "because the class has no methods.\n";
1354 for (std::list<OksMethod*>::iterator i =
p_methods->begin(); i !=
p_methods->end(); ++i) {
1356 lock_file(
"OksClass::remove[OksMethod]");
1372 std::ostringstream text;
1373 text <<
"cannot remove method \"" << method->
get_name() <<
"\" from class \"" <<
p_name
1375 "because the class has no such method with this name.\n";
1382 const char* fname =
"OksClass::swap(const OksMethod *, const OksMethod *)";
1395 std::list<OksMethod*>::iterator i1 =
p_methods->end();
1396 std::list<OksMethod*>::iterator i2 =
p_methods->end();
1398 for (std::list<OksMethod*>::iterator i =
p_methods->begin(); i !=
p_methods->end(); ++i) {
1401 else if ((*i) == m2)
1443std::list<OksObject*>*
1446 std::list<OksObject*>* olist = 0;
1451 olist =
new std::list<OksObject*>();
1453 for (OksObject::Map::const_iterator i =
p_objects->begin(); i !=
p_objects->end(); ++i)
1454 olist->push_back((*i).second);
1467 olist =
new std::list<OksObject*>();
1469 for (OksObject::Map::const_iterator i = sc->
p_objects->begin(); i != sc->
p_objects->end(); ++i)
1470 olist->push_back((*i).second);
1481 std::shared_lock lock(
p_mutex);
1484 OksObject::Map::const_iterator i =
p_objects->find(&
id);
1499 std::unique_lock lock(
p_mutex);
1501 if (!
p_objects->insert(std::pair<const std::string*, OksObject*>(&object->uid.object_id,
object)).second) {
1509 std::unique_lock lock(
p_mutex);
1515 OksObject::Map::iterator i =
p_objects->find(&object->uid.object_id);
1527 for (OksClass::FList::const_iterator i = clist.begin(); i != clist.end(); ++i) {
1540 c->add_super_classes(clist);
1561 std::ostringstream text;
1565 text <<
" - class \'" << (*i)->get_name() <<
"\'\n";
1586 if (
const FList* scl = c->p_all_super_classes) {
1587 for (FList::const_iterator j = scl->begin(); j != scl->end(); ++j) {
1601 return (
v ?
"multi-value" :
"single-value");
1609 static const std::string __enum_str__(
"enum");
1610 static const std::string __string_str__(
"string");
1612 const std::string& s1 = a1->
get_type();
1613 const std::string& s2 = a2->
get_type();
1616 !((s1 == s2) || ((s1 == __enum_str__ && s2 == __string_str__) || (s1 == __string_str__ && s2 == __enum_str__))));
1634 if (c->p_attributes) {
1635 for (std::list<OksAttribute*>::iterator i2 = c->p_attributes->begin(); i2 != c->p_attributes->end(); ++i2) {
1639 if (a1 == 0 && a2 == 0) {
1644 <<
"\' overrides one coming from superclass \'" << a->
p_class->
get_name() <<
'\'';
1647 <<
" found attribute \'" << a->
get_name() <<
"\' types conflict in class \'" <<
get_name() <<
"\':\n"
1650 <<
" type of attribute in class \'" <<
get_name() <<
"\' is \'" << a1->
get_type() <<
"\'\n";
1655 <<
" found attribute \'" << a->
get_name() <<
"\' types conflict in class \'" <<
get_name() <<
"\':\n"
1656 <<
" attribute in superclass \'" << a->
p_class->
get_name() <<
"\' is "
1664 <<
"\' overrides one coming from superclass \'" << a->
p_class->
get_name() <<
'\'';
1667 <<
" found attribute \'" << a->
get_name() <<
"\' types conflict in class \'" <<
get_name() <<
"\':\n"
1676 <<
" found attribute \'" << a->
get_name() <<
"\' types conflict in class \'" <<
get_name() <<
"\':\n"
1677 <<
" attribute in superclass \'" << a->
p_class->
get_name() <<
"\' is "
1679 <<
" attribute in superclass \'" <<
get_name() <<
"\' is \'"
1713 if (c->p_relationships) {
1714 for (std::list<OksRelationship*>::iterator i2 = c->p_relationships->begin(); i2 != c->p_relationships->end();
1720 if (!r->p_class_type) {
1724 if (r1 == 0 && r2 == 0) {
1729 <<
"\' overrides one coming from superclass \'" << r->p_class->get_name() <<
'\'';
1732 <<
" found relationship \'" << r->get_name() <<
"\' cardinality conflict in class \'" <<
get_name()
1734 <<
" relationship in superclass \'" << r->p_class->get_name() <<
"\' allows "
1735 <<
card2string(r->get_high_cardinality_constraint()) <<
"\n"
1736 <<
" relationship in class \'" <<
get_name() <<
"\' allows "
1742 <<
"\' overrides one coming from superclass \'" << r->p_class->get_name() <<
'\'';
1745 <<
" found relationship \'" << r->get_name() <<
"\' cardinality conflict in class \'" <<
get_name()
1747 <<
" relationship in superclass \'" << r->p_class->get_name() <<
"\' allows "
1748 <<
card2string(r->get_high_cardinality_constraint()) <<
"\n"
1749 <<
" relationship in superclass \'" << r2->
p_class->
get_name() <<
"\' allows "
1763 if (!r->p_class_type) {
1782 std::list<OksMethod*>::iterator i2;
1783 if ((*i)->p_methods) {
1784 for (i2 = (*i)->p_methods->begin(); i2 != (*i)->p_methods->end(); ++i2) {
1794 for (std::list<OksMethod*>::iterator i =
p_methods->begin(); i !=
p_methods->end(); ++i) {
1815 if (c->p_objects && !c->p_objects->empty()) {
1816 for (OksObject::Map::const_iterator i2 = c->p_objects->begin(); i2 != c->p_objects->end(); ++i2) {
1822 oldData->
cvt(&newData, a);
1824 memcpy(
static_cast<void*
>(oldData),
static_cast<void*
>(&newData),
sizeof(
OksData));
1827 std::ostringstream text;
1828 text <<
"attribute \'" << a->
get_name() <<
"\' change converting object " << o <<
' ';
1851 if (c->p_objects && !c->p_objects->empty()) {
1852 for (OksObject::Map::const_iterator i2 = c->p_objects->begin(); i2 != c->p_objects->end(); ++i2) {
1859 memcpy(
static_cast<void*
>(oldData),
static_cast<void*
>(&newData),
sizeof(
OksData));
1873 size_t dInfoLength = 0;
1874 bool thereAreChanges =
false;
1879 if (!thereAreChanges) {
1881 if (x ==
p_data_info->end() || x->second->attribute ==
nullptr || x->second->offset != dInfoLength ||
1882 !(*(x->second->attribute) == *a)) {
1883 thereAreChanges =
true;
1894 if (!thereAreChanges) {
1895 OksDataInfo::Map::const_iterator x =
p_data_info->find(r->get_name());
1896 if (x ==
p_data_info->end() || x->second->relationship ==
nullptr || x->second->offset != dInfoLength ||
1897 !(*(x->second->relationship) == *r)) {
1898 thereAreChanges =
true;
1902 (*dInfo)[r->get_name()] =
new OksDataInfo(dInfoLength++, r);
1906 if (thereAreChanges ==
true) {
1908 for (OksObject::Map::const_iterator i =
p_objects->begin(); i !=
p_objects->end(); ++i) {
1919 if (x !=
p_data_info->end() && x->second->attribute) {
1922 if (*(x->second->attribute) == *a) {
1923 memcpy(
static_cast<void*
>(&data[count++]),
static_cast<void*
>(oldData),
sizeof(
OksData));
1927 oldData->
cvt(&data[count++], a);
1942 OksDataInfo::Map::const_iterator x =
p_data_info->find(r->get_name());
1944 if (x !=
p_data_info->end() && x->second->relationship) {
1947 if (*(x->second->relationship) == *r) {
1948 memcpy(
static_cast<void*
>(&data[count++]),
static_cast<void*
>(oldData),
sizeof(
OksData));
2024 superclasses.push_back(*i2);
2034 switch (changeType) {
2036 c->create_super_classes();
2037 c->create_attributes();
2038 c->create_relationships();
2039 c->create_methods();
2043 c->create_attributes();
2047 c->create_relationships();
2051 c->create_methods();
2059 c->registrate_instances();
2065 if (
find(superclasses.begin(), superclasses.end(), *i2) == superclasses.end()) {
2066 superclasses.push_back(*i2);
2069 for (FList::const_iterator i2 = superclasses.begin(); i2 != superclasses.end(); ++i2) {
2075 c->create_sub_classes();
2080 superclasses.clear();
2100 bool found_problems =
false;
2103 for (
auto& x : *rels) {
2104 if (x->get_class_type() ==
nullptr) {
2105 if (found_problems ==
false) {
2106 found_problems =
true;
2107 out <<
" * there are problems with class \"" <<
get_name() <<
'\"';
2108 if (print_file_name) {
2109 out <<
" from file \"" <<
get_file()->get_full_file_name() <<
'\"';
2114 out <<
" - class type \"" << x->get_type() <<
"\" of relationship \"" << x->get_name()
2115 <<
"\" is not loaded\n";
2120 return found_problems;
static std::string fill(const OksAttribute &a, const OksObject *o, const std::string &reason) noexcept
Failed move item to file.
static std::string fill(const OksClass &c, const std::string &reason) noexcept
static std::string fill(const OksClass &c, const std::string &name) noexcept
static std::string fill(const OksClass &c, const std::string &what, const std::string &reason) noexcept
static std::string fill(const OksClass &c, const std::string &oid, const char *op, const std::string &reason) noexcept
bool get_is_multi_values() const noexcept
const std::string & get_type() const noexcept
Get attribute string type.
const std::string & get_name() const noexcept
out stream operator
OksAttribute(const std::string &name, OksClass *p=nullptr)
OKS attribute simple constructor.
void create_super_classes()
std::list< std::string * > * p_super_classes
void(*) NotifyFN(OksClass *)
OksRelationship * find_direct_relationship(const std::string &name) const noexcept
Find direct relationship.
void create_relationships()
size_t number_of_objects() const noexcept
void set_file(OksFile *f, bool update_owner=true)
Move class to different file.
bool check_relationships(std::ostringstream &out, bool print_file_name) const noexcept
OksObject::Map * p_objects
static const char superclass_xml_attr[]
OksClass * find_super_class(const std::string &) const noexcept
std::list< OksClass *, boost::fast_pool_allocator< OksClass * > > FList
OksAttribute * find_direct_attribute(const std::string &name) const noexcept
Find direct attribute.
void add_super_class(const std::string &name)
friend class OksAttribute
static void destroy_list(T list)
OksMethod * find_method(const std::string &name) const noexcept
Find method (search in this and base classes).
void registrate_class(bool skip_registered)
FList * p_all_sub_classes
void registrate_instances()
static NotifyFN create_notify_fn
std::list< OksAttribute * > * p_all_attributes
static void destroy_map(T map)
void add_super_classes(FList *) const
std::string p_description
static const char class_xml_tag[]
std::list< OksMethod * > * p_all_methods
bool operator!=(const OksClass &) const
The not equal operator.
OksRelationship * find_relationship(const std::string &name) const noexcept
Find relationship (search in this and base classes).
friend class OksRelationship
static const char description_xml_attr[]
void swap(const OksAttribute *a1, const OksAttribute *a2)
Swap order of two attributes.
void registrate_class_change(ChangeType, const void *, bool=true)
void add(OksAttribute *a)
Add attribute.
void swap_super_classes(const std::string &c1, const std::string &c2)
Swap order of two superclasses.
void registrate_relationship_change(OksRelationship *)
void save(OksXmlOutputStream &) const
void set_is_abstract(bool abstract)
Set class abstract property.
OksIndex::Map * p_indices
void(*) ChangeNotifyFN(OksClass *, ChangeType, const void *)
static NotifyFN delete_notify_fn
static const char is_abstract_xml_attr[]
void remove_super_class(const std::string &name)
const std::string & get_name() const noexcept
OksAttribute * find_attribute(const std::string &name) const noexcept
Find attribute (search in this and base classes).
std::list< OksRelationship * > * p_relationships
const std::list< OksRelationship * > * direct_relationships() const noexcept
void remove(const OksAttribute *a)
Remove attribute.
static ChangeNotifyFN change_notify_fn
void set_description(const std::string &description)
Set class description.
std::shared_mutex p_mutex
OksClass * source_class(const OksAttribute *a) const noexcept
Get class owning given attribute.
static const char name_xml_attr[]
bool compare_without_methods(const OksClass &c) const noexcept
OksClass(const std::string &name, OksKernel *kernel, bool transient=false)
Create OKS class.
std::vector< OksClass * > * p_inheritance_hierarchy
std::list< OksAttribute * > * p_attributes
OksObject * get_object(const std::string &id) const noexcept
Get object by ID.
void k_add(OksAttribute *a)
Kernel method to add attribute.
void registrate_attribute_change(OksAttribute *)
std::list< OksMethod * > * p_methods
std::list< OksObject * > * create_list_of_all_objects() const noexcept
Get all objects of the class (including derived).
OksDataInfo::Map * p_data_info
void lock_file(const char *)
OksFile * get_file() const noexcept
void k_add_super_class(const std::string &name)
static void destroy(OksClass *c)
Destroy OKS class.
std::list< OksRelationship * > * p_all_relationships
OksMethod * find_direct_method(const std::string &name) const noexcept
Find direct method.
ChangeType
Information about class property changes.
@ ChangeRelationshipsList
friend std::ostream & operator<<(std::ostream &, const OksClass &)
Stream operator.
bool has_direct_super_class(const std::string &) const noexcept
FList * p_all_super_classes
void create_sub_classes()
Provides interface to the OKS XML schema and data files.
void lock()
Lock OKS file.
bool is_dangling(OksClass *class_ptr) const
Check pointer on oks class.
void k_remove(OksClass *)
std::shared_mutex p_kernel_mutex
OksClass * find_class(const std::string &class_name) const
Find class by name (C++ string).
const std::string & get_name() const noexcept
OksMethod(const std::string &name, OksClass *p=nullptr)
OKS method constructor.
OksObject describes instance of OksClass.
std::map< const std::string *, OksObject *, SortById > SMap
std::unordered_map< const std::string *, OksObject *, oks::hash_str, oks::equal_str > Map
@ ClassRegistrateInstances
@ ClassRegistrateRelationshipChange
@ ClassRegistrateAttributeChange
@ ClassRegistrateClassChange
const std::string & get_name() const noexcept
CardinalityConstraint get_high_cardinality_constraint() const noexcept
Get relationship high cardinality constraint.
OksRelationship(const std::string &name, OksClass *p=nullptr)
OKS relationship simple constructor.
static std::ostream & warning_msg(const char *)
static std::string fill(const char *op, const std::string &reason) noexcept
virtual const char * what() const noexcept
#define OSK_PROFILING(FID, K)
#define TLOG_DEBUG(lvl,...)
const char * bool2str(bool b) noexcept
bool str2bool(const char *s) noexcept
bool cmp_str1(const char *s1, const char s2[2])
static void check_and_report_empty_parameter(const char *fname, bool b1, bool b2)
bool cmp_str4(const char *s1, const char s2[5])
bool cmp_str6(const char *s1, const char s2[7])
bool are_types_different(const OksAttribute *a1, const OksAttribute *a2)
static void check_and_report_found_items(const char *fname, const char *item_type, const std::string &item1_name, const std::string &item2_name, const std::string &class_name, bool b1, bool b2)
bool cmp_str10(const char *s1, const char s2[11])
const char * bool2value_type(bool v)
bool cmp_str9(const char *s1, const char s2[10])
static std::string add_super_class_error(const std::string &c1, const std::string &c2)
const char * card2string(OksRelationship::CardinalityConstraint cc)
void validate_not_empty(const std::string &value, const char *name)
void add_if_not_found(OksClass::FList &clist, OksClass *c)
bool cmp_str11(const char *s1, const char s2[12])
bool cmp_str12(const char *s1, const char s2[13])
static std::string remove_super_class_error(const std::string &c1, const std::string &c2)
FELIX Initialization std::string initerror FELIX queue timed out
OksDataInfo(size_t o, const OksAttribute *a)
Constructors.
std::map< std::string, OksDataInfo * > Map
Declare map of pointers to OksDataInfo (unsorted by name).
void cvt(OksData *to, const OksAttribute *attr) const
Convert data to new type.
enum dunedaq::oks::OksData::Type type
void ConvertTo(OksData *, const OksRelationship *) const