Back to index

salome-geom  6.5.0
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
GEOM::TPythonDump Class Reference

#include <GEOM_PythonDump.hxx>

Collaboration diagram for GEOM::TPythonDump:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Standard_EXPORT TPythonDump (Handle(GEOM_Function)&theFunction, bool theAppend=false)
virtual Standard_EXPORT ~TPythonDump ()
Standard_EXPORT TPythonDumpoperator<< (bool theArg)
Standard_EXPORT TPythonDumpoperator<< (long int theArg)
Standard_EXPORT TPythonDumpoperator<< (int theArg)
Standard_EXPORT TPythonDumpoperator<< (double theArg)
Standard_EXPORT TPythonDumpoperator<< (float theArg)
Standard_EXPORT TPythonDumpoperator<< (const void *theArg)
Standard_EXPORT TPythonDumpoperator<< (const char *theArg)
Standard_EXPORT TPythonDumpoperator<< (const TopAbs_ShapeEnum theArg)
Standard_EXPORT TPythonDumpoperator<< (const Handle(GEOM_Object)&theObject)

Private Member Functions

 Handle (GEOM_Function) myFunction

Private Attributes

std::ostringstream myStream
bool myAppend

Static Private Attributes

static size_t myCounter = 0

Detailed Description

Definition at line 35 of file GEOM_PythonDump.hxx.


Constructor & Destructor Documentation

GEOM::TPythonDump::TPythonDump ( Handle(GEOM_Function)&  theFunction,
bool  theAppend = false 
)

Definition at line 36 of file GEOM_PythonDump.cxx.

  {
    myFunction = theFunction;
    myCounter++;
    myAppend = theAppend;
  }

Definition at line 43 of file GEOM_PythonDump.cxx.

  {
    if (--myCounter == 0) {
      TCollection_AsciiString aDescr;
      if ( myAppend )
        aDescr = myFunction->GetDescription() + "\n\t";
      std::string aString = myStream.str();
      aDescr += (char *)aString.c_str();
      myFunction->SetDescription( aDescr );
    }
  }

Member Function Documentation

TPythonDump & GEOM::TPythonDump::operator<< ( bool  theArg)

Definition at line 55 of file GEOM_PythonDump.cxx.

  {
    if (theArg)
      myStream << "True";
    else
      myStream << "False";
    return *this;
  }
TPythonDump & GEOM::TPythonDump::operator<< ( long int  theArg)

Definition at line 64 of file GEOM_PythonDump.cxx.

  {
    myStream<<theArg;
    return *this;
  }
TPythonDump & GEOM::TPythonDump::operator<< ( int  theArg)

Definition at line 70 of file GEOM_PythonDump.cxx.

  {
    myStream<<theArg;
    return *this;
  }
TPythonDump & GEOM::TPythonDump::operator<< ( double  theArg)

Definition at line 76 of file GEOM_PythonDump.cxx.

  {
    myStream.precision(16);
    myStream<<theArg;
    return *this;
  }
TPythonDump & GEOM::TPythonDump::operator<< ( float  theArg)

Definition at line 83 of file GEOM_PythonDump.cxx.

  {
    myStream.precision(8);
    myStream<<theArg;
    return *this;
  }
TPythonDump & GEOM::TPythonDump::operator<< ( const void *  theArg)

Definition at line 90 of file GEOM_PythonDump.cxx.

  {
    myStream<<theArg;
    return *this;
  }
TPythonDump & GEOM::TPythonDump::operator<< ( const char *  theArg)

Definition at line 96 of file GEOM_PythonDump.cxx.

  {
    myStream<<theArg;
    return *this;
  }
TPythonDump & GEOM::TPythonDump::operator<< ( const TopAbs_ShapeEnum  theArg)

Definition at line 102 of file GEOM_PythonDump.cxx.

  {
    myStream<<"geompy.ShapeType[\"";
    TopAbs::Print(theArg, myStream);
    myStream<<"\"]";
    return *this;
  }
TPythonDump & GEOM::TPythonDump::operator<< ( const Handle(GEOM_Object)&  theObject)

Definition at line 110 of file GEOM_PythonDump.cxx.

  {
    if (theObject.IsNull()) {
      myStream << "None";
    } else {
      TCollection_AsciiString anEntry;
      TDF_Tool::Entry(theObject->GetEntry(), anEntry);
      myStream << anEntry.ToCString();
    }
    return *this;
  }

Here is the call graph for this function:


Member Data Documentation

Definition at line 39 of file GEOM_PythonDump.hxx.

size_t GEOM::TPythonDump::myCounter = 0 [static, private]

Definition at line 38 of file GEOM_PythonDump.hxx.

std::ostringstream GEOM::TPythonDump::myStream [private]

Definition at line 37 of file GEOM_PythonDump.hxx.


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