Bitcoin ABC  0.23.1
P2P Digital Currency
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
indirectmap< K, T > Class Template Reference

Map whose keys are pointers, but are compared by their dereferenced values. More...

#include <indirectmap.h>

Public Types

typedef base::iterator iterator
 
typedef base::const_iterator const_iterator
 
typedef base::size_type size_type
 
typedef base::value_type value_type
 

Public Member Functions

std::pair< iterator, bool > insert (const value_type &value)
 
iterator find (const K &key)
 
const_iterator find (const K &key) const
 
iterator lower_bound (const K &key)
 
const_iterator lower_bound (const K &key) const
 
size_type erase (const K &key)
 
size_type count (const K &key) const
 
bool empty () const
 
size_type size () const
 
size_type max_size () const
 
void clear ()
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 

Private Types

typedef std::map< const K *, T, DereferencingComparator< const K * > > base
 

Private Attributes

base m
 

Detailed Description

template<class K, class T>
class indirectmap< K, T >

Map whose keys are pointers, but are compared by their dereferenced values.

Differs from a plain std::map<const K*, T, DereferencingComparator<K*> > in that methods that take a key for comparison take a K rather than taking a K* (taking a K* would be confusing, since it's the value rather than the address of the object for comparison that matters due to the dereferencing comparator).

Objects pointed to by keys must not be modified in any way that changes the result of DereferencingComparator.

Definition at line 26 of file indirectmap.h.

Member Typedef Documentation

◆ base

template<class K , class T >
typedef std::map<const K *, T, DereferencingComparator<const K *> > indirectmap< K, T >::base
private

Definition at line 28 of file indirectmap.h.

◆ const_iterator

template<class K , class T >
typedef base::const_iterator indirectmap< K, T >::const_iterator

Definition at line 33 of file indirectmap.h.

◆ iterator

template<class K , class T >
typedef base::iterator indirectmap< K, T >::iterator

Definition at line 32 of file indirectmap.h.

◆ size_type

template<class K , class T >
typedef base::size_type indirectmap< K, T >::size_type

Definition at line 34 of file indirectmap.h.

◆ value_type

template<class K , class T >
typedef base::value_type indirectmap< K, T >::value_type

Definition at line 35 of file indirectmap.h.

Member Function Documentation

◆ begin() [1/2]

template<class K , class T >
iterator indirectmap< K, T >::begin ( )
inline

Definition at line 57 of file indirectmap.h.

◆ begin() [2/2]

template<class K , class T >
const_iterator indirectmap< K, T >::begin ( ) const
inline

Definition at line 59 of file indirectmap.h.

◆ cbegin()

template<class K , class T >
const_iterator indirectmap< K, T >::cbegin ( ) const
inline

Definition at line 61 of file indirectmap.h.

◆ cend()

template<class K , class T >
const_iterator indirectmap< K, T >::cend ( ) const
inline

Definition at line 62 of file indirectmap.h.

◆ clear()

template<class K , class T >
void indirectmap< K, T >::clear ( )
inline

Definition at line 56 of file indirectmap.h.

◆ count()

template<class K , class T >
size_type indirectmap< K, T >::count ( const K &  key) const
inline

Definition at line 50 of file indirectmap.h.

◆ empty()

template<class K , class T >
bool indirectmap< K, T >::empty ( ) const
inline

Definition at line 53 of file indirectmap.h.

◆ end() [1/2]

template<class K , class T >
iterator indirectmap< K, T >::end ( )
inline

Definition at line 58 of file indirectmap.h.

◆ end() [2/2]

template<class K , class T >
const_iterator indirectmap< K, T >::end ( ) const
inline

Definition at line 60 of file indirectmap.h.

◆ erase()

template<class K , class T >
size_type indirectmap< K, T >::erase ( const K &  key)
inline

Definition at line 49 of file indirectmap.h.

◆ find() [1/2]

template<class K , class T >
iterator indirectmap< K, T >::find ( const K &  key)
inline

Definition at line 43 of file indirectmap.h.

◆ find() [2/2]

template<class K , class T >
const_iterator indirectmap< K, T >::find ( const K &  key) const
inline

Definition at line 44 of file indirectmap.h.

◆ insert()

template<class K , class T >
std::pair<iterator, bool> indirectmap< K, T >::insert ( const value_type value)
inline

Definition at line 38 of file indirectmap.h.

◆ lower_bound() [1/2]

template<class K , class T >
iterator indirectmap< K, T >::lower_bound ( const K &  key)
inline

Definition at line 45 of file indirectmap.h.

◆ lower_bound() [2/2]

template<class K , class T >
const_iterator indirectmap< K, T >::lower_bound ( const K &  key) const
inline

Definition at line 46 of file indirectmap.h.

◆ max_size()

template<class K , class T >
size_type indirectmap< K, T >::max_size ( ) const
inline

Definition at line 55 of file indirectmap.h.

◆ size()

template<class K , class T >
size_type indirectmap< K, T >::size ( ) const
inline

Definition at line 54 of file indirectmap.h.

Here is the caller graph for this function:

Member Data Documentation

◆ m

template<class K , class T >
base indirectmap< K, T >::m
private

Definition at line 29 of file indirectmap.h.


The documentation for this class was generated from the following file: