Version: 9.12.0
SMESH::TPythonDump Class Reference

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

#include <SMESH_PythonDump.hxx>

Public Member Functions

 TPythonDump (SMESH_Gen_i *smesh)
 
 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<< (long long 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::smIdType_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<< (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::submesh_array &theList)
 
TPythonDumpoperator<< (const SMESH::ListOfHypothesis &theList)
 
TPythonDumpoperator<< (const SMESH::CoincidentFreeBorders &theCFB)
 
TPythonDumpoperator<< (const std::string &theArg)
 

Static Public Member Functions

template<class TArray , class TStream >
static TStream & DumpArray (const TArray &theArray, TStream &theStream)
 
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
 
SMESH_Gen_imySmesh = nullptr
 

Static Private Attributes

static size_t myCounter = 0
 

Detailed Description

Utility helping in storing SMESH engine calls as python commands.

Constructor & Destructor Documentation

◆ TPythonDump() [1/2]

SMESH::TPythonDump::TPythonDump ( SMESH_Gen_i smesh)

References myCounter.

◆ TPythonDump() [2/2]

SMESH::TPythonDump::TPythonDump ( )

References myCounter.

◆ ~TPythonDump()

Member Function Documentation

◆ CutoutLongString()

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().

◆ DumpArray()

template<class TArray , class TStream >
static TStream& SMESH::TPythonDump::DumpArray ( const TArray &  theArray,
TStream &  theStream 
)
static

Referenced by operator<<().

◆ LongStringEnd()

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().

◆ LongStringStart()

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().

◆ MeshEditorName()

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

Referenced by operator<<().

◆ NotPublishedObjectName()

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

◆ operator<<() [1/40]

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

References myStream.

◆ operator<<() [2/40]

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

References DumpArray().

◆ operator<<() [3/40]

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

References DumpArray().

◆ operator<<() [4/40]

◆ operator<<() [5/40]

◆ operator<<() [6/40]

TPythonDump & SMESH::TPythonDump::operator<< ( const SMESH::DirStruct theDir)

◆ operator<<() [7/40]

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

References DumpArray().

◆ operator<<() [8/40]

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

◆ operator<<() [9/40]

◆ operator<<() [10/40]

◆ operator<<() [11/40]

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

References DumpArray().

◆ operator<<() [12/40]

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

References DumpArray().

◆ operator<<() [13/40]

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

References DumpArray().

◆ operator<<() [14/40]

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

References DumpArray().

◆ operator<<() [15/40]

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

References DumpArray().

◆ operator<<() [16/40]

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

References DumpArray().

◆ operator<<() [17/40]

TPythonDump & SMESH::TPythonDump::operator<< ( const SMESH::PointStruct P)

◆ operator<<() [18/40]

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

References DumpArray().

◆ operator<<() [19/40]

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

References myStream.

◆ operator<<() [20/40]

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

References DumpArray().

◆ operator<<() [21/40]

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

References myStream.

◆ operator<<() [22/40]

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

References myStream.

◆ operator<<() [23/40]

TPythonDump & SMESH::TPythonDump::operator<< ( const TVar theVariableValue)

◆ operator<<() [24/40]

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

References myStream.

◆ operator<<() [25/40]

◆ operator<<() [26/40]

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

References myStream.

◆ operator<<() [27/40]

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

References myStream.

◆ operator<<() [28/40]

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

References myStream.

◆ operator<<() [29/40]

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

References myStream.

◆ operator<<() [30/40]

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

References myStream.

◆ operator<<() [31/40]

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

◆ operator<<() [32/40]

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

References myStream.

◆ operator<<() [33/40]

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

References myStream.

◆ operator<<() [34/40]

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

References myStream.

◆ operator<<() [35/40]

◆ operator<<() [36/40]

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

References myStream.

◆ operator<<() [37/40]

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

◆ operator<<() [38/40]

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

◆ operator<<() [39/40]

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

References myStream, and SMESHGenName().

◆ operator<<() [40/40]

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

◆ SMESHGenName()

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

Field Documentation

◆ myCounter

size_t SMESH::TPythonDump::myCounter = 0
staticprivate

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

◆ mySmesh

SMESH_Gen_i* SMESH::TPythonDump::mySmesh = nullptr
private

Referenced by operator<<().

◆ myStream

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

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

◆ myVarsCounter

int SMESH::TPythonDump::myVarsCounter
private

Referenced by operator<<().