BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::MapComparator< KEY, VALUE, COMPARATOR > Class Template Reference

#include <bslstl_mapcomparator.h>

Inheritance diagram for bslstl::MapComparator< KEY, VALUE, COMPARATOR >:

Public Types

typedef bsl::pair< const KEY, VALUE > ValueType
 
typedef TreeNode< ValueTypeNodeType
 This alias represents the type of node holding a ValueType object.
 

Public Member Functions

 MapComparator ()
 
 MapComparator (const COMPARATOR &keyComparator)
 
 MapComparator (const MapComparator &original)=default
 
 ~MapComparator ()=default
 
template<class LOOKUP_KEY >
bool operator() (const LOOKUP_KEY &lhs, const bslalg::RbTreeNode &rhs)
 
template<class LOOKUP_KEY >
bool operator() (const bslalg::RbTreeNode &lhs, const LOOKUP_KEY &rhs)
 
void swap (MapComparator &other)
 
template<class LOOKUP_KEY >
bool operator() (const LOOKUP_KEY &lhs, const bslalg::RbTreeNode &rhs) const
 
template<class LOOKUP_KEY >
bool operator() (const bslalg::RbTreeNode &lhs, const LOOKUP_KEY &rhs) const
 
COMPARATOR & keyComparator ()
 
const COMPARATOR & keyComparator () const
 

Member Typedef Documentation

◆ NodeType

template<class KEY , class VALUE , class COMPARATOR >
typedef TreeNode<ValueType> bslstl::MapComparator< KEY, VALUE, COMPARATOR >::NodeType

◆ ValueType

template<class KEY , class VALUE , class COMPARATOR >
typedef bsl::pair<const KEY, VALUE> bslstl::MapComparator< KEY, VALUE, COMPARATOR >::ValueType

This alias represents the type of the values held by nodes in an bslalg::RbTree object.

Constructor & Destructor Documentation

◆ MapComparator() [1/3]

template<class KEY , class VALUE , class COMPARATOR >
bslstl::MapComparator< KEY, VALUE, COMPARATOR >::MapComparator ( )
inline

Create a MapComparator object that will use a default constructed COMPARATOR.

◆ MapComparator() [2/3]

template<class KEY , class VALUE , class COMPARATOR >
bslstl::MapComparator< KEY, VALUE, COMPARATOR >::MapComparator ( const COMPARATOR &  keyComparator)
inlineexplicit

Create a MapComparator object holding a copy of the specified keyComparator.

◆ MapComparator() [3/3]

template<class KEY , class VALUE , class COMPARATOR >
bslstl::MapComparator< KEY, VALUE, COMPARATOR >::MapComparator ( const MapComparator< KEY, VALUE, COMPARATOR > &  original)
default

◆ ~MapComparator()

template<class KEY , class VALUE , class COMPARATOR >
bslstl::MapComparator< KEY, VALUE, COMPARATOR >::~MapComparator ( )
default

Member Function Documentation

◆ keyComparator() [1/2]

template<class KEY , class VALUE , class COMPARATOR >
COMPARATOR & bslstl::MapComparator< KEY, VALUE, COMPARATOR >::keyComparator ( )
inline

Return a reference providing modifiable access to the function pointer or functor to which this comparator delegates comparison operations.

◆ keyComparator() [2/2]

template<class KEY , class VALUE , class COMPARATOR >
const COMPARATOR & bslstl::MapComparator< KEY, VALUE, COMPARATOR >::keyComparator ( ) const
inline

Return a reference providing non-modifiable access to the function pointer or functor to which this comparator delegates comparison operations.

◆ operator()() [1/4]

template<class KEY , class VALUE , class COMPARATOR >
template<class LOOKUP_KEY >
bool bslstl::MapComparator< KEY, VALUE, COMPARATOR >::operator() ( const bslalg::RbTreeNode lhs,
const LOOKUP_KEY &  rhs 
)
inline

Return true if value().first() of the specified lhs after being cast to NodeType is less than (ordered before, according to the comparator held by this object) the specified rhs, and false otherwise. The behavior is undefined unless rhs can be safely cast to NodeType.

◆ operator()() [2/4]

template<class KEY , class VALUE , class COMPARATOR >
template<class LOOKUP_KEY >
bool bslstl::MapComparator< KEY, VALUE, COMPARATOR >::operator() ( const bslalg::RbTreeNode lhs,
const LOOKUP_KEY &  rhs 
) const
inline

Return true if value().first() of the specified lhs after being cast to NodeType is less than (ordered before, according to the comparator held by this object) the specified rhs, and false otherwise. The behavior is undefined unless rhs can be safely cast to NodeType.

◆ operator()() [3/4]

template<class KEY , class VALUE , class COMPARATOR >
template<class LOOKUP_KEY >
bool bslstl::MapComparator< KEY, VALUE, COMPARATOR >::operator() ( const LOOKUP_KEY &  lhs,
const bslalg::RbTreeNode rhs 
)
inline

Return true if the specified lhs is less than (ordered before, according to the comparator held by this object) value().first of the specified rhs after being cast to NodeType, and false otherwise. The behavior is undefined unless rhs can be safely cast to NodeType.

◆ operator()() [4/4]

template<class KEY , class VALUE , class COMPARATOR >
template<class LOOKUP_KEY >
bool bslstl::MapComparator< KEY, VALUE, COMPARATOR >::operator() ( const LOOKUP_KEY &  lhs,
const bslalg::RbTreeNode rhs 
) const
inline

Return true if the specified lhs is less than (ordered before, according to the comparator held by this object) value().first of the specified rhs after being cast to NodeType, and false otherwise. The behavior is undefined unless rhs can be safely cast to NodeType.

◆ swap()

template<class KEY , class VALUE , class COMPARATOR >
void bslstl::MapComparator< KEY, VALUE, COMPARATOR >::swap ( MapComparator< KEY, VALUE, COMPARATOR > &  other)
inline

Efficiently exchange the value of this object with the value of the specified other object. This method provides the no-throw exception-safety guarantee.


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