Lumiera  0.pre.03
»edit your freedom«
TypedContext< CX > Class Template Reference

#include "lib/typed-counter.hpp"

Description

template<class CX>
class lib::TypedContext< CX >

Provide type-IDs for a specific context.

This facility allows to access a numeric ID for each given distinct type. Type-IDs may be used e.g. for dispatcher tables or for custom allocators. The type-IDs generated here are not completely global though. Rather, they are tied to a specific type context, e.g. a class implementing a custom allocator. These typed contexts are considered to be orthogonal and independent of each other.

Remarks
2023: allocation of global ID counters are protected by double-checked locking with mutex, which is deemed adequate.

Definition at line 95 of file typed-counter.hpp.

Static Public Member Functions

static IxID newTypeID (IxID &typeID)
 

Classes

class  ID
 type-ID More...
 

Static Private Attributes

static IxID lastGeneratedTypeID
 storage for the type-ID generation mechanism
 
+ Collaboration diagram for TypedContext< CX >:

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