SHAPER
9.13.0
|
Helper class for using Python interpreter. More...
Public Member Functions | |
std::list< std::pair< int, int > > | positions (const std::wstring &theExpression, const std::wstring &theName) |
Returns a list of positions for theName in theExpression. More... | |
std::list< std::wstring > | compile (const std::wstring &theExpression) |
Compiles theExpression and returns a list of parameters used in theExpression. More... | |
void | extendLocalContext (const std::list< std::wstring > &theParameters) |
Extends local context with the list of parameters. More... | |
void | clearLocalContext () |
Clears local context. More... | |
double | evaluate (const std::wstring &theExpression, std::string &theError) |
Evaluates theExpression and returns its value. More... | |
bool | runString (std::string theString) |
Runs the string command in the python interpreter. Returns true if no error is in result. More... | |
Protected Member Functions | |
std::string | errorMessage () |
Returns error message. More... | |
virtual bool | initContext () |
Overrides PyInterp_Interp. More... | |
virtual void | closeContext () |
Reimplemented from PyInterp_Interp::closeContext(). More... | |
Helper class for using Python interpreter.
std::list< std::pair< int, int > > InitializationPlugin_PyInterp::positions | ( | const std::wstring & | theExpression, |
const std::wstring & | theName | ||
) |
Returns a list of positions for theName in theExpression.
std::list< std::wstring > InitializationPlugin_PyInterp::compile | ( | const std::wstring & | theExpression | ) |
Compiles theExpression and returns a list of parameters used in theExpression.
void InitializationPlugin_PyInterp::extendLocalContext | ( | const std::list< std::wstring > & | theParameters | ) |
Extends local context with the list of parameters.
void InitializationPlugin_PyInterp::clearLocalContext | ( | ) |
Clears local context.
double InitializationPlugin_PyInterp::evaluate | ( | const std::wstring & | theExpression, |
std::string & | theError | ||
) |
Evaluates theExpression and returns its value.
bool InitializationPlugin_PyInterp::runString | ( | std::string | theString | ) |
Runs the string command in the python interpreter. Returns true if no error is in result.
|
protected |
Returns error message.
|
protectedvirtual |
Overrides PyInterp_Interp.
|
protectedvirtual |
Reimplemented from PyInterp_Interp::closeContext().