![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "lib/visitor.hpp"
Marker interface or base class for all "Visitables".
Concrete types to be treated by a "visiting tool" derive from this interface and need to implement an #apply(Tool&), forwarding to the (internal, static, templated) dispatchOp. This is done best by using the DEFINE_PROCESSABLE_BY macro.
Definition at line 188 of file visitor.hpp.
Public Types | |
| using | ReturnType = TOOL::ReturnType |
Public Member Functions | |
| virtual ReturnType | apply (TOOL &)=0 |
| to be defined by the DEFINE_PROCESSABLE_BY macro in all classes wanting to be treated by some tool | |
Protected Types | |
| using | ToolBase = TOOL::ToolBase |
Protected Member Functions | |
| virtual | ~Visitable () |
Static Protected Member Functions | |
| template<class TAR > | |
| static ReturnType | dispatchOp (TAR &target, TOOL &tool) |
|
inlineprotectedvirtual |
Definition at line 199 of file visitor.hpp.
| using ReturnType = TOOL::ReturnType |
Definition at line 191 of file visitor.hpp.
|
protected |
Definition at line 202 of file visitor.hpp.
|
pure virtual |
to be defined by the DEFINE_PROCESSABLE_BY macro in all classes wanting to be treated by some tool
Referenced by VisitingToolExtended_test::known_visitor_known_class(), VisitingTool_test::visiting_extended_hierarchy(), VisitingToolExtended_test::visiting_mixed_hierarchy(), and VisitingToolExtended_test::visitor_not_visiting_some_class().
Here is the caller graph for this function:
|
inlinestaticprotected |
used by the DEFINE_PROCESSABLE_BY macro. Dispatches to the actual operation on the "visiting tool" (visitor implementation) Note: creates a context templated on concrete TAR.
Definition at line 211 of file visitor.hpp.
References Dispatcher< TAR, TOOL >::instance.
Inheritance diagram for Visitable< TOOL >:
Collaboration diagram for Visitable< TOOL >: