![]() |
mutable
A Database System for Research and Fast Prototyping
|
#include <mutable/mutable-config.hpp>
#include <mutable/util/crtp.hpp>
#include <mutable/util/fn.hpp>
#include <mutable/util/macro.hpp>
#include <mutable/util/some.hpp>
#include <mutable/util/tag.hpp>
#include <optional>
#include <type_traits>
Go to the source code of this file.
Data Structures | |
struct | m::visit_stop_recursion |
Exception class which can be thrown to stop entire recursion in visitors. More... | |
struct | m::visit_skip_subtree |
Exception class which can be thrown to skip recursion of the subtree in pre-order visitors. More... | |
struct | m::detail::Visitor< ConcreteVisitor, Base > |
Visitor base class, using CRTP. More... | |
struct | m::detail::visitor_method_helper< ConcreteVisitor, Base, Class, Classes > |
This helper class creates a single definition of virtual void operator()(...) for one subtype in a class hierarchy, and then recursively inherits from an instantiation of that same helper class for the next subtype in the hierarchy. More... | |
struct | m::detail::visitor_method_helper< ConcreteVisitor, Base, Class > |
This specialization marks the end of the class hierarchy. More... | |
struct | m::detail::VisitorImpl< ConcreteVisitor, Base, Hierarchy > |
A helper class to define virtual visit methods for all classes in. More... | |
struct | m::detail::stl_visit_helper< Callable, ResultType, Visitor, Class, Classes > |
This helper class creates a single override of operator() for one subtype in a class hierarchy, and then recursively inherits from an instantiation of that same helper class for the next subtype in the hierarchy. More... | |
struct | m::detail::stl_visit_helper< Callable, ResultType, Visitor, Class > |
This specialization marks the end of the class hierarchy. More... | |
Namespaces | |
namespace | m |
| |
namespace | m::detail |
Macros | |
#define | M_MAKE_STL_VISITABLE(VISITOR, BASE_CLASS, CLASS_LIST) |
Defines a function visit() to make the class hierarchy STL-style visitable with VISITOR . | |
#define | M_DECLARE_VISITOR(VISITOR_NAME, BASE_CLASS, CLASS_LIST) |
Defines a visitor VISITOR_NAME to visit the class hierarchy rooted in BASE_CLASS and with subclasses CLASS_LIST . | |
Functions | |
template<typename Callable , typename Visitor , typename Base , typename... Hierarchy> | |
auto | m::visit (Callable &&callable, Base &obj, m::tag< Callable > &&=m::tag< Callable >()) |
Generic implementation to visit a class hierarchy, with similar syntax as std::visit . | |
#define M_DECLARE_VISITOR | ( | VISITOR_NAME, | |
BASE_CLASS, | |||
CLASS_LIST | |||
) |
Defines a visitor VISITOR_NAME
to visit the class hierarchy rooted in BASE_CLASS
and with subclasses CLASS_LIST
.
Also defines a function visit()
to make the class hierarchy STL-style visitable with VISITOR_NAME
.
All this must be done with a macro, such that the definition of the visitor class and the visit()
function reside in the current namespace (as chosen by the user of this macro). This enables argument-dependent lookup (ADL).
Definition at line 181 of file Visitor.hpp.
#define M_MAKE_STL_VISITABLE | ( | VISITOR, | |
BASE_CLASS, | |||
CLASS_LIST | |||
) |
Defines a function visit()
to make the class hierarchy STL-style visitable with VISITOR
.
All this must be done with a macro, such that the definition of the visitor class and the visit()
function reside in the current namespace (as chosen by the user of this macro). This enables argument-dependent lookup (ADL).
Definition at line 166 of file Visitor.hpp.