Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Creating series of type-based contexts.
The idea is to get a "slot" for any given type, so we can build tables or families of implementations based on these types. Each of those "slots" can be addressed by a distinct (compile time) type, but at the same time holds a numeric ID (runtime assigned on demand). This setup allows to bridge between metaprogramming and (runtime) dispatcher tables.
Each such series of type-id-slots is associated to a distinct usage context. Those usage contexts are discerned by the template parameter CX
. Each of these usage contexts uses a separate numbering scheme on his own, i.e. every new type encountered at runtime gets the next higher ID number (slot).
Definition in file typed-counter.hpp.
#include "lib/error.hpp"
#include "lib/sync-classlock.hpp"
#include <atomic>
#include <string>
#include <deque>
Classes | |
class | FamilyMember< TY > |
Utility to produce member IDs for objects belonging to a "Family", as defined by a distinguishing type. More... | |
class | TypedContext< CX >::ID< TY > |
type-ID More... | |
class | TypedContext< CX > |
Provide type-IDs for a specific context. More... | |
class | TypedCounter |
Utility providing a set of counters, each tied to a specific type. More... | |
Typedefs | |
typedef size_t | IxID |
Functions | |
string | showSize (size_t val) noexcept |
Namespaces | |
lib | |
Implementation namespace for support and library code. | |