mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +05:00
PAL10015. Add optional arg theAppend to constructor
This commit is contained in:
parent
8405ffc0f5
commit
7a7b104ba6
@ -25,16 +25,21 @@ namespace GEOM
|
||||
{
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,12 +32,13 @@ namespace GEOM
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user