|
libzypp
15.24.2
|
Base class for objects providing a numeric Id. More...
#include <ProvideNumericId.h>
Public Member Functions | |
| TNumericIdType | numericId () const |
Protected Member Functions | |
| ProvideNumericId () | |
| Default ctor. More... | |
| ProvideNumericId (const ProvideNumericId &) | |
| Copy ctor. More... | |
| ProvideNumericId & | operator= (const ProvideNumericId &) |
| Assign. More... | |
| ~ProvideNumericId () | |
| Dtor. More... | |
| ProvideNumericId (const void *const ) | |
| No-Id ctor (0). More... | |
Static Private Member Functions | |
| static TNumericIdType | nextId () |
| Provide the next Id to use. More... | |
Private Attributes | |
| const TNumericIdType | _numericId |
Base class for objects providing a numeric Id.
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.
Definition at line 45 of file ProvideNumericId.h.
|
inlineprotected |
Default ctor.
Definition at line 54 of file ProvideNumericId.h.
|
inlineprotected |
Copy ctor.
Definition at line 58 of file ProvideNumericId.h.
|
inlineprotected |
Dtor.
Definition at line 65 of file ProvideNumericId.h.
|
inlineprotected |
No-Id ctor (0).
Explicitly request Id 0. Use it with care!
Definition at line 71 of file ProvideNumericId.h.
|
inline |
Definition at line 49 of file ProvideNumericId.h.
|
inlineprotected |
Assign.
Definition at line 62 of file ProvideNumericId.h.
|
inlinestaticprivate |
Provide the next Id to use.
Definition at line 76 of file ProvideNumericId.h.
|
private |
Definition at line 83 of file ProvideNumericId.h.