Antiprism 0.23
Public Member Functions

mu::ParserError Class Reference

Error class of the parser. More...

#include <muParserError.h>

Collaboration diagram for mu::ParserError:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ParserError ()
 Default constructor.
 ParserError (EErrorCodes a_iErrc)
 This Constructor is used for internal exceptions only.
 ParserError (const string_type &sMsg)
 Construct an error from a message text.
 ParserError (EErrorCodes a_iErrc, const string_type &sTok, const string_type &sFormula=string_type(_T("(formula is not available)")), int a_iPos=-1)
 Construct an error object.
 ParserError (EErrorCodes a_iErrc, int a_iPos, const string_type &sTok)
 Construct an error object.
 ParserError (const char_type *a_szMsg, int a_iPos=-1, const string_type &sTok=string_type())
 Construct an error object.
 ParserError (const ParserError &a_Obj)
 Copy constructor.
ParserErroroperator= (const ParserError &a_Obj)
 Assignment operator.
void SetFormula (const string_type &a_strFormula)
 Set the expression related to this error.
const string_typeGetExpr () const
 gets the expression related tp this error.
const string_typeGetMsg () const
 Returns the message string for this error.
std::size_t GetPos () const
 Return the formula position related to the error.
const string_typeGetToken () const
 Return string related with this token (if available).
EErrorCodes GetCode () const
 Return the error code.

Detailed Description

Error class of the parser.

Author:
Ingo Berg

Part of the math parser package.


Constructor & Destructor Documentation

mu::ParserError::ParserError ( EErrorCodes  a_iErrc) [explicit]

This Constructor is used for internal exceptions only.

It does not contain any information but the error code.

mu::ParserError::ParserError ( EErrorCodes  iErrc,
const string_type sTok,
const string_type sExpr = string_type(_T("(formula is not available)")),
int  iPos = -1 
)

Construct an error object.

Parameters:
[in]a_iErrcthe error code.
[in]sTokThe token string related to this error.
[in]sExprThe expression related to the error.
[in]a_iPosthe position in the expression where the error occured.
mu::ParserError::ParserError ( EErrorCodes  iErrc,
int  iPos,
const string_type sTok 
)

Construct an error object.

Parameters:
[in]iErrcthe error code.
[in]iPosthe position in the expression where the error occured.
[in]sTokThe token string related to this error.
mu::ParserError::ParserError ( const char_type szMsg,
int  iPos = -1,
const string_type sTok = string_type() 
)

Construct an error object.

Parameters:
[in]szMsgThe error message text.
[in]iPosthe position related to the error.
[in]sTokThe token string related to this error.

Member Function Documentation

std::size_t mu::ParserError::GetPos ( ) const

Return the formula position related to the error.

If the error is not related to a distinct position this will return -1


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