![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
Creating series of type-based contexts. More...
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>Namespaces | |
| namespace | util |
| namespace | lib |
| Implementation namespace for support and library code. | |
Typedefs | |
| typedef size_t | IxID |
Classes | |
| class | TypedContext< CX > |
| Provide type-IDs for a specific context. More... | |
| class | TypedContext< CX >::ID< TY > |
| type-ID More... | |
| class | TypedCounter |
| Utility providing a set of counters, each tied to a specific type. More... | |
| class | FamilyMember< TY > |
| Utility to produce member IDs for objects belonging to a "Family", as defined by a distinguishing type. More... | |
Functions | |
| string | showSize (size_t val) noexcept |