![]() |
Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
STL-like map container that only keeps the N elements with the highest value. More...
#include <limitedmap.h>
Collaboration diagram for limitedmap< K, V >:Public Types | |
| typedef K | key_type |
| typedef V | mapped_type |
| typedef std::pair< const key_type, mapped_type > | value_type |
| typedef std::map< K, V >::const_iterator | const_iterator |
| typedef std::map< K, V >::size_type | size_type |
Public Member Functions | |
| limitedmap (size_type nMaxSizeIn=0) | |
| const_iterator | begin () const |
| const_iterator | end () const |
| size_type | size () const |
| bool | empty () const |
| const_iterator | find (const key_type &k) const |
| size_type | count (const key_type &k) const |
| void | insert (const value_type &x) |
| void | erase (const key_type &k) |
| void | update (const_iterator itIn, const mapped_type &v) |
| size_type | max_size () const |
| size_type | max_size (size_type s) |
Protected Types | |
| typedef std::map< K, V >::iterator | iterator |
| typedef std::multimap< V, iterator >::iterator | rmap_iterator |
Protected Attributes | |
| std::map< K, V > | map |
| std::multimap< V, iterator > | rmap |
| size_type | nMaxSize |
STL-like map container that only keeps the N elements with the highest value.
Definition at line 12 of file limitedmap.h.
| typedef std::map<K, V>::const_iterator limitedmap< K, V >::const_iterator |
Definition at line 18 of file limitedmap.h.
|
protected |
Definition at line 23 of file limitedmap.h.
| typedef K limitedmap< K, V >::key_type |
Definition at line 15 of file limitedmap.h.
| typedef V limitedmap< K, V >::mapped_type |
Definition at line 16 of file limitedmap.h.
|
protected |
Definition at line 25 of file limitedmap.h.
| typedef std::map<K, V>::size_type limitedmap< K, V >::size_type |
Definition at line 19 of file limitedmap.h.
| typedef std::pair<const key_type, mapped_type> limitedmap< K, V >::value_type |
Definition at line 17 of file limitedmap.h.
|
inline |
Definition at line 29 of file limitedmap.h.
|
inline |
Definition at line 30 of file limitedmap.h.
|
inline |
Definition at line 35 of file limitedmap.h.
|
inline |
Definition at line 33 of file limitedmap.h.
|
inline |
Definition at line 31 of file limitedmap.h.
Referenced by CNode::AskFor().
Here is the caller graph for this function:
|
inline |
Definition at line 50 of file limitedmap.h.
|
inline |
Definition at line 34 of file limitedmap.h.
Referenced by CNode::AskFor().
Here is the caller graph for this function:
|
inline |
Definition at line 36 of file limitedmap.h.
References limitedmap< K, V >::nMaxSize.
Referenced by CNode::AskFor().
Here is the caller graph for this function:
|
inline |
Definition at line 87 of file limitedmap.h.
References limitedmap< K, V >::nMaxSize.
|
inline |
Definition at line 88 of file limitedmap.h.
References limitedmap< K, V >::nMaxSize.
|
inline |
Definition at line 32 of file limitedmap.h.
|
inline |
Definition at line 67 of file limitedmap.h.
Referenced by CNode::AskFor().
Here is the caller graph for this function:
|
protected |
Definition at line 22 of file limitedmap.h.
|
protected |
Definition at line 26 of file limitedmap.h.
Referenced by limitedmap< K, V >::insert(), and limitedmap< K, V >::max_size().
|
protected |
Definition at line 24 of file limitedmap.h.
1.8.8