added SchemaTest, fixed bug in class shipment, added contains methods to class schema and enabled some tests
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user