added observer to repository and updated tests
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
#include "matador/object/observer.hpp"
|
||||
|
||||
namespace matador::object {
|
||||
abstract_observer::abstract_observer(const std::type_index& ti)
|
||||
: type_index_(ti) {}
|
||||
|
||||
const std::type_index& abstract_observer::index() const {
|
||||
return type_index_;
|
||||
}
|
||||
} // namespace matador::object
|
||||
@@ -55,7 +55,11 @@ const repository& repository_node::schema() const {
|
||||
bool repository_node::has_children() const {
|
||||
return first_child_->next_sibling_ != last_child_;
|
||||
}
|
||||
void repository_node::on_attach() const {
|
||||
info_->on_attach();
|
||||
}
|
||||
|
||||
void repository_node::on_detach() const {}
|
||||
repository_node::node_ptr repository_node::next() const {
|
||||
// if we have a child, child is the next iterator to return
|
||||
// (if we don't iterate over the siblings)
|
||||
|
||||
Reference in New Issue
Block a user