Lumiera  0.pre.03
»edit your freedom«
Dispatcher< TAR, TOOL > Class Template Reference

Description

template<class TAR, class TOOL>
class lumiera::visitor_concept_draft::Dispatcher< TAR, TOOL >

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.

Definition at line 163 of file visitingtool-concept.cpp.

Public Member Functions

template<class TOOLImpl >
void enrol (TOOLImpl *typeKey)
 
ReturnType forwardCall (TAR &target, TOOL &tool)
 

Static Public Attributes

static lib::Depend< Dispatcher< TAR, TOOL > > instance
 storage for the dispatcher table(s)
 

Private Types

typedef TOOL::ReturnType ReturnType
 
typedef ReturnType(* Trampoline) (TAR &, TOOL &)
 

Private Member Functions

bool is_known (size_t id)
 
Trampoline storedTrampoline (size_t id)
 
void storePtr (size_t id, Trampoline func)
 

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 &, TOOL &)
 

Private Attributes

std::vector< Trampoline > table_
 custom VTable for storing the Trampoline pointers
 
+ Collaboration diagram for Dispatcher< TAR, TOOL >:

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