#include <QTextStream>
#include <QColor>
+//#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Document,MMgt_TShared)
#define PYTHON_DOC_NAME "hydro_doc"
Handle(HYDROData_Document) aResult =
HYDROData_Application::GetApplication()->GetDocument();
if (aResult.IsNull()) {
+ DEBTRACE("new HYDROData_Document");
aResult = new HYDROData_Document();
HYDROData_Application::GetApplication()->AddDocument(aResult);
}
Data_DocError HYDROData_Document::Load(const char* theFileName)
{
+ DEBTRACE("Load");
Handle(TDocStd_Document) aResult;
TCollection_ExtendedString aPath ((const Standard_CString)theFileName);
PCDM_ReaderStatus aStatus = (PCDM_ReaderStatus) -1;
Data_DocError HYDROData_Document::Save(const char* theFileName)
{
+ DEBTRACE("Save");
TCollection_ExtendedString aPath ((const Standard_CString)theFileName);
PCDM_StoreStatus aStatus;
try {
void HYDROData_Document::Close()
{
+ DEBTRACE("Close");
myDoc->Close();
HYDROData_Application::GetApplication()->RemoveDocument(this);
}
bool HYDROData_Document::DumpToPython( const QString& thePyScriptPath,
const bool theIsMultiFile ) const
{
+ DEBTRACE("DumpToPython");
// Try to open the file
QFile aFile( thePyScriptPath );
if ( !aFile.open( QIODevice::WriteOnly | QFile::Text ) )
MapOfTreatedObjects& theTreatedObjects,
const bool theIsMultiFile ) const
{
+ DEBTRACE("DumpToPython");
QString aDocName = GetDocPyName();
// Append document in to the map of treated objects to prevent names overlaping
MapOfTreatedObjects& theTreatedObjects,
const ObjectKind& theObjectKind ) const
{
+ DEBTRACE("dumpPartitionToPython");
if ( !theFile.isOpen() )
return false;
HYDROData_Document::HYDROData_Document()
{
+ DEBTRACE("HYDROData_Document");
HYDROData_Application::GetApplication()->NewDocument("BinOcaf", myDoc);
myDoc->SetUndoLimit(UNDO_LIMIT);
NewID(); // needed to have at least one attribute in initial document to avoid errors
HYDROData_Document::HYDROData_Document(const Handle(TDocStd_Document)& theDoc)
{
+ DEBTRACE("HYDROData_Document");
myDoc = theDoc;
myTransactionsAfterSave = 0;
myLX = -1;
HYDROData_Document::~HYDROData_Document()
{
+ DEBTRACE("~HYDROData_Document");
}
int HYDROData_Document::NewID()