libzypp
10.5.0
|
Integral type with defined initial value when default constructed. More...
#include <DefaultIntegral.h>
Public Types | |
typedef _Tp | value_type |
Public Member Functions | |
DefaultIntegral (_Tp val_r=_Initial) | |
DefaultIntegral & | reset () |
Reset to the defined initial value. | |
_Tp & | get () |
Conversion to _Tp. | |
_Tp | get () const |
operator _Tp & () | |
operator _Tp () const | |
Arithmetic operations. | |
| |
DefaultIntegral & | operator= (_Tp rhs) |
DefaultIntegral & | operator+= (_Tp rhs) |
DefaultIntegral & | operator-= (_Tp rhs) |
DefaultIntegral & | operator*= (_Tp rhs) |
DefaultIntegral & | operator/= (_Tp rhs) |
DefaultIntegral & | operator++ () |
DefaultIntegral & | operator-- () |
DefaultIntegral | operator++ (int) |
DefaultIntegral | operator-- (int) |
Private Attributes | |
_Tp | _val |
Integral type with defined initial value when default constructed.
typedef DefaultIntegral<unsigned,0> Counter; std::map<KeyType,Counter> stats; for ( all keys ) ++(stats[key]);
maybe specialize for bool, add logical and bit operators
let _Initial default to 0 then remove base/Counter.h
Definition at line 41 of file DefaultIntegral.h.
typedef _Tp zypp::DefaultIntegral< _Tp, _Initial >::value_type |
Definition at line 44 of file DefaultIntegral.h.
zypp::DefaultIntegral< _Tp, _Initial >::DefaultIntegral | ( | _Tp | val_r = _Initial | ) | [inline] |
Definition at line 47 of file DefaultIntegral.h.
_Tp& zypp::DefaultIntegral< _Tp, _Initial >::get | ( | ) | [inline] |
Conversion to _Tp.
Definition at line 53 of file DefaultIntegral.h.
_Tp zypp::DefaultIntegral< _Tp, _Initial >::get | ( | ) | const [inline] |
Definition at line 54 of file DefaultIntegral.h.
zypp::DefaultIntegral< _Tp, _Initial >::operator _Tp & | ( | ) | [inline] |
Definition at line 56 of file DefaultIntegral.h.
zypp::DefaultIntegral< _Tp, _Initial >::operator _Tp | ( | ) | const [inline] |
Definition at line 57 of file DefaultIntegral.h.
DefaultIntegral& zypp::DefaultIntegral< _Tp, _Initial >::reset | ( | ) | [inline] |
Reset to the defined initial value.
Definition at line 61 of file DefaultIntegral.h.
DefaultIntegral& zypp::DefaultIntegral< _Tp, _Initial >::operator= | ( | _Tp | rhs | ) | [inline] |
Definition at line 67 of file DefaultIntegral.h.
DefaultIntegral& zypp::DefaultIntegral< _Tp, _Initial >::operator+= | ( | _Tp | rhs | ) | [inline] |
Definition at line 68 of file DefaultIntegral.h.
DefaultIntegral& zypp::DefaultIntegral< _Tp, _Initial >::operator-= | ( | _Tp | rhs | ) | [inline] |
Definition at line 69 of file DefaultIntegral.h.
DefaultIntegral& zypp::DefaultIntegral< _Tp, _Initial >::operator*= | ( | _Tp | rhs | ) | [inline] |
Definition at line 70 of file DefaultIntegral.h.
DefaultIntegral& zypp::DefaultIntegral< _Tp, _Initial >::operator/= | ( | _Tp | rhs | ) | [inline] |
Definition at line 71 of file DefaultIntegral.h.
DefaultIntegral& zypp::DefaultIntegral< _Tp, _Initial >::operator++ | ( | ) | [inline] |
Definition at line 73 of file DefaultIntegral.h.
DefaultIntegral& zypp::DefaultIntegral< _Tp, _Initial >::operator-- | ( | ) | [inline] |
Definition at line 74 of file DefaultIntegral.h.
DefaultIntegral zypp::DefaultIntegral< _Tp, _Initial >::operator++ | ( | int | ) | [inline] |
Definition at line 76 of file DefaultIntegral.h.
DefaultIntegral zypp::DefaultIntegral< _Tp, _Initial >::operator-- | ( | int | ) | [inline] |
Definition at line 77 of file DefaultIntegral.h.
_Tp zypp::DefaultIntegral< _Tp, _Initial >::_val [private] |
Definition at line 81 of file DefaultIntegral.h.