44 return std::string(
"cannot find superclass \'") + name +
"\' of class \'" + c.get_name() +
'\'';
51 s <<
"failed to convert \'" << a.get_name() <<
"\" value of object " << o <<
" because:\n" + reason;
58 return std::string(
"cannot register class \'") + c.get_name() +
"\' " +
what +
"because:\n" + reason;
64 return std::string(
"cannot destroy class \'") + c.get_name() +
"\' because:\n" + reason;
70 return std::string(
"cannot ") + op +
" object \'" + oid +
"\' in class \'" + c.get_name() +
"\' because:\n" + reason;
76 return std::string(
"method \'") + op +
"()\' failed because:\n" + reason;
107 std::unique_lock lock(
p_kernel->p_kernel_mutex);
141 std::unique_lock lock(
p_kernel->p_kernel_mutex);
163 p_file (kernel->p_active_schema),
180 if(!c->p_transient && c->p_kernel) {
181 std::unique_lock lock(c->p_kernel->p_kernel_mutex);
185 c->p_file->set_updated();
207 for (
const auto &x : *list)
220 for (
const auto &x : *map)
247 if (
p_kernel->is_dangling(c) || c->p_to_be_deleted)
250 c->create_sub_classes();
259 if (
p_kernel->is_dangling(c) || c->p_to_be_deleted)
268 std::cerr <<
"internal OKS error: registrate_class_change() failed during \'" <<
get_name() <<
"\' class destruction\ncaused by: " << ex.
what() << std::endl;
315 if(
this == &c)
return true;
325 int l2 = (c.p_attributes == 0) ? 0 : c.p_attributes->size();
327 if(l1 != l2)
return false;
330 std::list<OksAttribute *>::const_iterator i1 =
p_attributes->begin();
331 std::list<OksAttribute *>::const_iterator i2 = c.p_attributes->begin();
334 if( !(*(*i1) == *(*i2)) )
return false;
338 l2 = (c.p_relationships == 0) ? 0 : c.p_relationships->size();
340 if(l1 != l2)
return false;
343 std::list<OksRelationship *>::const_iterator i1 =
p_relationships->begin();
344 std::list<OksRelationship *>::const_iterator i2 = c.p_relationships->begin();
347 if( !(*(*i1) == *(*i2)) )
return false;
351 l2 = (c.p_super_classes == 0) ? 0 : c.p_super_classes->size();
353 if(l1 != l2)
return false;
356 std::list<std::string *>::const_iterator i1 =
p_super_classes->begin();
357 std::list<std::string *>::const_iterator i2 = c.p_super_classes->begin();
360 if( !(*(*i1) == *(*i2)) )
return false;
369 if(
this == &c)
return false;
374 int l2 = (c.p_methods == 0) ? 0 : c.p_methods->size();
376 if(l1 != l2)
return true;
379 std::list<OksMethod *>::const_iterator i1 =
p_methods->begin();
380 std::list<OksMethod *>::const_iterator i2 = c.p_methods->begin();
383 if( !(*(*i1) == *(*i2)) )
return true;
395 s <<
"Class name: \"" << c.p_name <<
"\"\n"
396 " has description: \"" << c.p_description <<
"\"\n"
397 << (c.p_abstract ==
true ?
" is abstract\n" :
" is not abstract\n");
399 if(c.p_super_classes) {
400 s <<
"The class has superclasses:\n";
401 for(std::list<std::string *>::const_iterator i = c.p_super_classes->begin(); i != c.p_super_classes->end(); ++i) {
402 s <<
" - " << *(*i) << std::endl;
406 s <<
"The class has no superclasses\n";
410 s <<
"The attributes are:\n";
411 for(std::list<OksAttribute *>::const_iterator i = c.p_attributes->begin(); i != c.p_attributes->end(); ++i) {
416 s <<
"There are no attributes\n";
419 if(c.p_relationships) {
420 s <<
"The relationships are:\n";
421 for(std::list<OksRelationship *>::const_iterator i = c.p_relationships->begin(); i != c.p_relationships->end(); ++i) {
426 s <<
"There are no relationships\n";
430 s <<
"The methods are:\n";
431 for(std::list<OksMethod *>::const_iterator i = c.p_methods->begin(); i != c.p_methods->end(); ++i) {
436 s <<
"There are no methods\n";
442 s <<
"The objects are:\n";
444 for(OksObject::Map::iterator i = c.p_objects->begin(); i != c.p_objects->end(); ++i) {
445 sorted[i->first] = i->second;
448 for(OksObject::SMap::iterator i = sorted.begin(); i != sorted.end(); ++i) {
453 s <<
"There are no objects\n";
456 s <<
"End of Class \"" << c.p_name <<
"\"\n";
511 catch (std::exception & e) {
543 const char * tag_start = s.get_tag_start();
546 if(!strcmp(tag_start,
"/oks-schema")) {
555 catch (std::exception & e) {
576 s.throw_unexpected_tag(attr.
name(),
"oks-class\' attribute");
583 catch (std::exception & e) {
591 catch(std::exception& ex) {
602 const char * tag_start = s.get_tag_start();
612 unsigned long scl_pos = s.get_line_no();
617 std::string * scl =
new std::string(attr.
value(), attr.
value_len());
620 std::ostringstream text;
621 text <<
"second inclusion of super-class \"" + *scl +
"\" at line " << scl_pos;
623 throw std::runtime_error(text.str().c_str());
632 catch (std::exception & e) {
641 unsigned long attr_pos = s.get_line_no();
647 std::ostringstream text;
648 text <<
"redefinition of attribute with name \"" + a->
get_name() +
"\" at line " << attr_pos;
650 throw std::runtime_error(text.str().c_str());
657 catch (std::exception & e) {
666 unsigned long rel_pos = s.get_line_no();
672 std::ostringstream text;
673 text <<
"redefinition of relationship with name \"" + r->get_name() +
"\" at line " << rel_pos;
675 throw std::runtime_error(text.str().c_str());
682 catch (std::exception & e) {
691 unsigned long method_pos = s.get_line_no();
697 std::ostringstream text;
698 text <<
"redefinition of method with name \"" + m->get_name() +
"\" at line " << method_pos;
700 throw std::runtime_error(text.str().c_str());
707 catch (std::exception & e) {
717 s.throw_unexpected_tag(tag_start);
727 catch (std::exception & e) {
751 if((*i)->get_name() == nm)
return *i;
763 if(nm == *(*i))
return true;
839 const std::string& item1_name,
const std::string& item2_name,
840 const std::string& class_name,
bool b1,
bool b2)
844 const std::string * name;
850 for(
int i = 0; i < 2; ++i) {
852 std::string text(
"cannot find direct ");
855 text += *info[i].name;
856 text +=
"\" in class \"";
867 return (std::string(
"cannot add superclass \"") + c1 +
"\" to class \"" + c2 +
'\"');
891 text +=
" because class \"" +
p_name +
"\" already has such superclass.";
898 text +=
" because names of classes are the same.";
907 text +=
" because class \"" + nm +
"\" is already direct superclass of \"" +
p_name +
"\".";
912 text +=
" because class \"" + nm +
"\" is already non-direct superclass of \"" +
p_name +
"\".";
928 return (std::string(
"cannot remove superclass \"") + c1 +
"\" from class \"" + c2 +
'\"');
936 text +=
" because class \"" +
p_name +
"\" has no superclasses at all.";
942 std::string * si(*i);
944 lock_file(
"OksClass::remove_super_class");
961 text +=
" because class \"" +
p_name +
"\" has no superclass with this name.";
969 const char * fname =
"OksClass::swap_super_classes()";
988 if(*(*i) == c1) i1 = i;
989 else if(*(*i) == c2) i2 = i;
995 "OksClass::swap_super_classes",
"superclass", c1, c2,
p_name,
1002 lock_file(
"OksClass::swap_super_classes");
1004 std::string * s1 = *i1;
1005 std::string * s2 = *i2;
1023 if(_name == (*i)->get_name())
return *i;
1035 if(_name == (*i)->get_name())
return *i;
1052 attribute->p_class =
this;
1059 const char * fname =
"OksClass::add(OksAttribute *)";
1066 std::ostringstream text;
1067 text <<
"cannot add attribute \"" << attribute->get_name() <<
"\" to class \"" <<
p_name <<
"\"\n"
1068 "because the class already has attribute with this name.\n";
1073 lock_file(
"OksClass::add[OksAttribute]");
1076 attribute->p_class =
this;
1085 const char * fname =
"OksClass::swap(const OksAttribute *, const OksAttribute *)";
1090 if(a1 == a2)
return;
1100 std::list<OksAttribute *>::iterator i1 =
p_attributes->end();
1101 std::list<OksAttribute *>::iterator i2 =
p_attributes->end();
1104 if((*i) == a1) i1 = i;
1105 else if((*i) == a2) i2 = i;
1118 lock_file(
"OksClass::swap[OksAttribute]");
1132 const char * fname =
"OksClass::remove(OksAttribute *)";
1135 std::ostringstream text;
1136 text <<
"cannot remove attribute \"" << attribute->get_name() <<
"\" from class \"" <<
p_name <<
"\"\n"
1137 "because the class has no attributes.\n";
1142 if(attribute == *i) {
1143 lock_file(
"OksClass::remove[OksAttribute]");
1159 std::ostringstream text;
1160 text <<
"cannot remove attribute \"" << attribute->get_name() <<
"\" from class \"" <<
p_name <<
"\"\n"
1161 "because the class has no such attribute with this name.\n";
1182 if(_name == (*i)->get_name())
return *i;
1193 if(_name == (*i)->get_name())
return *i;
1215 const char * fname =
"OksClass::add(OksRelationship *)";
1222 std::ostringstream text;
1223 text <<
"cannot add relationship \"" << relationship->
get_name() <<
"\" to class \"" <<
p_name <<
"\"\n"
1224 "because the class already has relationship with this name.\n";
1229 lock_file(
"OksClass::add[OksRelationship]");
1240 const char * fname =
"OksClass::remove(OksRelationship *)";
1243 std::ostringstream text;
1244 text <<
"cannot remove relationship \"" << relationship->
get_name() <<
"\" from class \"" <<
p_name <<
"\"\n"
1245 "because the class has no relationships.\n";
1250 if(relationship == *i) {
1251 lock_file(
"OksClass::remove[OksRelationship]");
1269 std::ostringstream text;
1270 text <<
"cannot remove relationship \"" << relationship->
get_name() <<
"\" from class \"" <<
p_name <<
"\"\n"
1271 "because the class has no such relationship with this name.\n";
1279 const char * fname =
"OksClass::swap(const OksRelationship *, const OksRelationship *)";
1284 if(r1 == r2)
return;
1298 if((*i) == r1) i1 = i;
1299 else if((*i) == r2) i2 = i;
1311 lock_file(
"OksClass::swap[OksRelationship]");
1338 for(std::list<OksMethod *>::const_iterator i =
p_methods->begin(); i !=
p_methods->end(); ++i)
1339 if(_name == (*i)->get_name())
return *i;
1350 if(_name == (*i)->get_name())
return *i;
1361 const char * fname =
"OksClass::add(OksMethod *)";
1364 p_methods =
new std::list<OksMethod *>();
1368 std::ostringstream text;
1369 text <<
"cannot add method \"" << method->
get_name() <<
"\" to class \"" <<
p_name <<
"\"\n"
1370 "because the class already has method with this name.\n";
1388 const char * fname =
"OksClass::remove(OksMethod *)";
1391 std::ostringstream text;
1392 text <<
"cannot remove method \"" << method->
get_name() <<
"\" from class \"" <<
p_name <<
"\"\n"
1393 "because the class has no methods.\n";
1397 for(std::list<OksMethod *>::iterator i =
p_methods->begin(); i !=
p_methods->end(); ++i) {
1399 lock_file(
"OksClass::remove[OksMethod]");
1415 std::ostringstream text;
1416 text <<
"cannot remove method \"" << method->
get_name() <<
"\" from class \"" <<
p_name <<
"\"\n"
1417 "because the class has no such method with this name.\n";
1424 const char * fname =
"OksClass::swap(const OksMethod *, const OksMethod *)";
1429 if(m1 == m2)
return;
1439 std::list<OksMethod *>::iterator i1 =
p_methods->end();
1440 std::list<OksMethod *>::iterator i2 =
p_methods->end();
1442 for(std::list<OksMethod *>::iterator i =
p_methods->begin(); i !=
p_methods->end(); ++i) {
1443 if((*i) == m1) i1 = i;
1444 else if((*i) == m2) i2 = i;
1490std::list<OksObject *> *
1493 std::list<OksObject *> * olist = 0;
1498 olist =
new std::list<OksObject *>();
1500 for(OksObject::Map::const_iterator i =
p_objects->begin(); i !=
p_objects->end(); ++i)
1501 olist->push_back((*i).second);
1513 if(!olist) olist =
new std::list<OksObject *>();
1515 for(OksObject::Map::const_iterator i = sc->
p_objects->begin(); i != sc->
p_objects->end(); ++i)
1516 olist->push_back((*i).second);
1528 std::shared_lock lock(
p_mutex);
1531 OksObject::Map::const_iterator i =
p_objects->find(&
id);
1532 if(i !=
p_objects->end())
return i->second;
1546 std::unique_lock lock(
p_mutex);
1548 if(!
p_objects->insert(std::pair<const std::string *,OksObject *>(&object->uid.object_id,
object) ).second) {
1556 std::unique_lock lock(
p_mutex);
1562 OksObject::Map::iterator i =
p_objects->find(&object->uid.object_id);
1572 for(OksClass::FList::const_iterator i = clist.begin(); i != clist.end(); ++i) {
1585 c->add_super_classes(clist);
1606 std::ostringstream text;
1610 text <<
" - class \'" << (*i)->get_name() <<
"\'\n";
1627 for(Map::iterator i =
p_kernel->p_classes.begin(); i !=
p_kernel->p_classes.end(); ++i) {
1630 if(
const FList* scl = c->p_all_super_classes) {
1631 for(FList::const_iterator j = scl->begin(); j != scl->end(); ++j) {
1643 return (
v ?
"multi-value" :
"single-value");
1651 static const std::string __enum_str__(
"enum");
1652 static const std::string __string_str__(
"string");
1654 const std::string& s1 = a1->
get_type();
1655 const std::string& s2 = a2->
get_type();
1658 !((s1 == s2) || ((s1 == __enum_str__ && s2 == __string_str__) || (s1 == __string_str__ && s2 == __enum_str__)))
1675 if(c->p_attributes) {
1676 for(std::list<OksAttribute *>::iterator i2 = c->p_attributes->begin(); i2 != c->p_attributes->end(); ++i2) {
1680 if( a1 == 0 && a2 == 0 ) {
1686 "\' overrides one coming from superclass \'" << a->
p_class->
get_name() <<
'\'';
1689 <<
" found attribute \'" << a->
get_name() <<
"\' types conflict in class \'" <<
get_name() <<
"\':\n"
1691 <<
" type of attribute in class \'" <<
get_name() <<
"\' is \'" << a1->
get_type() <<
"\'\n";
1696 <<
" found attribute \'" << a->
get_name() <<
"\' types conflict in class \'" <<
get_name() <<
"\':\n"
1706 <<
" found attribute \'" << a->
get_name() <<
"\' types conflict in class \'" <<
get_name() <<
"\':\n"
1708 <<
" type of attribute in superclass \'" << a2->
p_class->
get_name() <<
"\' is \'" << a2->
get_type() <<
"\'\n";
1713 <<
" found attribute \'" << a->
get_name() <<
"\' types conflict in class \'" <<
get_name() <<
"\':\n"
1748 if(c->p_relationships) {
1749 for(std::list<OksRelationship *>::iterator i2 = c->p_relationships->begin(); i2 != c->p_relationships->end(); ++i2) {
1754 if(!r->p_class_type) { r->p_class_type =
p_kernel->find_class(r->p_rclass); }
1756 if( r1 == 0 && r2 == 0) {
1762 "\' overrides one coming from superclass \'" << r->p_class->get_name() <<
'\'';
1765 <<
" found relationship \'" << r->get_name() <<
"\' cardinality conflict in class \'" <<
get_name() <<
"\':\n"
1766 <<
" relationship in superclass \'" << r->p_class->get_name() <<
"\' allows " <<
card2string(r->get_high_cardinality_constraint()) <<
"\n"
1772 "\' from superclass \'" << r2->
p_class->
get_name() <<
"\' overrides one coming from superclass \'" << r->p_class->get_name() <<
'\'';
1775 <<
" found relationship \'" << r->get_name() <<
"\' cardinality conflict in class \'" <<
get_name() <<
"\':\n"
1776 <<
" relationship in superclass \'" << r->p_class->get_name() <<
"\' allows " <<
card2string(r->get_high_cardinality_constraint()) <<
"\n"
1790 if(!r->p_class_type) {
1791 r->p_class_type =
p_kernel->find_class(r->p_rclass);
1808 std::list<OksMethod *>::iterator i2;
1809 if((*i)->p_methods) {
1810 for(i2 = (*i)->p_methods->begin(); i2 != (*i)->p_methods->end(); ++i2) {
1823 for(std::list<OksMethod *>::iterator i =
p_methods->begin(); i !=
p_methods->end(); ++i) {
1844 if(c->p_objects && !c->p_objects->empty()) {
1845 for(OksObject::Map::const_iterator i2 = c->p_objects->begin(); i2 != c->p_objects->end(); ++i2) {
1851 oldData->
cvt(&newData, a);
1853 memcpy(
static_cast<void *
>(oldData),
static_cast<void *
>(&newData),
sizeof(
OksData));
1857 std::ostringstream text;
1858 text <<
"attribute \'" << a->
get_name() <<
"\' change converting object " << o <<
' ';
1881 if(c->p_objects && !c->p_objects->empty()) {
1882 for(OksObject::Map::const_iterator i2 = c->p_objects->begin(); i2 != c->p_objects->end(); ++i2) {
1889 memcpy(
static_cast<void *
>(oldData),
static_cast<void *
>(&newData),
sizeof(
OksData));
1904 size_t dInfoLength = 0;
1905 bool thereAreChanges =
false;
1910 if(!thereAreChanges) {
1912 if( x ==
p_data_info->end() || x->second->attribute ==
nullptr || x->second->offset != dInfoLength || !(*(x->second->attribute) == *a) ) {
1913 thereAreChanges =
true;
1924 if(!thereAreChanges) {
1925 OksDataInfo::Map::const_iterator x =
p_data_info->find(r->get_name());
1926 if( x ==
p_data_info->end() || x->second->relationship ==
nullptr || x->second->offset != dInfoLength || !(*(x->second->relationship) == *r) ) {
1927 thereAreChanges =
true;
1931 (*dInfo)[r->get_name()] =
new OksDataInfo(dInfoLength++, r);
1935 if(thereAreChanges ==
true) {
1937 for(OksObject::Map::const_iterator i =
p_objects->begin(); i !=
p_objects->end(); ++i) {
1948 if(x !=
p_data_info->end() && x->second->attribute) {
1951 if(*(x->second->attribute) == *a) {
1952 memcpy(
static_cast<void *
>(&data[count++]),
static_cast<void *
>(oldData),
sizeof(
OksData));
1957 oldData->
cvt(&data[count++], a);
1971 OksDataInfo::Map::const_iterator x =
p_data_info->find(r->get_name());
1973 if(x !=
p_data_info->end() && x->second->relationship) {
1976 if(*(x->second->relationship) == *r) {
1977 memcpy(
static_cast<void *
>(&data[count++]),
static_cast<void *
>(oldData),
sizeof(
OksData));
2047 if(update_file)
p_file->set_updated();
2053 superclasses.push_back(*i2);
2062 switch(changeType) {
2064 c->create_super_classes();
2065 c->create_attributes();
2066 c->create_relationships();
2067 c->create_methods();
2071 c->create_attributes();
2075 c->create_relationships();
2079 c->create_methods();
2093 if(
find(superclasses.begin(), superclasses.end(), *i2) == superclasses.end()) {
2094 superclasses.push_back(*i2);
2097 for(FList::const_iterator i2 = superclasses.begin(); i2 != superclasses.end(); ++i2) {
2100 if(
p_kernel->is_dangling(c) || c->p_to_be_deleted)
continue;
2102 c->create_sub_classes();
2107 superclasses.clear();
2126 bool found_problems =
false;
2130 for(
auto & x : *rels)
2132 if(x->get_class_type() ==
nullptr)
2134 if(found_problems ==
false)
2136 found_problems =
true;
2137 out <<
" * there are problems with class \"" <<
get_name() <<
'\"';
2140 out <<
" from file \"" <<
get_file()->get_full_file_name() <<
'\"';
2145 out <<
" - class type \"" << x->get_type() <<
"\" of relationship \"" << x->get_name() <<
"\" is not loaded\n";
2150 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
void create_super_classes()
OksRelationship * find_direct_relationship(const std::string &name) const noexcept
Find direct relationship.
std::list< std::string * > * p_super_classes
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
OksAttribute * find_direct_attribute(const std::string &name) const noexcept
Find direct attribute.
void(* NotifyFN)(OksClass *)
void add_super_class(const std::string &name)
void(* ChangeNotifyFN)(OksClass *, ChangeType, const void *)
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).
std::list< OksMethod * > * p_methods
void registrate_class(bool skip_registered)
FList * p_all_sub_classes
std::list< OksRelationship * > * p_relationships
void registrate_instances()
static NotifyFN create_notify_fn
static void destroy_map(T map)
std::list< OksAttribute * > * p_attributes
void add_super_classes(FList *) const
std::string p_description
std::list< OksRelationship * > * p_all_relationships
static const char class_xml_tag[]
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[]
std::list< OksMethod * > * p_all_methods
void swap(const OksAttribute *a1, const OksAttribute *a2)
Swap order of two attributes.
void registrate_class_change(ChangeType, const void *, bool=true)
std::list< OksClass *, boost::fast_pool_allocator< OksClass * > > FList
void add(OksAttribute *a)
Add attribute.
void swap_super_classes(const std::string &c1, const std::string &c2)
Swap order of two superclasses.
std::vector< OksClass * > * p_inheritance_hierarchy
void registrate_relationship_change(OksRelationship *)
void save(OksXmlOutputStream &) const
void set_is_abstract(bool abstract)
Set class abstract property.
OksIndex::Map * p_indices
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).
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.
OksObject * get_object(const std::string &id) const noexcept
Get object by ID.
void k_add(OksAttribute *a)
Kernel method to add attribute.
std::list< OksAttribute * > * p_all_attributes
void registrate_attribute_change(OksAttribute *)
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.
OksMethod * find_direct_method(const std::string &name) const noexcept
Find direct method.
ChangeType
Information about class property changes.
@ ChangeRelationshipsList
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.
const std::string & get_name() const noexcept
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.
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)
std::ostream & operator<<(std::ostream &s, const oks::exception &ex)
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
Struct OKS data information.
std::map< std::string, OksDataInfo * > Map
Declare map of pointers to OksDataInfo (unsorted by name).
the structure to pass common parameters to various read() methods of OksData and OksObject class
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