Back to index

salome-med  6.5.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT Protocol Reference

This class works on strings previously stripped. More...

#include <SPythonInterpreter.hxx>

Collaboration diagram for ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SPythonInterpreter (PyObject *globals, PyObject *locals)
void initialize ()
bool run (const char *str, bool &isSPython)
bool finishSession ()
 SPythonPredParser ()
TypeOfEntity getType () const
void assign (const std::string &s, PyObject *glob, PyObject *loc)
std::string getRepr () const
bool empty () const
 SPythonParser ()
TypeOfEntity getType () const
bool parseWithoutEqual (const std::string &s, int parLev, PyObject *glob, PyObject *loc, std::vector< SPythonParser > &alreadyParsed)
TypeOfEntity getTypeOfElt (const std::string &elt, PyObject *glob, PyObject *loc, const std::vector< SPythonParser > &alreadyParsed) const
TypeOfEntity combineType (TypeOfEntity t1, TypeOfEntity t2) const
std::string getRepr (const std::vector< SPythonParser > &v) const
std::string replaceByCompacted (const std::string &s, int parLev, int id) const
std::string substitute (const std::vector< SPythonParser > &v) const
TypeOfEntity analyzeType (PyObject *glob, PyObject *loc, const std::vector< SPythonParser > &alreadyParsed)
void keepSelectedLevOfPar (const std::string &s, int parLev, PyObject *glob, PyObject *loc)
 SPythonParserHL (PyObject *glob, PyObject *loc)
bool parse (const std::string &s, std::string &result)

Static Public Member Functions

static std::string strip (const std::string &s)
static bool isSpythonManipulationNeeded (const std::string &s, std::string &pythonLines)
static bool isCandidateParenthesis (const std::string &s, std::size_t p1, std::size_t &n)
static TypeOfEntity getTypeOfVar (const std::string &var, PyObject *glob, PyObject *loc)
static std::vector< int > levOfParenthesis (const std::string &s)
static void replaceFromCompacted (std::string &ret, const std::vector< SPythonParser > &v)
static bool isAlreadyControledParenthesis (const std::string &s)
static bool isParenthesisMatching (const std::string &s, std::string &res)
static bool isElementInParenthesisMatching (const std::string &s, std::string &result, bool &isNumber)
static std::vector< std::string > splitBetweenEqualChar (const std::string &s)

Static Public Attributes

static const int NB_OF_INDENT = 7
static const char * INDENT_TOKEN []
static const char NUMBERS []
static const char FIELD_TYPE_STR []

Private Member Functions

bool checkIndentCoherency (const std::string &s, std::size_t p)
void checkPythonInterp (PyObject *r)
bool isIndenter (const std::string &s, std::size_t p)
bool isSPythonExpression (const std::string &s)
bool isSPythonExpressionLev1 (const std::string &s, std::string &result)
bool parseWithoutEqual (const std::string &s, TypeOfEntity &type, std::string &result)

Private Attributes

std::string _cmd
std::set< int > _indent_pos
bool _indent_must_change
PyObject * _glob
PyObject * _loc
std::string _var
std::string _method
TypeOfEntity _type
SPythonPredParser _pred
std::string _content
std::string _content_py

Detailed Description

This class works on strings previously stripped.

The main aim of this class is to deal with operator = between spython parts and aggregate it.

HL means HL because parse method dispatch the core operation on SPythonParse class.

Definition at line 42 of file SPythonInterpreter.hxx.


Member Function Documentation

TypeOfEntity ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::analyzeType ( PyObject *  glob,
PyObject *  loc,
const std::vector< SPythonParser > &  alreadyParsed 
)
void ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::assign ( const std::string &  s,
PyObject *  glob,
PyObject *  loc 
)
bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::checkIndentCoherency ( const std::string &  s,
std::size_t  p 
) [private]
std::string ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::getRepr ( const std::vector< SPythonParser > &  v) const

Definition at line 58 of file SPythonParser.hxx.

{ return _type; }

Definition at line 78 of file SPythonParser.hxx.

{ return _type; }
TypeOfEntity ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::getTypeOfElt ( const std::string &  elt,
PyObject *  glob,
PyObject *  loc,
const std::vector< SPythonParser > &  alreadyParsed 
) const
static TypeOfEntity ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::getTypeOfVar ( const std::string &  var,
PyObject *  glob,
PyObject *  loc 
) [static]
static bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::isAlreadyControledParenthesis ( const std::string &  s) [static]
static bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::isCandidateParenthesis ( const std::string &  s,
std::size_t  p1,
std::size_t &  n 
) [static]
static bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::isElementInParenthesisMatching ( const std::string &  s,
std::string &  result,
bool &  isNumber 
) [static]
bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::isIndenter ( const std::string &  s,
std::size_t  p 
) [private]
static bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::isParenthesisMatching ( const std::string &  s,
std::string &  res 
) [static]
bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::isSPythonExpression ( const std::string &  s) [private]
bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::isSPythonExpressionLev1 ( const std::string &  s,
std::string &  result 
) [private]
static bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::isSpythonManipulationNeeded ( const std::string &  s,
std::string &  pythonLines 
) [static]
void ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::keepSelectedLevOfPar ( const std::string &  s,
int  parLev,
PyObject *  glob,
PyObject *  loc 
)
static std::vector<int> ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::levOfParenthesis ( const std::string &  s) [static]
bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::parse ( const std::string &  s,
std::string &  result 
)
bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::parseWithoutEqual ( const std::string &  s,
int  parLev,
PyObject *  glob,
PyObject *  loc,
std::vector< SPythonParser > &  alreadyParsed 
)
bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::parseWithoutEqual ( const std::string &  s,
TypeOfEntity type,
std::string &  result 
) [private]
std::string ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::replaceByCompacted ( const std::string &  s,
int  parLev,
int  id 
) const
static void ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::replaceFromCompacted ( std::string &  ret,
const std::vector< SPythonParser > &  v 
) [static]
bool ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::run ( const char *  str,
bool &  isSPython 
)
static std::vector<std::string> ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::splitBetweenEqualChar ( const std::string &  s) [static]
ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::SPythonInterpreter ( PyObject *  globals,
PyObject *  locals 
)
ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::SPythonParserHL ( PyObject *  glob,
PyObject *  loc 
)
static std::string ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::strip ( const std::string &  s) [static]
std::string ParaMEDMEM::MEDCALCULATORSPYTHON_EXPORT::substitute ( const std::vector< SPythonParser > &  v) const

Member Data Documentation

Definition at line 64 of file SPythonInterpreter.hxx.

Definition at line 98 of file SPythonParser.hxx.

Definition at line 99 of file SPythonParser.hxx.

Definition at line 67 of file SPythonInterpreter.hxx.

Definition at line 66 of file SPythonInterpreter.hxx.

Definition at line 65 of file SPythonInterpreter.hxx.

Definition at line 68 of file SPythonInterpreter.hxx.

Definition at line 67 of file SPythonParser.hxx.

Definition at line 97 of file SPythonParser.hxx.

Definition at line 68 of file SPythonParser.hxx.

Definition at line 66 of file SPythonParser.hxx.

Definition at line 64 of file SPythonParser.hxx.

Definition at line 61 of file SPythonInterpreter.hxx.

Definition at line 60 of file SPythonInterpreter.hxx.

Definition at line 62 of file SPythonInterpreter.hxx.


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