strusPython  0.14
Classes | Public Member Functions | Friends | List of all members
strus::PatternMatcher Class Reference

Object representing a pattern match program. More...

#include <bindingObjects.hpp>

Public Member Functions

 PatternMatcher (const PatternMatcher &o)
 
 PatternMatcher ()
 
void pushTerm (const String &type_, const String &value_)
 Add operation push term. More...
 
void pushPattern (const String &name_)
 Add operation push term. More...
 
void pushExpression (const String &opname_, unsigned int argc_, int range_=0, unsigned int cardinality_=0)
 Add operation push expression. More...
 
void definePattern (const String &name_, bool visible)
 Add operation push pattern. More...
 
void attachVariable (const String &name_)
 Add operation attach variable. More...
 
void add (const PatternMatcher &o)
 Appends the operations of 'o' to this. More...
 
std::size_t size () const
 Get the number of items (sub expressions) on the stack as result of this expression. More...
 

Friends

class Query
 
class QueryAnalyzer
 
class DocumentAnalyzer
 
class PatternMatchLoader
 

Detailed Description

Object representing a pattern match program.

Constructor & Destructor Documentation

strus::PatternMatcher::PatternMatcher ( const PatternMatcher o)
inline
strus::PatternMatcher::PatternMatcher ( )
inline

Member Function Documentation

void strus::PatternMatcher::add ( const PatternMatcher o)

Appends the operations of 'o' to this.

Parameters
[in]oexpression to copy
void strus::PatternMatcher::attachVariable ( const String &  name_)

Add operation attach variable.

Note
The positions of the query matches of the referenced term or expression can be accessed through this variable in summarization.
Parameters
[in]name_name of the variable attached
Remarks
The stack is not changed
void strus::PatternMatcher::definePattern ( const String &  name_,
bool  visible 
)

Add operation push pattern.

Parameters
[in]name_name of the pattern created
void strus::PatternMatcher::pushExpression ( const String &  opname_,
unsigned int  argc_,
int  range_ = 0,
unsigned int  cardinality_ = 0 
)

Add operation push expression.

Parameters
[in]opname_name of the expression operator
[in]argc_number of operands (topmost elements from stack) of the expression
[in]range_range number for the expression span in the document
[in]cardinality_number that specifies the minimum size of a subset or subset permutation to match
void strus::PatternMatcher::pushPattern ( const String &  name_)

Add operation push term.

Parameters
[in]name_name of the referenced pattern
void strus::PatternMatcher::pushTerm ( const String &  type_,
const String &  value_ 
)

Add operation push term.

Parameters
[in]type_query term type name
[in]value_query term value
std::size_t strus::PatternMatcher::size ( ) const
inline

Get the number of items (sub expressions) on the stack as result of this expression.

Returns
the number of items (sub expressions)

Friends And Related Function Documentation

friend class DocumentAnalyzer
friend
friend class PatternMatchLoader
friend
friend class Query
friend
friend class QueryAnalyzer
friend

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