OpcUaCanOpen
CANopen OPC-UA server
|
Error class of the parser. More...
#include <muParserError.h>
Public Member Functions | |
ParserError () | |
Default constructor. More... | |
ParserError (EErrorCodes a_iErrc) | |
This Constructor is used for internal exceptions only. More... | |
ParserError (const string_type &sMsg) | |
Construct an error from a message text. More... | |
ParserError (EErrorCodes a_iErrc, const string_type &sTok, const string_type &sFormula=string_type(), int a_iPos=-1) | |
Construct an error object. More... | |
ParserError (EErrorCodes a_iErrc, int a_iPos, const string_type &sTok) | |
Construct an error object. More... | |
ParserError (const char_type *a_szMsg, int a_iPos=-1, const string_type &sTok=string_type()) | |
Construct an error object. More... | |
ParserError (const ParserError &a_Obj) | |
Copy constructor. More... | |
ParserError & | operator= (const ParserError &a_Obj) |
Assignment operator. More... | |
~ParserError () | |
void | SetFormula (const string_type &a_strFormula) |
Set the expression related to this error. More... | |
const string_type & | GetExpr () const |
gets the expression related tp this error. More... | |
const string_type & | GetMsg () const |
Returns the message string for this error. More... | |
int | GetPos () const |
Return the formula position related to the error. More... | |
const string_type & | GetToken () const |
Return string related with this token (if available). More... | |
EErrorCodes | GetCode () const |
Return the error code. More... | |
Private Member Functions | |
void | ReplaceSubString (string_type &strSource, const string_type &strFind, const string_type &strReplaceWith) |
Replace all ocuurences of a substring with another string. More... | |
void | Reset () |
Reset the erro object. More... | |
Private Attributes | |
string_type | m_strMsg |
The message string. More... | |
string_type | m_strFormula |
Formula string. More... | |
string_type | m_strTok |
Token related with the error. More... | |
int | m_iPos |
Formula position related to the error. More... | |
EErrorCodes | m_iErrc |
Error code. More... | |
const ParserErrorMsg & | m_ErrMsg |
Error class of the parser.
Part of the math parser package.
Definition at line 125 of file muParserError.h.
mu::ParserError::ParserError | ( | ) |
Default constructor.
Definition at line 101 of file muParserError.cpp.
|
explicit |
This Constructor is used for internal exceptions only.
It does not contain any information but the error code.
Definition at line 116 of file muParserError.cpp.
|
explicit |
Construct an error from a message text.
Definition at line 133 of file muParserError.cpp.
mu::ParserError::ParserError | ( | EErrorCodes | iErrc, |
const string_type & | sTok, | ||
const string_type & | sExpr = string_type() , |
||
int | iPos = -1 |
||
) |
Construct an error object.
[in] | a_iErrc | the error code. |
[in] | sTok | The token string related to this error. |
[in] | sExpr | The expression related to the error. |
[in] | a_iPos | the position in the expression where the error occurred. |
Definition at line 147 of file muParserError.cpp.
mu::ParserError::ParserError | ( | EErrorCodes | iErrc, |
int | iPos, | ||
const string_type & | sTok | ||
) |
Construct an error object.
[in] | iErrc | the error code. |
[in] | iPos | the position in the expression where the error occurred. |
[in] | sTok | The token string related to this error. |
Definition at line 171 of file muParserError.cpp.
mu::ParserError::ParserError | ( | const char_type * | szMsg, |
int | iPos = -1 , |
||
const string_type & | sTok = string_type() |
||
) |
Construct an error object.
[in] | szMsg | The error message text. |
[in] | iPos | the position related to the error. |
[in] | sTok | The token string related to this error. |
Definition at line 192 of file muParserError.cpp.
mu::ParserError::ParserError | ( | const ParserError & | a_Obj | ) |
Copy constructor.
Definition at line 208 of file muParserError.cpp.
mu::ParserError::~ParserError | ( | ) |
Definition at line 234 of file muParserError.cpp.
EErrorCodes mu::ParserError::GetCode | ( | ) | const |
Return the error code.
Definition at line 315 of file muParserError.cpp.
const string_type & mu::ParserError::GetExpr | ( | ) | const |
gets the expression related tp this error.
Definition at line 284 of file muParserError.cpp.
const string_type & mu::ParserError::GetMsg | ( | ) | const |
Returns the message string for this error.
Definition at line 291 of file muParserError.cpp.
int 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
Definition at line 301 of file muParserError.cpp.
const string_type & mu::ParserError::GetToken | ( | ) | const |
Return string related with this token (if available).
Definition at line 308 of file muParserError.cpp.
ParserError & mu::ParserError::operator= | ( | const ParserError & | a_Obj | ) |
Assignment operator.
Definition at line 220 of file muParserError.cpp.
|
private |
Replace all ocuurences of a substring with another string.
Replace all occurrences of a substring with another string.
strFind | The string that shall be replaced. |
strReplaceWith | The string that should be inserted instead of strFind |
Definition at line 242 of file muParserError.cpp.
|
private |
Reset the erro object.
Definition at line 266 of file muParserError.cpp.
void mu::ParserError::SetFormula | ( | const string_type & | a_strFormula | ) |
Set the expression related to this error.
Definition at line 277 of file muParserError.cpp.
|
private |
Definition at line 167 of file muParserError.h.
|
private |
Error code.
Definition at line 166 of file muParserError.h.
|
private |
Formula position related to the error.
Definition at line 165 of file muParserError.h.
|
private |
Formula string.
Definition at line 163 of file muParserError.h.
|
private |
The message string.
Definition at line 162 of file muParserError.h.
|
private |
Token related with the error.
Definition at line 164 of file muParserError.h.