![]() |
Lumiera 0.pre.04
»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 | |
| FamilyMember () | |
| operator size_t () const | |
| operator string () const | |
Friends | |
| string | operator+ (string const &prefix, FamilyMember id) |
| string | operator+ (CStr 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 | |
|
inline |
Definition at line 218 of file typed-counter.hpp.
|
inlinestaticprivate |
threadsafe allocation of member ID
Definition at line 212 of file typed-counter.hpp.
References FamilyMember< TY >::memberCounter.
|
inline |
Definition at line 222 of file typed-counter.hpp.
References FamilyMember< TY >::id_.
|
inline |
Definition at line 227 of file typed-counter.hpp.
References util::showSize().
Here is the call graph for this function:
|
private |
Definition at line 205 of file typed-counter.hpp.
Referenced by FamilyMember< TY >::operator size_t().
|
staticprivate |
member counter shared per template instance
allocate storage for the counter per type family
Definition at line 208 of file typed-counter.hpp.
Referenced by FamilyMember< TY >::allocateNextMember().
|
friend |
Definition at line 233 of file typed-counter.hpp.
|
friend |
Definition at line 239 of file typed-counter.hpp.
Collaboration diagram for FamilyMember< TY >: