NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
This struct encodes a string expression. It tracks the position of an equal sign in the expression indicating the expression part and its assignee. More...
#include <stringexpression.hpp>
Public Member Functions | |
StringExpression (std::string &_sLine, const std::string &sCache="") | |
Constructor of this structure. Searches for the equal sign upon construction. More... | |
bool | isAssignmentOperator (size_t eq_pos) const |
This member function determines, whether the equal sign at eq_pos is an assignment operator and no boolean expression. More... | |
void | findAssignmentOperator () |
Searches for the assignment operator (the equal sign separating expression and assignee). If nothing was found, the position is set to 0. If the position was set to 0 in advance, nothing is searched. More... | |
void | split () |
Splits expression and its assignee and sets the assignment operator position to 0. More... | |
Public Attributes | |
std::string & | sLine |
std::string | sAssignee |
size_t | nEqPos |
This struct encodes a string expression. It tracks the position of an equal sign in the expression indicating the expression part and its assignee.
Definition at line 34 of file stringexpression.hpp.
|
inline |
Constructor of this structure. Searches for the equal sign upon construction.
_sLine | std::string& |
sCache | const std::string& |
Definition at line 49 of file stringexpression.hpp.
References findAssignmentOperator().
|
inline |
Searches for the assignment operator (the equal sign separating expression and assignee). If nothing was found, the position is set to 0. If the position was set to 0 in advance, nothing is searched.
Definition at line 83 of file stringexpression.hpp.
References getMatchingParenthesis(), isAssignmentOperator(), nEqPos, and sLine.
Referenced by NumeRe::StringParser::eval(), and StringExpression().
|
inline |
This member function determines, whether the equal sign at eq_pos
is an assignment operator and no boolean expression.
eq_pos | size_t |
Definition at line 64 of file stringexpression.hpp.
References sLine.
Referenced by findAssignmentOperator().
|
inline |
Splits expression and its assignee and sets the assignment operator position to 0.
Definition at line 125 of file stringexpression.hpp.
References nEqPos, sAssignee, sLine, and StripSpaces().
Referenced by NumeRe::StringParser::eval().
size_t NumeRe::StringExpression::nEqPos |
Definition at line 38 of file stringexpression.hpp.
Referenced by NumeRe::StringParser::eval(), findAssignmentOperator(), and split().
std::string NumeRe::StringExpression::sAssignee |
Definition at line 37 of file stringexpression.hpp.
Referenced by NumeRe::StringParser::eval(), and split().
std::string& NumeRe::StringExpression::sLine |
Definition at line 36 of file stringexpression.hpp.
Referenced by NumeRe::StringParser::eval(), findAssignmentOperator(), isAssignmentOperator(), and split().