#include <iosfwd>
Include dependency graph for InstanceId.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Classes | |
class | ScopedId |
class | InstanceId< Class, ValueType > |
Macros | |
#define | InstanceIdDefinitions3(Class, pfx, ValueType, ...) |
An InstanceIdDefinitions() helper. Avoid direct use. More... | |
#define | InstanceIdDefinitions(...) InstanceIdDefinitions3(__VA_ARGS__, InstanceIdDefaultValueType) |
convenience macro to instantiate Class-specific stuff in .cc files More... | |
Typedefs | |
typedef unsigned int | InstanceIdDefaultValueType |
Functions | |
std::ostream & | operator<< (std::ostream &os, const ScopedId &id) |
template<class Class , class ValueType > | |
std::ostream & | operator<< (std::ostream &os, const InstanceId< Class, ValueType > &id) |
print the id More... | |
Macro Definition Documentation
◆ InstanceIdDefinitions
#define InstanceIdDefinitions | ( | ... | ) | InstanceIdDefinitions3(__VA_ARGS__, InstanceIdDefaultValueType) |
Definition at line 93 of file InstanceId.h.
◆ InstanceIdDefinitions3
#define InstanceIdDefinitions3 | ( | Class, | |
pfx, | |||
ValueType, | |||
... | |||
) |
Value:
InstanceId<Class, ValueType>::prefix() const { \
return pfx; \
} \
template<> std::ostream & \
InstanceId<Class, ValueType>::print(std::ostream &os) const { \
return os << pfx << value; \
} \
template<> void \
InstanceId<Class, ValueType>::change() { \
static auto Last = Value(); \
value = ++Last ? Last : ++Last; \
}
const char * prefix() const
std::ostream & print(std::ostream &) const
writes a compact text representation of the ID
Definition at line 77 of file InstanceId.h.
Typedef Documentation
◆ InstanceIdDefaultValueType
typedef unsigned int InstanceIdDefaultValueType |
Definition at line 37 of file InstanceId.h.
Function Documentation
◆ operator<<() [1/2]
|
inline |
Definition at line 98 of file InstanceId.h.
◆ operator<<() [2/2]
std::ostream & operator<< | ( | std::ostream & | os, |
const ScopedId & | id | ||
) |
Definition at line 14 of file InstanceId.cc.