#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.
| zypp::base::ProvideNumericId< _Derived, _NumericIdType >::ProvideNumericId | ( | ) | [inline, protected] |
| zypp::base::ProvideNumericId< _Derived, _NumericIdType >::ProvideNumericId | ( | const ProvideNumericId< _Derived, _NumericIdType > & | ) | [inline, protected] |
| zypp::base::ProvideNumericId< _Derived, _NumericIdType >::~ProvideNumericId | ( | ) | [inline, protected] |
| zypp::base::ProvideNumericId< _Derived, _NumericIdType >::ProvideNumericId | ( | const void * | const | ) | [inline, protected] |
No-Id ctor (0).
Explicitly request Id 0. Use it with care!
Definition at line 71 of file ProvideNumericId.h.
| _NumericIdType zypp::base::ProvideNumericId< _Derived, _NumericIdType >::numericId | ( | ) | const [inline] |
Definition at line 49 of file ProvideNumericId.h.
Referenced by zypp::operator<<(), and zypp::ProgressData::report().
| ProvideNumericId& zypp::base::ProvideNumericId< _Derived, _NumericIdType >::operator= | ( | const ProvideNumericId< _Derived, _NumericIdType > & | ) | [inline, protected] |
| static _NumericIdType zypp::base::ProvideNumericId< _Derived, _NumericIdType >::nextId | ( | ) | [inline, static, private] |
const _NumericIdType zypp::base::ProvideNumericId< _Derived, _NumericIdType >::_numericId [private] |
Definition at line 83 of file ProvideNumericId.h.
Referenced by zypp::base::ProvideNumericId< zypp::debug::TraceCAD< _Tp >, unsigned long >::numericId().
1.5.3