Public Types | Static Public Member Functions | List of all members
aurora::DispatchTraits< K > Struct Template Reference

Helper base class to implement custom traits for dispatchers. More...

Public Types

typedef K Key
 Key to differentiate objects.
 

Static Public Member Functions

static const KeykeyFromId (const Key &k)
 Maps a key to itself (assuming key and type identifier are the same)
 
template<typename UnusedId , typename Fn >
static Fn trampoline1 (Fn f)
 Maps a function to itself (no trampoline needed)
 
template<typename UnusedId1 , typename UnusedId2 , typename Fn >
static Fn trampoline2 (Fn f)
 Maps a function to itself (no trampoline needed)
 
static const char * name (Key)
 Returns a string representation of the key, for debugging.
 

Detailed Description

template<typename K>
struct aurora::DispatchTraits< K >

Helper base class to implement custom traits for dispatchers.

This class provides some default type definitions and static member functions. Inherit it to customize and extend the traits – for example, you have to define keyFromBase().

Template Parameters
KThe key type that identifies the objects to dispatch.
See also
SingleDispatcher

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