iDRS™ SDK 16
Loading...
Searching...
No Matches
CSearchContext_interface.h File Reference

Interface for CSearchContext wrapper. More...

Go to the source code of this file.

Enumerations

enum  SearchType { SearchNumber = 0 , SearchDate = 1 , SearchText = 2 , SearchRegex = 3 }
 Types of searches supported. More...
 
enum  MatchPosition {
  MatchPositionUp = 1 , MatchPositionDown = 16 , MatchPositionLeft = 64 , MatchPositionRight = 4 ,
  MatchPositionUpLeft = 128 , MatchPositionUpRight = 2 , MatchPositionDownLeft = 32 , MatchPositionDownRight = 8
}
 Position of a search match in the context of chained searches. More...
 

Functions

enum SearchType CSearchContext_GetType (const CSearchContext argCSearchContext, idrs_exception *pargException)
 Gets the context search type.
 
void CSearchContext_SetIdentifier (CSearchContext argCSearchContext, const idrs_string strIdentifier, idrs_exception *pargException)
 Sets a unique identifier to the context.
 
const idrs_string CSearchContext_GetIdentifier (const CSearchContext argCSearchContext, idrs_exception *pargException)
 Gets the context identifier.
 
CSearchContext CSearchContext_FollowedBy (CSearchContext argCSearchContext, enum MatchPosition evMatchPosition, const CSearchContext objContext, idrs_exception *pargException)
 Specifies the next context to be searched for, after the current context has been matched.
 
CSearchContextArray ArrayInterface_Create_CSearchContextArray (idrs_exception *pargException)
 Creates a new CSearchContextArray object.
 

Detailed Description

Interface for CSearchContext wrapper.

Enumeration Type Documentation

◆ MatchPosition

Position of a search match in the context of chained searches.

Enumerator
MatchPositionUp 

The following match must be found on top of the current match.

MatchPositionDown 

The following match must be found on bottom of the current match.

MatchPositionLeft 

The following match must be found on the left of the current match.

MatchPositionRight 

The following match must be found on the right of the current match.

MatchPositionUpLeft 

The following match must be found on top left of the current match.

MatchPositionUpRight 

The following match must be found on top right of the current match.

MatchPositionDownLeft 

The following match must be found on bottom left of the current match.

MatchPositionDownRight 

The following match must be found on bottom right of the current match.

◆ SearchType

enum SearchType

Types of searches supported.

Enumerator
SearchNumber 

Search for occurrences matching number formats, including eventual prefixes or suffixes.

SearchDate 

Search for occurrences matching date formats.

Several types of representations are supported.

SearchText 

Search for occurrences matching a provided text.

SearchRegex 

Search for occurrences matching a provided regex.

Function Documentation

◆ ArrayInterface_Create_CSearchContextArray()

CSearchContextArray ArrayInterface_Create_CSearchContextArray ( idrs_exception *  pargException)

Creates a new CSearchContextArray object.

Parameters
pargExceptionPointer to exception structure that will be filled if an exception occurs
Returns
The newly created CSearchContextArray

◆ CSearchContext_FollowedBy()

CSearchContext CSearchContext_FollowedBy ( CSearchContext  argCSearchContext,
enum MatchPosition  evMatchPosition,
const CSearchContext  objContext,
idrs_exception *  pargException 
)

Specifies the next context to be searched for, after the current context has been matched.

Parameters
argCSearchContextCSearchContext handle
evMatchPositionThe position relative to the current match where the next context must be matched.
objContextThe next context to be searched for after the current context has been matched.
pargExceptionPointer to exception structure that will be filled if an exception occurs
Note
The current context is only considered a match when all chained contexts are also matched.
Remarks
Calling this method on an object already having a "followed by" defined will append the new context at the end of the chain owned by this parent, and not replace it.
A Context can be parent of only 1 chain, but can be present in multiple chains as a child. If so its chain will be used as a branch of the parent’s chain.
Returns
The current object itself, for method chaining.

◆ CSearchContext_GetIdentifier()

const idrs_string CSearchContext_GetIdentifier ( const CSearchContext  argCSearchContext,
idrs_exception *  pargException 
)

Gets the context identifier.

If an identifier was previously assigned using SetIdentifier, it will be returned. Otherwise, a system-generated identifier will be provided.

Returns
The identifier associated with the search context.
Parameters
argCSearchContextCSearchContext handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CSearchContext_GetType()

enum SearchType CSearchContext_GetType ( const CSearchContext  argCSearchContext,
idrs_exception *  pargException 
)

Gets the context search type.

Returns
The context search type
Parameters
argCSearchContextCSearchContext handle
pargExceptionPointer to exception structure that will be filled if an exception occurs

◆ CSearchContext_SetIdentifier()

void CSearchContext_SetIdentifier ( CSearchContext  argCSearchContext,
const idrs_string  strIdentifier,
idrs_exception *  pargException 
)

Sets a unique identifier to the context.

This identifier is used to reference the context containing matched content after the search process is completed.

If no identifier is explicitly assigned via this method, a unique identifier will be automatically generated.

Parameters
argCSearchContextCSearchContext handle
strIdentifierThe user-defined identifier for the search context.
pargExceptionPointer to exception structure that will be filled if an exception occurs