Constructors

Synopses

Declared in <bslstl_boyermoorehorspoolsearcher.h>

Create a BoyerMooreHorspoolSearcher object having same state ‐‐ needleFirst(), needleLast(), hash(), and equal() ‐‐ as the specified original object, and that uses the currently installed default allocator to supply memory.

Create a BoyerMooreHorspoolSearcher object having same state ‐‐ needleFirst(), needleLast(), hash(), and equal() ‐‐ as the specified original object by moving (in constant time) the state of original to the new searcher. The allocator of original is propagated for use in the newly created searcher. The original object is left in an unspecified (valid) state.

Create a BoyerMooreHorspoolSearcher object having same state ‐‐ needleFirst(), needleLast(), hash(), and equal() ‐‐ as the specified original object. The specified basicAllocator is used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The state of original is moved (in constant time) to the new searcher if basicAllocator == original.allocator(), and is move‐inserted (in linear time) using basicAllocator otherwise. The original object is left in an unspecified (valid) state.

Create a BoyerMooreHorspoolSearcher object having same state ‐‐ needleFirst(), needleLast(), hash(), and equal() ‐‐ as the specified original object. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

Create a BoyerMooreHorspoolSearcher object that can search for the sequence of value_type values found in the specified range [needleFirst, needleLast)]. Generate meta‐data and save for use by operator(). The complexity of this process is O(M) where M is the length of the "needle". Optionally specify a hash functor mapping mis‐matched values to the size of the next step in the search ‐‐ as large as, needleLast ‐ needleFirst. Optionally specify an equal functor for use with hash and for use by operator(). See {Requirements for HASH and EQUAL}. Optionally specify basicAllocator to supply memory. If basicAllocator is 0 or not supplied, the currently installed default allocator is used. The behavior is undefined unless needleFirst can be advanced to needleLast.

BoyerMooreHorspoolSearcher(
    RNDACC_ITR_NEEDLE needleFirst,
    RNDACC_ITR_NEEDLE needleLast,
    HASH hash = HASH(),
    EQUAL equal = EQUAL(),
    BloombergLP::bslma::Allocator* basicAllocator = 0);

Created with MrDocs