|
libzypp 17.37.4
|
Base class for objects providing a numeric Id. More...
#include <zypp-core/base/providenumericid.h>
Public Member Functions | |
| TNumericIdType | numericId () const |
Protected Member Functions | |
| ProvideNumericId () | |
| Default ctor. | |
| ProvideNumericId (const ProvideNumericId &) | |
| Copy ctor. | |
| ProvideNumericId & | operator= (const ProvideNumericId &) |
| Assign. | |
| ProvideNumericId (ProvideNumericId &&rhs) noexcept | |
| Move ctor. | |
| ProvideNumericId & | operator= (ProvideNumericId &&rhs) noexcept |
| Move Assign. | |
| ~ProvideNumericId () | |
| Dtor. | |
| ProvideNumericId (const void *const) | |
| No-Id ctor (0). | |
Static Private Member Functions | |
| static TNumericIdType | nextId () |
| Provide the next Id to use. | |
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.
|
inlineprotectednoexcept |
Move ctor.
Definition at line 65 of file providenumericid.h.
|
inlineprotected |
Dtor.
Definition at line 72 of file providenumericid.h.
|
inlineprotected |
No-Id ctor (0).
Explicitly request Id 0. Use it with care!
Definition at line 78 of file providenumericid.h.
|
inline |
Definition at line 49 of file providenumericid.h.
|
inlineprotected |
Assign.
Definition at line 62 of file providenumericid.h.
|
inlineprotectednoexcept |
Move Assign.
Definition at line 69 of file providenumericid.h.
|
inlinestaticprivate |
Provide the next Id to use.
Definition at line 83 of file providenumericid.h.
|
private |
Definition at line 90 of file providenumericid.h.