Lucene++ - a full-featured, c++ search engine
API Documentation


Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Protected Member Functions
Lucene::QueryParseError Class Reference

Utility class to handle query parse errors. More...

#include <QueryParseError.h>

+ Inheritance diagram for Lucene::QueryParseError:

Public Member Functions

virtual ~QueryParseError ()
 
virtual String getClassName ()
 
boost::shared_ptr< QueryParseErrorshared_from_this ()
 
- Public Member Functions inherited from Lucene::LuceneObject
virtual ~LuceneObject ()
 
virtual void initialize ()
 Called directly after instantiation to create objects that depend on this object being fully constructed.
 
virtual LuceneObjectPtr clone (const LuceneObjectPtr &other=LuceneObjectPtr())
 Return clone of this object.
 
virtual int32_t hashCode ()
 Return hash code for this object.
 
virtual bool equals (const LuceneObjectPtr &other)
 Return whether two objects are equal.
 
virtual int32_t compareTo (const LuceneObjectPtr &other)
 Compare two objects.
 
virtual String toString ()
 Returns a string representation of the object.
 
- Public Member Functions inherited from Lucene::LuceneSync
virtual ~LuceneSync ()
 
virtual SynchronizePtr getSync ()
 Return this object synchronize lock.
 
virtual LuceneSignalPtr getSignal ()
 Return this object signal.
 
virtual void lock (int32_t timeout=0)
 Lock this object using an optional timeout.
 
virtual void unlock ()
 Unlock this object.
 
virtual bool holdsLock ()
 Returns true if this object is currently locked by current thread.
 
virtual void wait (int32_t timeout=0)
 Wait for signal using an optional timeout.
 
virtual void notifyAll ()
 Notify all threads waiting for signal.
 

Static Public Member Functions

static String _getClassName ()
 
static String lexicalError (bool EOFSeen, int32_t lexState, int32_t errorLine, int32_t errorColumn, const String &errorAfter, wchar_t curChar)
 Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error.
 
static String parseError (const QueryParserTokenPtr &currentToken, Collection< Collection< int32_t > > expectedTokenSequences, Collection< String > tokenImage)
 Generate a parse error message and returns it.
 

Static Protected Member Functions

static String addEscapes (const String &str)
 Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string.
 

Additional Inherited Members

- Protected Member Functions inherited from Lucene::LuceneObject
 LuceneObject ()
 
- Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
 
LuceneSignalPtr objectSignal
 

Detailed Description

Utility class to handle query parse errors.

Constructor & Destructor Documentation

◆ ~QueryParseError()

virtual Lucene::QueryParseError::~QueryParseError ( )
virtual

Member Function Documentation

◆ _getClassName()

static String Lucene::QueryParseError::_getClassName ( )
inlinestatic

◆ addEscapes()

static String Lucene::QueryParseError::addEscapes ( const String &  str)
staticprotected

Replaces unprintable characters by their escaped (or unicode escaped) equivalents in the given string.

◆ getClassName()

virtual String Lucene::QueryParseError::getClassName ( )
inlinevirtual

◆ lexicalError()

static String Lucene::QueryParseError::lexicalError ( bool  EOFSeen,
int32_t  lexState,
int32_t  errorLine,
int32_t  errorColumn,
const String &  errorAfter,
wchar_t  curChar 
)
static

Returns a detailed message for the Error when it is thrown by the token manager to indicate a lexical error.

Parameters
EOFSeenIndicates if EOF caused the lexical error
curLexStateLexical state in which this error occurred
errorLineLine number when the error occurred
errorColumnColumn number when the error occurred
errorAfterPrefix that was seen before this error occurred
curCharThe offending character

◆ parseError()

static String Lucene::QueryParseError::parseError ( const QueryParserTokenPtr currentToken,
Collection< Collection< int32_t > >  expectedTokenSequences,
Collection< String >  tokenImage 
)
static

Generate a parse error message and returns it.

Parameters
currentTokenThis is the last token that has been consumed successfully. If this object has been created due to a parse error, the token following this token will (therefore) be the first error token.
expectedTokenSequencesEach entry in this array is an array of integers. Each array of integers represents a sequence of tokens (by their ordinal values) that is expected at this point of the parse.
tokenImageThis is a reference to the "tokenImage" array of the generated parser within which the parse error occurred.

◆ shared_from_this()

boost::shared_ptr< QueryParseError > Lucene::QueryParseError::shared_from_this ( )
inline

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

clucene.sourceforge.net