Lumiera  0.pre.03
»edit your freedom«
Visitable< TOOL > Class Template Referenceabstract

#include "lib/visitor.hpp"

Description

template<class TOOL = Tool<>>
class lib::visitor::Visitable< TOOL >

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)
 

Member Typedef Documentation

◆ ToolBase

typedef TOOL::ToolBase ToolBase
protected
Note
may differ from TOOL

Definition at line 208 of file visitor.hpp.

Member Function Documentation

◆ dispatchOp()

static ReturnType dispatchOp ( TAR &  target,
TOOL &  tool 
)
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.

+ Inheritance diagram for Visitable< TOOL >:
+ Collaboration diagram for Visitable< TOOL >:

The documentation for this class was generated from the following file: