added SchemaTest, fixed bug in class shipment, added contains methods to class schema and enabled some tests

This commit is contained in:
2026-01-09 09:32:47 +01:00
parent 930b9d1aa4
commit ac53526a27
7 changed files with 102 additions and 25 deletions
+20
View File
@@ -200,6 +200,22 @@ schema::const_iterator schema::end() const {
return schema_nodes_.end();
}
size_t schema::size() const {
return schema_nodes_.size();
}
bool schema::empty() const {
return schema_nodes_.empty();
}
schema::iterator schema::find(const std::type_index &ti) {
return schema_nodes_.find(ti);
}
schema::const_iterator schema::find(const std::type_index &ti) const {
return schema_nodes_.find(ti);
}
schema::iterator schema::find(const std::string &name) {
const auto result = repo_.basic_info(name);
if (!result) {
@@ -218,6 +234,10 @@ schema::const_iterator schema::find(const std::string &name) const {
return schema_nodes_.find(result->get().type_index());
}
bool schema::contains(const std::type_index &index) const {
return schema_nodes_.count(index) == 1;
}
void schema::dump(std::ostream &os) const {
repo_.dump(os);
}