Lumiera
0.pre.03
»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 197 of file visitor.hpp.
Public Types | |
typedef TOOL::ReturnType | 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 | |
typedef TOOL::ToolBase | ToolBase |
Static Protected Member Functions | |
template<class TAR > | |
static ReturnType | dispatchOp (TAR &target, TOOL &tool) |
|
protected |
Definition at line 208 of file visitor.hpp.
|
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 220 of file visitor.hpp.