#include <ProvideNumericId.h>
Public Member Functions | |
_NumericIdType | numericId () const |
Protected Member Functions | |
ProvideNumericId () | |
Default ctor. | |
ProvideNumericId (const ProvideNumericId &) | |
Copy ctor. | |
ProvideNumericId & | operator= (const ProvideNumericId &) |
Assign. | |
~ProvideNumericId () | |
Dtor. | |
ProvideNumericId (const void *const ) | |
No-Id ctor (0). | |
Static Private Member Functions | |
static _NumericIdType | nextId () |
Provide the next Id to use. | |
Private Attributes | |
const _NumericIdType | _numericId |
The ctor creates a NumericId from some static counter.
The only assertion is that 0
is not used as an Id, unless the derived class explicitly requests this by using ProvideNumericId( const void *const ).
Why should you want to use 0
as an Id? E.g if your class provides some (singleton) No-object. Might be desirable to make the No-object have No-Id.
struct Foo : public base::ProvideNumericId<Foo,unsigned> {}; Foo foo; foo.numericId(); // returns foo's NumericId.
Definition at line 45 of file ProvideNumericId.h.
|
Default ctor.
Definition at line 54 of file ProvideNumericId.h. |
|
Copy ctor.
Definition at line 58 of file ProvideNumericId.h. |
|
Dtor.
Definition at line 65 of file ProvideNumericId.h. |
|
No-Id ctor (0).
Explicitly request Id Definition at line 71 of file ProvideNumericId.h. |
|
Definition at line 49 of file ProvideNumericId.h. |
|
Assign.
Definition at line 62 of file ProvideNumericId.h. |
|
Provide the next Id to use.
Definition at line 76 of file ProvideNumericId.h. |
|
Definition at line 83 of file ProvideNumericId.h. Referenced by zypp::base::ProvideNumericId< TraceCAD< _Tp >, unsigned long >::numericId(). |