BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::HashTable_ComparatorWrapper< FUNCTOR > Class Template Reference

#include <bslstl_hashtable.h>

Public Member Functions

 HashTable_ComparatorWrapper ()
 
 HashTable_ComparatorWrapper (const FUNCTOR &fn)
 
void swap (HashTable_ComparatorWrapper &other)
 Exchange the value of this object with the specified other object.
 
template<class ARG1_TYPE , class ARG2_TYPE >
bool operator() (ARG1_TYPE &arg1, ARG2_TYPE &arg2) const
 
const FUNCTOR & functor () const
 

Detailed Description

template<class FUNCTOR>
class bslstl::HashTable_ComparatorWrapper< FUNCTOR >

This class provides a wrapper around a functor that can compare two values and return a bool, so that the function call operator is always declared as const qualified.

TBD Provide an optimization for the case of an empty base functor, where we can safely const_cast want calling the base class operator.

See bslstl_hashtable

Constructor & Destructor Documentation

◆ HashTable_ComparatorWrapper() [1/2]

template<class FUNCTOR >
bslstl::HashTable_ComparatorWrapper< FUNCTOR >::HashTable_ComparatorWrapper ( )
inline

Create a HashTable_ComparatorWrapper object wrapping a FUNCTOR that has its default value.

◆ HashTable_ComparatorWrapper() [2/2]

template<class FUNCTOR >
bslstl::HashTable_ComparatorWrapper< FUNCTOR >::HashTable_ComparatorWrapper ( const FUNCTOR &  fn)
inlineexplicit

Create a HashTable_ComparatorWrapper object wrapping a FUNCTOR that is a copy of the specified fn.

Member Function Documentation

◆ functor()

template<class FUNCTOR >
const FUNCTOR & bslstl::HashTable_ComparatorWrapper< FUNCTOR >::functor ( ) const

Return a reference providing non-modifiable access to the hash functor wrapped by this object.

◆ operator()()

template<class FUNCTOR >
template<class ARG1_TYPE , class ARG2_TYPE >
bool bslstl::HashTable_ComparatorWrapper< FUNCTOR >::operator() ( ARG1_TYPE &  arg1,
ARG2_TYPE &  arg2 
) const
inline

Call the wrapped functor with the specified arg1 and arg2 (in that order) and return the result. Note that ARGn_TYPE will typically be deduced as a const type.

◆ swap()

template<class FUNCTOR >
void bslstl::HashTable_ComparatorWrapper< FUNCTOR >::swap ( HashTable_ComparatorWrapper< FUNCTOR > &  other)
inline

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