void CheckObjectPresence( const Handle(_pyCommand)& cmd, set<_pyID> & presentObjects)
{
+ if ( cmd->GetString().Location( TPythonDump::NotPublishedObjectName(), 1, cmd->Length() ))
+ {
+ cmd->Comment();
+ return;
+ }
for ( int iArg = cmd->GetNbArgs(); iArg; --iArg )
{
const _pyID& arg = cmd->GetArg( iArg );
static int MYDEBUG = 0;
#endif
-static TCollection_AsciiString NotPublishedObjectName()
-{
- return "__NOT__Published__Object__";
-}
-
namespace SMESH
{
size_t TPythonDump::myCounter = 0;
+ const char theNotPublishedObjectName[] = "__NOT__Published__Object__";
TVar::TVar(CORBA::Double value):myVals(1) { myVals[0] = SMESH_Comment(value); }
TVar::TVar(CORBA::Long value):myVals(1) { myVals[0] = SMESH_Comment(value); }
myStream << entry.in();
}
else {
- myStream << NotPublishedObjectName();
+ myStream << theNotPublishedObjectName;
}
return *this;
}
if ( aSMESHGen->CanPublishInStudy( theArg )) // not published SMESH object
myStream << "smeshObj_" << size_t(theArg);
else
- myStream << NotPublishedObjectName();
+ myStream << theNotPublishedObjectName;
}
else
myStream << "None";
SMESH::ElementType type = types->length() ? types[0] : SMESH::ALL;
return *this << mesh << ".GetIDSource(" << anElementsId << ", " << type << ")";
}
- return *this;
+ return *this << theNotPublishedObjectName;
}
TPythonDump&
DumpArray( theList, *this );
return *this;
}
+ const char* TPythonDump::NotPublishedObjectName()
+ {
+ return theNotPublishedObjectName;
+ }
TCollection_AsciiString myLongStringStart( "TPythonDump::LongStringStart" );
TCollection_AsciiString myLongStringEnd ( "TPythonDump::LongStringEnd" );
CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer;
Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aLen+1, aLen+1, anOctetBuf, 1);
- bool hasNotPublishedObjects = aScript.Location( NotPublishedObjectName(), 1, aLen);
+ bool hasNotPublishedObjects = aScript.Location( SMESH::theNotPublishedObjectName, 1, aLen);
isValidScript = isValidScript && !hasNotPublishedObjects;
return aStreamFile._retn();