#include <overflow.h>
Public Member Functions | |
| void | add (_KeyType key, _ValueType value) |
| Add new "key, value" pair. | |
| _ValueType | get (_KeyType key) |
Static Public Member Functions | |
| static _ValueType | add_to_maximum (_ValueType a, _ValueType b) |
Private Types | |
| typedef std::map< _KeyType, _ValueType > | _overflows_map_t |
| Mapping is performed by simple map. | |
Private Attributes | |
| _overflows_map_t | _overflows_map |
| Mapping container. | |
Static Private Attributes | |
| static const _ValueType | _max_value = std::numeric_limits<_ValueType>::max() |
| Maximum allowed value for given type (may be safely static). | |
Although design of this class is quite general, within program it's used just to hold overflowen statistics, so the class name is kept related.
typedef std::map<_KeyType, _ValueType> ace::Overflow< _KeyType, _ValueType >::_overflows_map_t [private] |
Mapping is performed by simple map.
| void ace::Overflow< _KeyType, _ValueType >::add | ( | _KeyType | key, | |
| _ValueType | value | |||
| ) | [inline] |
Add new "key, value" pair.
| key | Key to be added. | |
| value | Value to be added. |
| static _ValueType ace::Overflow< _KeyType, _ValueType >::add_to_maximum | ( | _ValueType | a, | |
| _ValueType | b | |||
| ) | [inline, static] |
| a | First value to add. | |
| b | Second value to add. |
| _ValueType ace::Overflow< _KeyType, _ValueType >::get | ( | _KeyType | key | ) | [inline] |
| key | Key (must be already in, no checks are performed). |
const _ValueType ace::Overflow< _KeyType, _ValueType >::_max_value = std::numeric_limits<_ValueType>::max() [inline, static, private] |
Maximum allowed value for given type (may be safely static).
_overflows_map_t ace::Overflow< _KeyType, _ValueType >::_overflows_map [private] |
Mapping container.
1.5.6