![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "lib/visitor-dispatcher.hpp"
For each possible call entry point via some subclass of the visitable hierarchy, we maintain a dispatcher table to keep track of all concrete tool implementations able to receive and process calls on objects of this subclass.
| TAR | the concrete target (subclass) type within the visitable hierarchy |
| TOOL | the overall tool family (base class of all concrete tools) |
Definition at line 109 of file visitor-dispatcher.hpp.
Static Public Attributes | |
| static Depend< Dispatcher< TAR, TOOL > > | instance |
| storage for the dispatcher table(s) | |
Public Member Functions | |
| ReturnType | forwardCall (TAR &target, TOOL &tool) |
| template<class TOOLImpl > | |
| void | enrol (TOOLImpl *typeref) |
Private Types | |
| using | ReturnType = TOOL::ReturnType |
| typedef ReturnType(* | Trampoline) (TAR &, TOOL &) |
Private Member Functions | |
| void | accomodate (size_t index) |
| bool | is_known (size_t id) |
| void | storePtr (size_t id, Trampoline func) |
| Trampoline | storedTrampoline (size_t id) |
Static Private Member Functions | |
| template<class TOOLImpl > | |
| static ReturnType | callTrampoline (TAR &obj, TOOL &tool) |
| generator for Trampoline functions, used to dispatch calls down to the right "treat"-Function on the correct concrete tool implementation class | |
| static ReturnType | errorHandler (TAR &target, TOOL &tool) |
Private Attributes | |
| std::vector< Trampoline > | table_ |
| VTable for storing the Trampoline pointers. | |
|
private |
Definition at line 111 of file visitor-dispatcher.hpp.
|
private |
Definition at line 132 of file visitor-dispatcher.hpp.
|
inlinestaticprivate |
generator for Trampoline functions, used to dispatch calls down to the right "treat"-Function on the correct concrete tool implementation class
Definition at line 120 of file visitor-dispatcher.hpp.
References INSTANCEOF.
|
inlineprivate |
Definition at line 140 of file visitor-dispatcher.hpp.
References Dispatcher< TAR, TOOL >::table_.
Referenced by Dispatcher< TAR, TOOL >::storePtr().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 148 of file visitor-dispatcher.hpp.
References Dispatcher< TAR, TOOL >::table_.
Referenced by Dispatcher< TAR, TOOL >::enrol().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 154 of file visitor-dispatcher.hpp.
References Dispatcher< TAR, TOOL >::accomodate(), and Dispatcher< TAR, TOOL >::table_.
Referenced by Dispatcher< TAR, TOOL >::enrol().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 164 of file visitor-dispatcher.hpp.
References Dispatcher< TAR, TOOL >::errorHandler(), and Dispatcher< TAR, TOOL >::table_.
Referenced by Dispatcher< TAR, TOOL >::forwardCall().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestaticprivate |
Definition at line 173 of file visitor-dispatcher.hpp.
Referenced by Dispatcher< TAR, TOOL >::storedTrampoline().
Here is the caller graph for this function:
|
inline |
Definition at line 183 of file visitor-dispatcher.hpp.
References Dispatcher< TAR, TOOL >::storedTrampoline().
Here is the call graph for this function:
|
inline |
Definition at line 192 of file visitor-dispatcher.hpp.
References Tag< TOOL >::get(), Dispatcher< TAR, TOOL >::is_known(), and Dispatcher< TAR, TOOL >::storePtr().
Here is the call graph for this function:
|
private |
VTable for storing the Trampoline pointers.
Definition at line 136 of file visitor-dispatcher.hpp.
Referenced by Dispatcher< TAR, TOOL >::accomodate(), Dispatcher< TAR, TOOL >::is_known(), Dispatcher< TAR, TOOL >::storedTrampoline(), and Dispatcher< TAR, TOOL >::storePtr().
|
static |
storage for the dispatcher table(s)
Definition at line 180 of file visitor-dispatcher.hpp.
Referenced by Applicable< TOOLImpl, typelist::Node< TAR, TYPES >, BASE >::Applicable(), and Visitable< TOOL >::dispatchOp().
Collaboration diagram for Dispatcher< TAR, TOOL >: