renamed schema to repository

This commit is contained in:
Sascha Kühl
2025-08-28 16:12:26 +02:00
parent cce7f2c099
commit 3ae2b003aa
45 changed files with 823 additions and 823 deletions
@@ -0,0 +1,33 @@
#include "matador/object/internal/shadow_repository.hpp"
#include "matador/object/repository.hpp"
#include "matador/object/repository_node.hpp"
namespace matador::object::internal {
shadow_repository::shadow_repository( object::repository& s )
: schema_(s) {}
repository& shadow_repository::repo() const {
return schema_;
}
bool shadow_repository::contains( const std::type_index& ti ) const {
return schema_.contains(ti);
}
utils::result<shadow_repository::node_ptr, utils::error> shadow_repository::find_node( const std::type_index& type_index ) const {
return schema_.find_node(type_index);
}
utils::result<shadow_repository::node_ptr, utils::error> shadow_repository::find_node( const std::string& name ) const {
return schema_.find_node(name);
}
utils::result<shadow_repository::node_ptr, utils::error> shadow_repository::attach_node( const std::shared_ptr<repository_node>& node ) const {
return schema_.attach_node(node, "");
}
utils::result<void, utils::error> shadow_repository::detach_node( const std::shared_ptr<repository_node>& node ) const {
return schema_.detach(node);
}
}
@@ -1,33 +0,0 @@
#include "matador/object/internal/shadow_schema.hpp"
#include "matador/object/schema.hpp"
#include "matador/object/schema_node.hpp"
namespace matador::object::internal {
shadow_schema::shadow_schema( object::schema& s )
: schema_(s) {}
schema& shadow_schema::schema() const {
return schema_;
}
bool shadow_schema::schema_contains( const std::type_index& ti ) const {
return schema_.contains(ti);
}
utils::result<shadow_schema::node_ptr, utils::error> shadow_schema::find_node( const std::type_index& type_index ) const {
return schema_.find_node(type_index);
}
utils::result<shadow_schema::node_ptr, utils::error> shadow_schema::find_node( const std::string& name ) const {
return schema_.find_node(name);
}
utils::result<shadow_schema::node_ptr, utils::error> shadow_schema::attach_node( const std::shared_ptr<schema_node>& node ) const {
return schema_.attach_node(node, "");
}
utils::result<void, utils::error> shadow_schema::detach_node( const std::shared_ptr<schema_node>& node ) const {
return schema_.detach(node);
}
}