{
size_t TPythonDump::myCounter = 0;
- TPythonDump::TPythonDump (Handle(GEOM_Function)& theFunction)
+ TPythonDump::TPythonDump (Handle(GEOM_Function)& theFunction, bool theAppend)
{
myFunction = theFunction;
myCounter++;
+ myAppend = theAppend;
}
TPythonDump::~TPythonDump()
{
if (--myCounter == 0) {
- myFunction->SetDescription((char *)myStream.str().c_str());
+ TCollection_AsciiString aDescr;
+ if ( myAppend )
+ aDescr = myFunction->GetDescription() + "\n\t";
+ aDescr += (char *)myStream.str().c_str();
+ myFunction->SetDescription( aDescr );
}
}
class TPythonDump
{
std::ostringstream myStream;
- static size_t myCounter;
+ static size_t myCounter;
+ bool myAppend;
Handle(GEOM_Function) myFunction;
public:
- Standard_EXPORT TPythonDump (Handle(GEOM_Function)& theFunction);
+ Standard_EXPORT TPythonDump (Handle(GEOM_Function)& theFunction, bool theAppend=false);
Standard_EXPORT virtual ~TPythonDump();
// operator TCollection_AsciiString () const;