Mapper  0.9.0
API documentation
Public Types | Public Member Functions | List of all members
OpenOrienteering::ObjectQueryParser Class Reference

Utility to construct object queries from text. More...

#include <object_query.h>

Public Types

enum  TokenType {
  TokenUnknown = 0, TokenNothing, TokenString, TokenWord,
  TokenTextOperator, TokenOr, TokenAnd, TokenLeftParen,
  TokenRightParen
}
 

Public Member Functions

ObjectQuery parse (const QString &text)
 Returns an ObjectQuery for the given text. More...
 
int errorPos () const
 In case of error, returns the approximate position where parsing the text failed. More...
 

Detailed Description

Utility to construct object queries from text.

The text shall be in the formal language generate by ObjectQuery::toString().

Member Enumeration Documentation

◆ TokenType

Enumerator
TokenUnknown 
TokenNothing 
TokenString 
TokenWord 
TokenTextOperator 
TokenOr 
TokenAnd 
TokenLeftParen 
TokenRightParen 

Member Function Documentation

◆ errorPos()

int OpenOrienteering::ObjectQueryParser::errorPos ( ) const

In case of error, returns the approximate position where parsing the text failed.

◆ parse()

ObjectQuery OpenOrienteering::ObjectQueryParser::parse ( const QString text)

Returns an ObjectQuery for the given text.

The return query has ObjectQuery::OperatorInvalid in case of error.


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