![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
A library implementation of the Visitor Pattern tailored specifically to Lumiera's needs within the Steam Layer. More...
Go to the source code of this file.
A library implementation of the Visitor Pattern tailored specifically to Lumiera's needs within the Steam Layer.
Visitor enables double dispatch calls, based both on the concrete type of some target object and the concrete type of a tool object being applied to this target. The code carrying out this tool application (and thus triggering the double dispatch) need not know any of these concrete types and is thus completely decoupled form implementation details encapsulated within the visiting tool. The visiting tool implementation class provides specific "treat(ConcreteVisitable&)" functions, and this visitor lib will dispatch the call to the* correct "treat"-function based on the concrete target visitable type.
Implementation notes
Definition in file visitor.hpp.
#include "lib/visitor-policies.hpp"#include "lib/visitor-dispatcher.hpp"#include "lib/meta/typelist.hpp"Namespaces | |
| namespace | lib |
| Implementation namespace for support and library code. | |
| namespace | lib::visitor |
Macros | |
| #define | DEFINE_PROCESSABLE_BY(TOOL) |
| mark a Visitable subclass as actually treat-able by some "visiting tool" base interface. | |
Classes | |
| class | Tool< RET, ERR > |
| Marker interface / base class for all "visiting tools". More... | |
| class | Applicable< TOOLImpl, typelist::Nil, BASE > |
| class | Applicable< TOOLImpl, typelist::Node< TAR, TYPES >, BASE > |
| class | Visitable< TOOL > |
| Marker interface or base class for all "Visitables". More... | |
| #define DEFINE_PROCESSABLE_BY | ( | TOOL | ) |
mark a Visitable subclass as actually treat-able by some "visiting tool" base interface.
Defines the apply-function, which is the actual access point to invoke the visiting
Definition at line 222 of file visitor.hpp.