Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/typed-counter.hpp"
Utility to produce member IDs for objects belonging to a "Family", as defined by a distinguishing type.
Within each family, each new instance of FamilyMember holds a new distinct id number.
Definition at line 203 of file typed-counter.hpp.
Public Member Functions | |
operator size_t () const | |
operator string () const | |
Friends | |
string | operator+ (string const &prefix, FamilyMember id) |
string | operator+ (const char *prefix, FamilyMember id) |
Static Private Member Functions | |
static size_t | allocateNextMember () |
threadsafe allocation of member ID | |
Private Attributes | |
const size_t | id_ |
Static Private Attributes | |
static std::atomic_size_t | memberCounter {0} |
member counter shared per template instance More... | |
|
staticprivate |
member counter shared per template instance
allocate storage for the counter per type family
Definition at line 208 of file typed-counter.hpp.