BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL > Class Template Reference

#include <bslstl_boyermoorehorspoolsearcher.h>

Public Types

typedef bsl::iterator_traits< RNDACC_ITR_NEEDLE >::value_type value_type
 
typedef bsl::iterator_traits< RNDACC_ITR_NEEDLE >::difference_type difference_type
 

Public Member Functions

 BoyerMooreHorspoolSearcher_GeneralImp (RNDACC_ITR_NEEDLE needleFirst, RNDACC_ITR_NEEDLE needleLast, HASH hash, EQUAL equal, BloombergLP::bslma::Allocator *basicAllocator)
 
 BoyerMooreHorspoolSearcher_GeneralImp (const BoyerMooreHorspoolSearcher_GeneralImp &original)
 
 BoyerMooreHorspoolSearcher_GeneralImp (BloombergLP::bslmf::MovableRef< BoyerMooreHorspoolSearcher_GeneralImp > original) BSLS_KEYWORD_NOEXCEPT
 
 BoyerMooreHorspoolSearcher_GeneralImp (const BoyerMooreHorspoolSearcher_GeneralImp &original, BloombergLP::bslma::Allocator *basicAllocator)
 
 BoyerMooreHorspoolSearcher_GeneralImp (BloombergLP::bslmf::MovableRef< BoyerMooreHorspoolSearcher_GeneralImp > original, BloombergLP::bslma::Allocator *basicAllocator)
 
BoyerMooreHorspoolSearcher_GeneralImpoperator= (const BoyerMooreHorspoolSearcher_GeneralImp &rhs)
 
BoyerMooreHorspoolSearcher_GeneralImpoperator= (BloombergLP::bslmf::MovableRef< BoyerMooreHorspoolSearcher_GeneralImp > rhs)
 
difference_type badCharacterSkip (const value_type &value) const
 
HASH hash () const
 Return the hashing functor supplied on construction.
 
EQUAL equal () const
 Return the equality comparison functor supplied on construction.
 
BloombergLP::bslma::Allocator * allocator () const
 Return the allocator used by this object to supply memory.
 

Detailed Description

template<class RNDACC_ITR_NEEDLE, class HASH, class EQUAL>
class bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >

This class template implements the same interfaces as the BoyerMooreHorspoolSearcher_CharImp for arbitrary value_type.

See bslstl_boyermoorehorspoolsearcher

Member Typedef Documentation

◆ difference_type

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
typedef bsl::iterator_traits<RNDACC_ITR_NEEDLE>::difference_type bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::difference_type

◆ value_type

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
typedef bsl::iterator_traits<RNDACC_ITR_NEEDLE>::value_type bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::value_type

Constructor & Destructor Documentation

◆ BoyerMooreHorspoolSearcher_GeneralImp() [1/5]

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::BoyerMooreHorspoolSearcher_GeneralImp ( RNDACC_ITR_NEEDLE  needleFirst,
RNDACC_ITR_NEEDLE  needleLast,
HASH  hash,
EQUAL  equal,
BloombergLP::bslma::Allocator *  basicAllocator 
)
inline

Create a BoyerMooreHorspoolSearcher_GeneralImp object for the sequence of value_type values in the specified range [needleFirst, needlelast). The specified hash and equal functors are used to store/access metadata associated with the needle. See {Requirements for HASH and EQUAL}. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The behavior is undefined unless needleFirst can be advanced to needleLast.

◆ BoyerMooreHorspoolSearcher_GeneralImp() [2/5]

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::BoyerMooreHorspoolSearcher_GeneralImp ( const BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL > &  original)
inline

Create a BoyerMooreHorspoolSearcher_GeneralImp object having same state as the specified original object. The allocator of original is propagated to the new object.

◆ BoyerMooreHorspoolSearcher_GeneralImp() [3/5]

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::BoyerMooreHorspoolSearcher_GeneralImp ( BloombergLP::bslmf::MovableRef< BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL > >  original)
inline

Create a BoyerMooreHorspoolSearcher_GeneralImp object having same state as the specified original object by moving (in constant time) the state of the original object to the new object. The allocator of original is propagated to the new object. The original object is left in an unspecified (valid) state.

◆ BoyerMooreHorspoolSearcher_GeneralImp() [4/5]

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::BoyerMooreHorspoolSearcher_GeneralImp ( const BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL > &  original,
BloombergLP::bslma::Allocator *  basicAllocator 
)
inline

Create a BoyerMooreHorspoolSearcher_GeneralImp object having the same state as the specified original object. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

◆ BoyerMooreHorspoolSearcher_GeneralImp() [5/5]

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::BoyerMooreHorspoolSearcher_GeneralImp ( BloombergLP::bslmf::MovableRef< BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL > >  original,
BloombergLP::bslma::Allocator *  basicAllocator 
)
inline

Create a BoyerMooreHorspoolSearcher_GeneralImp object having same state as the specified original object and that uses basicAllocator to supply memory. The state of original is moved (in constant time) to the new searcher if basicAllocator == original.allocator(), and is copied using basicAllocator otherwise. The original object is left in an unspecified (valid) state.

Member Function Documentation

◆ allocator()

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
BloombergLP::bslma::Allocator * bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::allocator ( ) const
inline

◆ badCharacterSkip()

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::difference_type bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::badCharacterSkip ( const value_type value) const
inline

Return the number of positions to advance the search in the haystack when the specified value is found in the rightmost position of the current (unsuccessful) match attempt.

◆ equal()

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
EQUAL bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::equal ( ) const
inline

◆ hash()

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
HASH bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::hash ( ) const
inline

◆ operator=() [1/2]

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL > & bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::operator= ( BloombergLP::bslmf::MovableRef< BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL > >  rhs)
inline

Assign to this object the state of the specified rhs object and return a non-const reference to this searcher. The rhs is left in an unspecified (valid) state.

◆ operator=() [2/2]

template<class RNDACC_ITR_NEEDLE , class HASH , class EQUAL >
BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL > & bslstl::BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL >::operator= ( const BoyerMooreHorspoolSearcher_GeneralImp< RNDACC_ITR_NEEDLE, HASH, EQUAL > &  rhs)
inline

Assign to this object the state of the specified rhs object, and return a non-const reference to this searcher object.


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