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 Key & | keyFromId (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. | |
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().
| K | The key type that identifies the objects to dispatch. |