SearchContext< P > Struct Template Reference

a struct for optimizing multiple searches when backtracking takes place. More...

List of all members.

Public Member Functions

void Backtrack () const
 Initializes backtracking flag.
template<typename T >
bool HasNext (const DSILikeMatcher< T > *in_matcher, const void *in_pattern, const simba_int32 in_patternByteLength, const void *in_string, const simba_int32 in_stringByteLength, simba_int32 &out_resultLengthInBytes, simba_int32 &out_indexInBytes) const
 Get the next stored search offset.
void Init (simba_int32 in_offset)
 Initialize the search offset.
void Reset (simba_int32 in_offset) const
 Reset the SearchContext to a new Context.
void Reset () const
 Reset the SearchContext to a new Context.
 SearchContext (simba_int32 in_codeUnitSize)
 Constructor, builds SearchContext.
 SearchContext ()
 Default Constructor.

Detailed Description

template<typename P>
struct Simba::DSI::SearchContext< P >

a struct for optimizing multiple searches when backtracking takes place.


Constructor & Destructor Documentation

SearchContext (  )  [inline]

Default Constructor.

SearchContext ( simba_int32  in_codeUnitSize  )  [inline]

Constructor, builds SearchContext.

Parameters:
in_offset The offset to use with the match string.

Member Function Documentation

void Backtrack (  )  const [inline]

Initializes backtracking flag.

bool HasNext ( const DSILikeMatcher< T > *  in_matcher,
const void *  in_pattern,
const simba_int32  in_patternByteLength,
const void *  in_string,
const simba_int32  in_stringByteLength,
simba_int32 &  out_resultLengthInBytes,
simba_int32 &  out_indexInBytes 
) const [inline]

Get the next stored search offset.

Parameters:
in_matcher this pointer to use to perform search (NOT OWN)
in_pattern Void pointer to the pattern. Cannot be NULL. (NOT OWN)
in_patternByteLength The length of the pattern in bytes.
in_string Void pointer to the string being searched. Cannot be NULL. (NOT OWN)
in_stringByteLength The length of the string in bytes.
out_resultLengthInBytes Return the length of matched segment in bytes.
out_indexInBytes the index position in bytes if match found. If no match found, output SIMBA_NPOS.
Returns:
true if match was found, false otherwise.
void Init ( simba_int32  in_offset  )  [inline]

Initialize the search offset.

Parameters:
in_offset The offset to set the search context too.
void Reset ( simba_int32  in_offset  )  const [inline]

Reset the SearchContext to a new Context.

Parameters:
in_offset The offset to use with the match string.
void Reset (  )  const [inline]

Reset the SearchContext to a new Context.


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

Generated on Wed May 17 14:21:16 2017 for SimbaEngine 10.1.3.1011 by simba