Version: 8.3.0
SMESH::TPythonDump Class Reference

Utility helping in storing SMESH engine calls as python commands. More...

#include <SMESH_PythonDump.hxx>

Public Member Functions

 TPythonDump ()
 
virtual ~TPythonDump ()
 
TPythonDumpoperator<< (const TVar &theVariableValue)
 < store a variable value. Write either a value or '$varID$' More...
 
TPythonDumpoperator<< (long int theArg)
 
TPythonDumpoperator<< (int theArg)
 
TPythonDumpoperator<< (double theArg)
 
TPythonDumpoperator<< (float theArg)
 
TPythonDumpoperator<< (const void *theArg)
 
TPythonDumpoperator<< (const char *theArg)
 
TPythonDumpoperator<< (const SMESH::ElementType &theArg)
 
TPythonDumpoperator<< (const SMESH::GeometryType &theArg)
 
TPythonDumpoperator<< (const SMESH::EntityType &theArg)
 
TPythonDumpoperator<< (const SMESH::long_array &theArg)
 
TPythonDumpoperator<< (const SMESH::double_array &theArg)
 
TPythonDumpoperator<< (const SMESH::string_array &theArg)
 
TPythonDumpoperator<< (const SMESH::nodes_array &theArg)
 
TPythonDumpoperator<< (SMESH::SMESH_Hypothesis_ptr theArg)
 
TPythonDumpoperator<< (SMESH::SMESH_IDSource_ptr theArg)
 
TPythonDumpoperator<< (SALOMEDS::SObject_ptr theArg)
 
TPythonDumpoperator<< (CORBA::Object_ptr theArg)
 
TPythonDumpoperator<< (SMESH::FilterLibrary_i *theArg)
 
TPythonDumpoperator<< (SMESH::FilterManager_i *theArg)
 
TPythonDumpoperator<< (SMESH::Filter_i *theArg)
 
TPythonDumpoperator<< (SMESH::Functor_i *theArg)
 
TPythonDumpoperator<< (SMESH::Measurements_i *theArg)
 
TPythonDumpoperator<< (SMESH_Gen_i *theArg)
 
TPythonDumpoperator<< (SMESH_MeshEditor_i *theArg)
 
TPythonDumpoperator<< (SMESH::MED_VERSION theArg)
 
TPythonDumpoperator<< (const SMESH::AxisStruct &theAxis)
 
TPythonDumpoperator<< (const SMESH::DirStruct &theDir)
 
TPythonDumpoperator<< (const SMESH::PointStruct &P)
 
TPythonDumpoperator<< (const TCollection_AsciiString &theArg)
 
TPythonDumpoperator<< (const SMESH::ListOfGroups &theList)
 
TPythonDumpoperator<< (const SMESH::ListOfGroups *theList)
 
TPythonDumpoperator<< (const GEOM::ListOfGO &theList)
 
TPythonDumpoperator<< (const GEOM::ListOfGBO &theList)
 
TPythonDumpoperator<< (const SMESH::ListOfIDSources &theList)
 
TPythonDumpoperator<< (const SMESH::CoincidentFreeBorders &theCFB)
 
TPythonDumpoperator<< (const std::string &theArg)
 

Static Public Member Functions

static const char * SMESHGenName ()
 
static const char * MeshEditorName ()
 
static const char * NotPublishedObjectName ()
 
static TCollection_AsciiString LongStringStart (const char *type)
 Return marker of long string literal beginning. More...
 
static TCollection_AsciiString LongStringEnd ()
 Return marker of long string literal end. More...
 
static bool CutoutLongString (TCollection_AsciiString &theText, int &theFrom, TCollection_AsciiString &theLongString, TCollection_AsciiString &theStringType)
 Cut out a long string literal from a string. More...
 

Private Attributes

std::ostringstream myStream
 
int myVarsCounter
 

Static Private Attributes

static size_t myCounter = 0
 

Detailed Description

Utility helping in storing SMESH engine calls as python commands.

Constructor & Destructor Documentation

SMESH::TPythonDump::TPythonDump ( )

References myCounter.

Member Function Documentation

bool SMESH::TPythonDump::CutoutLongString ( TCollection_AsciiString &  theText,
int theFrom,
TCollection_AsciiString &  theLongString,
TCollection_AsciiString &  theStringType 
)
static

Cut out a long string literal from a string.

Parameters
theText- text possibly containing string literals
theFrom- position in the text to search from
theLongString- the retrieved literal
theStringType- a name of functionality produced the literal
Return values
bool- true if a string literal found

The literal is removed from theText; theFrom points position right after the removed literal

References SMESH::myLongStringEnd(), and SMESH::myLongStringStart().

Referenced by SMESH_Gen_i::DumpPython_impl().

TCollection_AsciiString SMESH::TPythonDump::LongStringEnd ( )
static

Return marker of long string literal end.

Return values
TCollection_AsciiString- the marker string to be written into a raw python script

References SMESH::myLongStringEnd().

TCollection_AsciiString SMESH::TPythonDump::LongStringStart ( const char *  type)
static

Return marker of long string literal beginning.

Parameters
type- a name of functionality producing the string literal
Return values
TCollection_AsciiString- the marker string to be written into a raw python script

References SMESH::myLongStringStart().

static const char* SMESH::TPythonDump::MeshEditorName ( )
static

Referenced by operator<<().

const char * SMESH::TPythonDump::NotPublishedObjectName ( )
static
TPythonDump & SMESH::TPythonDump::operator<< ( const TVar theVariableValue)
TPythonDump & SMESH::TPythonDump::operator<< ( long int  theArg)

References myStream.

TPythonDump & SMESH::TPythonDump::operator<< ( int  theArg)

References myStream.

TPythonDump & SMESH::TPythonDump::operator<< ( double  theArg)

References myStream.

TPythonDump & SMESH::TPythonDump::operator<< ( float  theArg)

References myStream.

TPythonDump & SMESH::TPythonDump::operator<< ( const void *  theArg)

References myStream.

TPythonDump & SMESH::TPythonDump::operator<< ( const char *  theArg)

References myStream.

TPythonDump & SMESH::TPythonDump::operator<< ( const SMESH::ElementType theArg)
TPythonDump & SMESH::TPythonDump::operator<< ( const SMESH::long_array theArg)

References SMESH::DumpArray().

TPythonDump & SMESH::TPythonDump::operator<< ( const SMESH::double_array theArg)

References SMESH::DumpArray().

TPythonDump & SMESH::TPythonDump::operator<< ( const SMESH::string_array theArg)

References myStream.

TPythonDump & SMESH::TPythonDump::operator<< ( const SMESH::nodes_array theArg)

References SMESH::DumpArray().

TPythonDump & SMESH::TPythonDump::operator<< ( SMESH::SMESH_Hypothesis_ptr  theArg)
TPythonDump & SMESH::TPythonDump::operator<< ( SALOMEDS::SObject_ptr  theArg)
TPythonDump & SMESH::TPythonDump::operator<< ( SMESH::FilterLibrary_i theArg)

References myStream.

TPythonDump & SMESH::TPythonDump::operator<< ( SMESH::FilterManager_i theArg)

References myStream.

TPythonDump & SMESH::TPythonDump::operator<< ( SMESH::Filter_i theArg)

References myStream.

TPythonDump & SMESH::TPythonDump::operator<< ( SMESH::Measurements_i theArg)

References myStream.

TPythonDump & SMESH::TPythonDump::operator<< ( SMESH_Gen_i theArg)

References myStream, and SMESHGenName().

TPythonDump & SMESH::TPythonDump::operator<< ( SMESH_MeshEditor_i theArg)
TPythonDump & SMESH::TPythonDump::operator<< ( SMESH::MED_VERSION  theArg)
TPythonDump & SMESH::TPythonDump::operator<< ( const SMESH::DirStruct theDir)
TPythonDump & SMESH::TPythonDump::operator<< ( const SMESH::PointStruct P)
TPythonDump & SMESH::TPythonDump::operator<< ( const TCollection_AsciiString &  theArg)

References myStream.

TPythonDump & SMESH::TPythonDump::operator<< ( const SMESH::ListOfGroups theList)

References SMESH::DumpArray().

TPythonDump & SMESH::TPythonDump::operator<< ( const SMESH::ListOfGroups theList)

References SMESH::DumpArray().

TPythonDump & SMESH::TPythonDump::operator<< ( const GEOM::ListOfGO &  theList)

References SMESH::DumpArray().

TPythonDump & SMESH::TPythonDump::operator<< ( const GEOM::ListOfGBO &  theList)

References SMESH::DumpArray().

TPythonDump & SMESH::TPythonDump::operator<< ( const SMESH::ListOfIDSources theList)

References SMESH::DumpArray().

TPythonDump & SMESH::TPythonDump::operator<< ( const std::string &  theArg)

References myStream.

static const char* SMESH::TPythonDump::SMESHGenName ( )
static

Field Documentation

size_t SMESH::TPythonDump::myCounter = 0
staticprivate

Referenced by TPythonDump(), and ~TPythonDump().

std::ostringstream SMESH::TPythonDump::myStream
private

Referenced by operator<<(), and ~TPythonDump().

int SMESH::TPythonDump::myVarsCounter
private

Referenced by operator<<().