Salome HOME
multistudy removal part 1
authorPaul RASCLE <paul.rascle@edf.fr>
Wed, 22 May 2019 12:27:07 +0000 (14:27 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Wed, 22 May 2019 12:27:07 +0000 (14:27 +0200)
43 files changed:
src/HYDROData/HYDROData_Application.cxx
src/HYDROData/HYDROData_Application.h
src/HYDROData/HYDROData_CalculationCase.cxx
src/HYDROData/HYDROData_CalculationCase.h
src/HYDROData/HYDROData_Document.cxx
src/HYDROData/HYDROData_Document.h
src/HYDROData/HYDROData_GeomTool.cxx
src/HYDROData/HYDROData_GeomTool.h
src/HYDROData/HYDROData_LandCoverMap.cxx
src/HYDROData/HYDROData_Obstacle.cxx
src/HYDROGUI/HYDROGUI_DataModel.cxx
src/HYDROGUI/HYDROGUI_ExportCalculationOp.cxx
src/HYDROGUI/HYDROGUI_ExportFileOp.cxx
src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx
src/HYDROGUI/HYDROGUI_Module.cxx
src/HYDROGUI/HYDROGUI_OCCDisplayer.cxx
src/HYDROGUI/HYDROGUI_ObjComboBox.cxx
src/HYDROGUI/HYDROGUI_Operation.cxx
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_RecognizeContoursOp.cxx
src/HYDROGUI/HYDROGUI_StricklerTypeComboBox.cxx
src/HYDROGUI/HYDROGUI_Tool2.cxx
src/HYDROPy/HYDROData_CalculationCase.sip
src/HYDROPy/HYDROData_Document.sip
src/HYDRO_tests/test_Dependencies.cxx
src/HYDRO_tests/test_HYDROData_Bathymetry.cxx
src/HYDRO_tests/test_HYDROData_BoundaryPolygons.cxx
src/HYDRO_tests/test_HYDROData_CalcCase.cxx
src/HYDRO_tests/test_HYDROData_Channel.cxx
src/HYDRO_tests/test_HYDROData_DTM.cxx
src/HYDRO_tests/test_HYDROData_Document.cxx
src/HYDRO_tests/test_HYDROData_Entity.cxx
src/HYDRO_tests/test_HYDROData_Image.cxx
src/HYDRO_tests/test_HYDROData_Iterator.cxx
src/HYDRO_tests/test_HYDROData_LandCoverMap.cxx
src/HYDRO_tests/test_HYDROData_OperationsFactory.cxx
src/HYDRO_tests/test_HYDROData_PolylineXY.cxx
src/HYDRO_tests/test_HYDROData_Profile.cxx
src/HYDRO_tests/test_HYDROData_Stream.cxx
src/HYDRO_tests/test_HYDROData_StricklerTable.cxx
src/HYDRO_tests/test_HYDROGUI_BathymetryPrs.cxx
src/HYDRO_tests/test_HYDROGUI_LandCoverMapDlg.cxx
src/HYDRO_tests/test_HYDROGUI_ListModel.cxx

index 04a0e18b9c85ca06c86a8a33d71e4acc2f9d1ba2..9fd0d2ed8876acbcdc083447b540d9eb55e80cac 100644 (file)
@@ -20,6 +20,8 @@
 
 #include <TColStd_SequenceOfExtendedString.hxx>
 
+#define _STUDYID_ 1
+
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Application,TDocStd_Application)
 
 static HYDROData_Application* TheApplication = new HYDROData_Application;
@@ -37,30 +39,10 @@ HYDROData_Application* HYDROData_Application::GetApplication()
 //function : GetDocument
 //purpose  : 
 //=======================================================================
-bool HYDROData_Application::GetDocumentId(const Handle(HYDROData_Document)& theDocument,
-                                          int&                              theDocId) const
-{
-  DataMapOfStudyIDDocument::Iterator aMapit( myDocuments );
-  for ( ; aMapit.More(); aMapit.Next() )
-  {
-    if ( aMapit.Value() != theDocument )
-      continue;
-
-    theDocId = aMapit.Key();
-    return true;
-  }
-
-  return false;
-}
-
-//=======================================================================
-//function : GetDocument
-//purpose  : 
-//=======================================================================
-Handle(HYDROData_Document) HYDROData_Application::GetDocument(int theStudyID) const
+Handle(HYDROData_Document) HYDROData_Application::GetDocument() const
 {
-  if (myDocuments.IsBound(theStudyID)) {
-    return myDocuments.Find(theStudyID);
+  if (myDocuments.IsBound(_STUDYID_)) {
+    return myDocuments.Find(_STUDYID_);
   }
   // document not found => create the new one
   return Handle(HYDROData_Document)();
@@ -81,9 +63,9 @@ HYDROData_Application::HYDROData_Application ()
 //function : addDocument
 //purpose  : 
 //=======================================================================
-void HYDROData_Application::AddDocument(int theStudyID, const Handle(HYDROData_Document)& theDocument)
+void HYDROData_Application::AddDocument(const Handle(HYDROData_Document)& theDocument)
 {
-  myDocuments.Bind(theStudyID, theDocument);
+  myDocuments.Bind(_STUDYID_, theDocument);
 }
 
 //=======================================================================
index 37eb02c23ee18ea136ee2c21f277404b83cd6702..4b289e3db864f895862612e2841f95075e020868 100644 (file)
@@ -55,15 +55,11 @@ public: // Redefined OCAF methods
   DEFINE_STANDARD_RTTIEXT(HYDROData_Application, TDocStd_Application)
 
 private:
-  //! Returns document by its study ID, if document doesn't exists return null
-  Handle(HYDROData_Document) GetDocument(int theStudyID) const;
-
-  //! Get study id by document instance, if document doesn't exists return false
-  bool GetDocumentId(const Handle(HYDROData_Document)& theDocument,
-                     int&                              theDocId) const;
+  //! Returns document, if document doesn't exists return null
+  Handle(HYDROData_Document) GetDocument() const;
 
   //! Appends document to the application
-  void AddDocument(int theStudyID, const Handle(HYDROData_Document)& theDocument);
+  void AddDocument(const Handle(HYDROData_Document)& theDocument);
 
   //! Removes document from the application
   void RemoveDocument( const Handle(HYDROData_Document)& theDocument );
index 8dcedb1ed41d7cff19150374a8901ab9fd233ac2..5b291318997f504cdc958227fe59ba12368573f7 100755 (executable)
@@ -1292,24 +1292,22 @@ Handle(HYDROData_SplitShapesGroup) HYDROData_CalculationCase::addNewSplitGroup(
   return aNewGroup;
 }
 
-QString HYDROData_CalculationCase::Export( int theStudyId ) const
+QString HYDROData_CalculationCase::Export() const
 {
 #ifdef LIGHT_MODE
   return "";
 #else
   GEOM::GEOM_Gen_var aGEOMEngine = HYDROData_GeomTool::GetGeomGen();
-  SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudyByID( theStudyId );
   
   QString aGeomObjEntry, anErrorMsg;
   QString statMess;
-  bool isOK = Export( aGEOMEngine, aDSStudy, aGeomObjEntry, anErrorMsg, statMess );
+  bool isOK = Export( aGEOMEngine, aGeomObjEntry, anErrorMsg, statMess );
   return isOK ? aGeomObjEntry : QString();
 #endif
 }
 
 #ifndef LIGHT_MODE
 bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
-                                        SALOMEDS::Study_ptr theStudy,
                                         QString& theGeomObjEntry,
                                         QString& theErrorMsg,
                                         QString& statMess) const
@@ -1374,7 +1372,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
   } else if ( isAllNotSubmersible ) {
     theErrorMsg = QString("there are no submersible regions.");
   } else {
-    aRes = Export( theGeomEngine, theStudy, aShToNames, aSeqOfGroupsDefs, theGeomObjEntry );;
+    aRes = Export( theGeomEngine, aShToNames, aSeqOfGroupsDefs, theGeomObjEntry );;
   }
 
   if( aRes && !GetLandCoverMap().IsNull() && !GetStricklerTable().IsNull() )
@@ -1388,7 +1386,6 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var  theGeomEngine,
 }
 
 bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var                            theGeomEngine,
-                                        SALOMEDS::Study_ptr                           theStudy,
                                         const NCollection_IndexedDataMap<TopoDS_Shape, QString>& aShToName,
                                         const HYDROData_ShapesGroup::SeqOfGroupsDefs& theGroupsDefs,
                                         QString& theGeomObjEntry ) const
@@ -1461,7 +1458,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var
 #endif  // Publish the sewed shape
   QString aName = EXPORT_NAME;
   GEOM::GEOM_Object_ptr aMainShape = 
-    HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( theGeomEngine, theStudy, aSewedShape, aFacesToNameModif, aName, theGeomObjEntry );
+    HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( theGeomEngine, aSewedShape, aFacesToNameModif, aName, theGeomObjEntry );
 
   if ( aMainShape->_is_nil() )  
     return false;
@@ -1528,7 +1525,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var
   if ( !aGroupsData.IsEmpty() )
   {
     GEOM::GEOM_IGroupOperations_var aGroupOp = 
-      theGeomEngine->GetIGroupOperations( theStudy->StudyId() );  
+      theGeomEngine->GetIGroupOperations();  
 
     NCollection_DataMap< TCollection_AsciiString, NCollection_Sequence<int> >::Iterator aMapIt( aGroupsData );
     for ( ; aMapIt.More(); aMapIt.Next() )
@@ -1550,7 +1547,7 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var
       if ( aGroupOp->IsDone() )
       {
         SALOMEDS::SObject_var aGroupSO = 
-          theGeomEngine->AddInStudy( theStudy, aGeomGroup, aGroupName.ToCString(), aMainShape );
+          theGeomEngine->AddInStudy( aGeomGroup, aGroupName.ToCString(), aMainShape );
       }
     }
   }
index 953be5ce017e21711f92daf7705112c93aded587..998f3f36af5722b221438cbe5150511d16fa1ab9 100644 (file)
@@ -287,22 +287,19 @@ public:
 
   /**
    * Exports the calculation case data (shell and groups) to GEOM module.
-   * \param theStudyId the id of the study where the GEOM module should be used for export
    * \return the entry of the GEOM object (empty string in the case of error)
    */
-  HYDRODATA_EXPORT virtual QString Export( int theStudyId ) const;
+  HYDRODATA_EXPORT virtual QString Export() const;
 
   /**
    * Exports the calculation case data (shell and groups) to GEOM module.
    * \param theGeomEngine GEOM module engine
-   * \param theStudy SALOMEDS study, is used for publishing of GEOM objects
    * \param theGeomObjEntry the published GEOM object entry
    * \param theErrorMsg the error message
    * \return true in case of success
    */
 #ifndef LIGHT_MODE
   HYDRODATA_EXPORT virtual bool Export( GEOM::GEOM_Gen_var  theGeomEngine,
-                                        SALOMEDS::Study_ptr theStudy,
                                         QString& theGeomObjEntry,
                                         QString& theErrorMsg,
                                         QString& statMess) const;
@@ -440,14 +437,12 @@ private:
   /**
    * Exports the given faces as shell and the given groups to GEOM module.
    * \param theGeomEngine GEOM module engine
-   * \param theStudy SALOMEDS study, is used for publishing of GEOM objects
    * \param theFaces the list of faces to make shell 
    * \param theSplitGroups the list of groups
    * \return true in case of success
    */
 #ifndef LIGHT_MODE
   bool Export( GEOM::GEOM_Gen_var                            theGeomEngine,
-               SALOMEDS::Study_ptr                           theStudy,
                const NCollection_IndexedDataMap<TopoDS_Shape, QString>& aFacesToName,
                const HYDROData_ShapesGroup::SeqOfGroupsDefs& theGroupsDefs,
                QString& theGeomObjEntry ) const;
index c892dcd8b74b8e00d01e56afaf92aa90ccd14ebe..3a5cd32ffe17a080891e14322cdd48ee2bb18db7 100644 (file)
@@ -58,13 +58,13 @@ using namespace std;
 typedef QMap<Standard_Integer, Handle(HYDROData_Entity)> MapOfOrdered;
 typedef QMap<QString, Handle(HYDROData_Entity)> MapOfUnordered;
 
-Handle(HYDROData_Document) HYDROData_Document::Document(const int theStudyID)
+Handle(HYDROData_Document) HYDROData_Document::Document()
 {
   Handle(HYDROData_Document) aResult = 
-    HYDROData_Application::GetApplication()->GetDocument(theStudyID);
+    HYDROData_Application::GetApplication()->GetDocument();
   if (aResult.IsNull()) {
     aResult = new HYDROData_Document();
-    HYDROData_Application::GetApplication()->AddDocument(theStudyID, aResult);
+    HYDROData_Application::GetApplication()->AddDocument(aResult);
   }
   return aResult;
 }
@@ -89,35 +89,19 @@ Handle(HYDROData_Document) HYDROData_Document::Document(
     return aResDoc;
 
   HYDROData_Application* anApp = HYDROData_Application::GetApplication();
-
-  DataMapOfStudyIDDocument::Iterator aMapIt( anApp->myDocuments );
-  for ( ; aMapIt.More(); aMapIt.Next() )
-  {
-    Handle(HYDROData_Document) anAppDoc = aMapIt.Value();
-    if ( anAppDoc.IsNull() || anAppDoc->myDoc != anObjDoc )
-      continue;
-
-    aResDoc = anAppDoc;
-    break;
-  }
+  aResDoc = anApp->GetDocument();
 
   return aResDoc;
 }
 
-bool HYDROData_Document::HasDocument(const int theStudyID)
+bool HYDROData_Document::HasDocument()
 {
   Handle(HYDROData_Document) aResult = 
-    HYDROData_Application::GetApplication()->GetDocument(theStudyID);
+    HYDROData_Application::GetApplication()->GetDocument();
   return !aResult.IsNull();
 }
 
-bool HYDROData_Document::DocumentId(const Handle(HYDROData_Document)& theDocument,
-                                    int&                              theDocId )
-{
-  return HYDROData_Application::GetApplication()->GetDocumentId(theDocument, theDocId);
-}
-
-Data_DocError HYDROData_Document::Load(const char* theFileName, const int theStudyID)
+Data_DocError HYDROData_Document::Load(const char* theFileName)
 {
   Handle(TDocStd_Document) aResult;
   TCollection_ExtendedString aPath ((const Standard_CString)theFileName);
@@ -130,7 +114,7 @@ Data_DocError HYDROData_Document::Load(const char* theFileName, const int theStu
   {}
   if (!aResult.IsNull()) {
     aResult->SetUndoLimit(UNDO_LIMIT);
-    HYDROData_Application::GetApplication()->AddDocument(theStudyID, new HYDROData_Document(aResult));
+    HYDROData_Application::GetApplication()->AddDocument(new HYDROData_Document(aResult));
   }
   // recognize error
   Data_DocError anError;
@@ -353,12 +337,6 @@ QString HYDROData_Document::GetDocPyName() const
 {
   QString aDocName = PYTHON_DOC_NAME;
   
-  /*
-  int aDocId = 1;
-  if ( DocumentId( this, aDocId ) )
-    aDocName += "_" + QString::number( aDocId );
-  */
-  
   return aDocName;
 }
 
@@ -371,10 +349,6 @@ QStringList HYDROData_Document::DumpToPython( const QString& thePyScriptPath,
   // Append document in to the map of treated objects to prevent names overlaping
   theTreatedObjects.insert( aDocName, this );
 
-  int aDocId = 1;
-  if ( !DocumentId( this, aDocId ) )
-    aDocId = 1;
-
   QStringList aResScript;
 
   aResScript << QString( "from HYDROPy import *" );
index 6d474b69329e6efee5bae51a0d22dead9760af11..1eaf640881e95a23f29b4f10e34fb95ac4797188 100644 (file)
@@ -62,7 +62,7 @@ public:
   DEFINE_STANDARD_RTTIEXT(HYDROData_Document, MMgt_TShared);
 
   //! Returns the existing document or creates new if it is not exist
-  HYDRODATA_EXPORT static Handle(HYDROData_Document) Document(const int theStudyID);
+  HYDRODATA_EXPORT static Handle(HYDROData_Document) Document();
 
   //! Returns the document by object
   HYDRODATA_EXPORT static Handle(HYDROData_Document) Document( 
@@ -71,19 +71,15 @@ public:
 public:
 
   //! Returns true if data model contains document for this study
-  HYDRODATA_EXPORT static bool HasDocument(const int theStudyID);
+  HYDRODATA_EXPORT static bool HasDocument();
 
-  //! Get study id by document instance, if document doesn't exists return false
-  HYDRODATA_EXPORT static bool DocumentId( const Handle(HYDROData_Document)& theDocument,
-                                           int&                              theDocId );
 
 public:
 
   //! Loads the OCAF document from the file.
   //! \param theFileName full name of the file to load
-  //! \param theStudyID identifier of the SALOME study to associate with loaded file
   //! \returns error status (OK in case of success)
-  HYDRODATA_EXPORT static Data_DocError Load(const char* theFileName, const int theStudyID);
+  HYDRODATA_EXPORT static Data_DocError Load(const char* theFileName);
 
   //! Saves the OCAF document to the file.
   //! \param theFileName full name of the file to store
index a152909c98247f0e26f54693bd0f917b820c8ba7..23c7b9a86e3d9002c88e94e1f351cf99b1b95a0a 100644 (file)
@@ -47,9 +47,9 @@ static int _argc = 0;
 static CORBA::ORB_var _ORB = CORBA::ORB_init( _argc, 0, "omniORB4"/*CORBA::ORB_ID*/ );
 static SALOME_NamingService _NS( _ORB );
 static SALOME_LifeCycleCORBA _LCC( &_NS );
+static SALOMEDS::Study_var _STUDY = SALOMEDS::Study::_nil();
 
-
-TopoDS_Shape HYDROData_GeomTool::GetShapeFromIOR( const int theStudyId, const QString& theIOR )
+TopoDS_Shape HYDROData_GeomTool::GetShapeFromIOR( const QString& theIOR )
 {
   // Note that GEOMBase::GetShape() cause crash in batch mode
 
@@ -77,19 +77,21 @@ GEOM::GEOM_Gen_var HYDROData_GeomTool::GetGeomGen()
   return aGEOMEngine._retn();
 }
 
-SALOMEDS::Study_var HYDROData_GeomTool::GetStudyByID( const int theStudyId )
+SALOMEDS::Study_var HYDROData_GeomTool::GetStudy()
 {
-  CORBA::Object_var aSMObject = _NS.Resolve("/myStudyManager");
-  SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow(aSMObject);
-  SALOMEDS::Study_var aDSStudy = aStudyManager->GetStudyByID( theStudyId );
-
-  return aDSStudy._retn();
+  if (_STUDY->_is_nil())
+  {
+    CORBA::Object_var aStudyObject = _NS.Resolve("/Study");
+    _STUDY = SALOMEDS::Study::_narrow(aStudyObject);
+  }
+  return _STUDY._retn();
 }
 
-QString HYDROData_GeomTool::GetFreeName( SALOMEDS::Study_ptr theStudy, const QString& theBaseName )
+QString HYDROData_GeomTool::GetFreeName( const QString& theBaseName )
 {
   QString aName = theBaseName;
 
+  SALOMEDS::Study_var theStudy = GetStudy();
   if ( !theStudy->_is_nil() ) {
     // collect all object names of GEOM component
     QSet<QString> anUsedNames;
@@ -125,15 +127,15 @@ QString HYDROData_GeomTool::GetFreeName( SALOMEDS::Study_ptr theStudy, const QSt
   return aName;
 }
 
-GEOM::GEOM_Object_ptr HYDROData_GeomTool::publishShapeInGEOM( 
-  GEOM::GEOM_Gen_var theGeomEngine, SALOMEDS::Study_ptr theStudy,
+GEOM::GEOM_Object_ptr HYDROData_GeomTool::publishShapeInGEOM(
+  GEOM::GEOM_Gen_var theGeomEngine,
   const TopoDS_Shape& theShape, const QString& theName,
   QString& theGeomObjEntry )
 {
   theGeomObjEntry = "";
   GEOM::GEOM_Object_var aGeomObj;
 
-  if ( theGeomEngine->_is_nil() || theStudy->_is_nil() ||
+  if ( theGeomEngine->_is_nil() || 
        theShape.IsNull() ) {
     return aGeomObj._retn();
   }
@@ -151,26 +153,25 @@ GEOM::GEOM_Object_ptr HYDROData_GeomTool::publishShapeInGEOM(
   SALOMEDS::TMPFile_var aSeqFile = new SALOMEDS::TMPFile( aSize, aSize, anOctetBuf, 1 );
 
   // Restore shape from the stream and get the GEOM object
-  GEOM::GEOM_IInsertOperations_var anInsOp = theGeomEngine->GetIInsertOperations( theStudy->StudyId() );
+  GEOM::GEOM_IInsertOperations_var anInsOp = theGeomEngine->GetIInsertOperations();
   aGeomObj = anInsOp->RestoreShape( aSeqFile );
   
   // Publish the GEOM object
-  theGeomObjEntry = publishGEOMObject( theGeomEngine, theStudy, aGeomObj, theName );
+  theGeomObjEntry = publishGEOMObject( theGeomEngine, aGeomObj, theName );
   
   return aGeomObj._retn();
 }
 
 
 GEOM::GEOM_Object_ptr HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( GEOM::GEOM_Gen_var theGeomEngine, 
-  SALOMEDS::Study_ptr theStudy, 
   const TopoDS_Shape& theShape,   
   const NCollection_IndexedDataMap<TopoDS_Shape, QString, TopTools_ShapeMapHasher>& aFacesToNameModif,  
   const QString& theName,
   QString& theGeomObjEntry)
 { 
-  GEOM::GEOM_Object_ptr aGeomObj = HYDROData_GeomTool::publishShapeInGEOM( theGeomEngine, theStudy, theShape, theName, theGeomObjEntry );
+  GEOM::GEOM_Object_ptr aGeomObj = HYDROData_GeomTool::publishShapeInGEOM( theGeomEngine, theShape, theName, theGeomObjEntry );
 
-  GEOM::GEOM_IShapesOperations_var anExpOp = theGeomEngine->GetIShapesOperations( theStudy->StudyId() );
+  GEOM::GEOM_IShapesOperations_var anExpOp = theGeomEngine->GetIShapesOperations();
   GEOM::ListOfGO* aFc = anExpOp->MakeExplode(aGeomObj, TopAbs_FACE, false);
 
   TopTools_MapOfShape mapShape;
@@ -201,7 +202,7 @@ GEOM::GEOM_Object_ptr HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( GEOM::GE
     std::string name = Names[i].toStdString();
     GEOM::GEOM_Object_ptr anObj = aFc->operator[](i);
     //GEOMBase::PublishSubObject( anObj, name.c_str() );
-    theGeomEngine->AddInStudy( theStudy, anObj, name.c_str(), aGeomObj );
+    theGeomEngine->AddInStudy( anObj, name.c_str(), aGeomObj );
   }
 
   return aGeomObj;
@@ -209,7 +210,6 @@ GEOM::GEOM_Object_ptr HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( GEOM::GE
 
 
  GEOM::GEOM_Object_ptr HYDROData_GeomTool::createFaceInGEOM( GEOM::GEOM_Gen_var theGeomEngine,
-                                                             SALOMEDS::Study_ptr theStudy,
                                                              const int theWidth,
                                                              const int theHeight,
                                                              const QString& theName,
@@ -218,12 +218,12 @@ GEOM::GEOM_Object_ptr HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( GEOM::GE
   theFaceEntry = "";
   GEOM::GEOM_Object_var aGeomObj;
 
-  if ( theGeomEngine->_is_nil() || theStudy->_is_nil() ) {
+  if ( theGeomEngine->_is_nil() ) {
     return aGeomObj._retn();
   }
 
-  GEOM::GEOM_IBasicOperations_var aBasicOperations = theGeomEngine->GetIBasicOperations( theStudy->StudyId() );
-  GEOM::GEOM_IBlocksOperations_var aBlocksOperations = theGeomEngine->GetIBlocksOperations( theStudy->StudyId() );
+  GEOM::GEOM_IBasicOperations_var aBasicOperations = theGeomEngine->GetIBasicOperations();
+  GEOM::GEOM_IBlocksOperations_var aBlocksOperations = theGeomEngine->GetIBlocksOperations();
          
   GEOM::GEOM_Object_var P1 = aBasicOperations->MakePointXYZ( -0.5 * theWidth, -0.5 * theHeight, 0 );
   GEOM::GEOM_Object_var P2 = aBasicOperations->MakePointXYZ(  0.5 * theWidth, -0.5 * theHeight, 0 );
@@ -233,23 +233,22 @@ GEOM::GEOM_Object_ptr HYDROData_GeomTool::ExplodeShapeInGEOMandPublish( GEOM::GE
   GEOM::GEOM_Object_var aFace = aBlocksOperations->MakeQuad4Vertices( P1, P2 ,P3, P4 );
     
   // Publish the face
-  theFaceEntry = publishGEOMObject( theGeomEngine, theStudy, aFace, theName );
+  theFaceEntry = publishGEOMObject( theGeomEngine, aFace, theName );
 
   return aFace._retn();
 }
 
 QString HYDROData_GeomTool::publishGEOMObject( GEOM::GEOM_Gen_var theGeomEngine,
-                                               SALOMEDS::Study_ptr theStudy,
                                                GEOM::GEOM_Object_ptr theGeomObj,
                                                const QString& theName )
 {
   QString anEntry;
 
   if ( !theGeomObj->_is_nil() ) {
-    QString aName = HYDROData_GeomTool::GetFreeName( theStudy, theName );
+    QString aName = HYDROData_GeomTool::GetFreeName( theName );
 
     SALOMEDS::SObject_var aResultSO = 
-      theGeomEngine->PublishInStudy( theStudy, SALOMEDS::SObject::_nil(), 
+      theGeomEngine->PublishInStudy( SALOMEDS::SObject::_nil(), 
                                      theGeomObj, qPrintable( aName ) );
     if ( !aResultSO->_is_nil() ) {
       anEntry = aResultSO->GetID();
index 17d48314b19a630540a087552ff36c7d0957c5b4..419c49c6ed6fb21e316b339f95ee08d4b6b34b6e 100644 (file)
@@ -44,10 +44,9 @@ public:
   /**
    * \brief Get shape by the specified IOR.
    * \param theIOR the GEOM object IOR
-   * \param theStudyId the study ID
    * \return the shape
    */
-  static TopoDS_Shape GetShapeFromIOR( const int theStudyId, const QString& theIOR );
+  static TopoDS_Shape GetShapeFromIOR( const QString& theIOR );
 
   /**
    * \brief Get GEOM engine.
@@ -56,31 +55,27 @@ public:
   static GEOM::GEOM_Gen_var GetGeomGen();
 
   /**
-   * \brief Get shape by the specified study ID.
-   * \param theStudyId the study ID
+   * \brief Get Study.
    * \return the study
    */
-  static SALOMEDS::Study_var GetStudyByID( const int theStudyId );
+  static SALOMEDS::Study_var GetStudy();
 
   /**
    * \brief Get free name for GEOM object.
-   * \param theStudy the study
    * \param theBaseName the base name
    * \return the default name
    */
-  static QString GetFreeName( SALOMEDS::Study_ptr theStudy, const QString& theBaseName );
+  static QString GetFreeName( const QString& theBaseName );
 
   /**
    * Publish the given shape in GEOM as a GEOM object.
    * \param theGeomEngine GEOM module engine
-   * \param theStudy SALOMEDS study, used for publishing of the shape
    * \param theShape the shape to publish as a GEOM object
    * \param theName the name of the published object
    * \param theGeomObjEntry the entry of the published object
    * \return the published GEOM object
    */
   static GEOM::GEOM_Object_ptr publishShapeInGEOM( GEOM::GEOM_Gen_var  theGeomEngine,
-                                                   SALOMEDS::Study_ptr theStudy,
                                                    const TopoDS_Shape& theShape, 
                                                    const QString&      theName,
                                                    QString& theGeomObjEntry );
@@ -88,7 +83,6 @@ public:
   /**
    * Create and publish face in GEOM as a GEOM object.
    * \param theGeomEngine GEOM module engine
-   * \param theStudy SALOMEDS study, used for publishing of the face
    * \param theWidth the face width
    * \param theHeight the face height
    * \param theName the name of the published face
@@ -96,7 +90,6 @@ public:
    * \return the published GEOM object
    */
   static GEOM::GEOM_Object_ptr createFaceInGEOM( GEOM::GEOM_Gen_var theGeomEngine,
-                                                 SALOMEDS::Study_ptr theStudy,
                                                  const int theWidth,
                                                  const int theHeight,
                                                  const QString& theName,
@@ -105,18 +98,15 @@ public:
   /**
    * Publish the given GEOM object in the study.
    * \param theGeomEngine GEOM module engine
-   * \param theStudy SALOMEDS study, used for publishing of the object
    * \param theGeomObj the GEOM object
    * \param theName the object name
    * \return the entry of the published object (empty string in case of fail)
    */
   static QString publishGEOMObject( GEOM::GEOM_Gen_var theGeomEngine,
-                                    SALOMEDS::Study_ptr theStudy,
                                     GEOM::GEOM_Object_ptr theGeomObj,
                                     const QString& theName );
 
   static GEOM::GEOM_Object_ptr ExplodeShapeInGEOMandPublish( GEOM::GEOM_Gen_var theGeomEngine, 
-                                                      SALOMEDS::Study_ptr theStudy, 
                                                       const TopoDS_Shape& theShape, 
                                                       const NCollection_IndexedDataMap<TopoDS_Shape, QString, TopTools_ShapeMapHasher>& aShToNameModif,
                                                       const QString& theName,
index f069df13dd3880cf3c01e1909df4564575e9186b..fcb89b42e7c20c0572e7136142a419a86d8fccfe 100755 (executable)
@@ -1191,7 +1191,7 @@ bool HYDROData_LandCoverMap::ImportSHP( const QString& theSHPFileName,
   QStringList aPolyList; 
   TopTools_SequenceOfShape aFaces;
   //int aSHapeType = -1;
-  int Stat = anImporter.ImportPolygons(HYDROData_Document::Document(1), theSHPFileName, aPolyList, aFaces);
+  int Stat = anImporter.ImportPolygons(HYDROData_Document::Document(), theSHPFileName, aPolyList, aFaces);
   //
   if (Stat != 1)
     return false;
@@ -1232,7 +1232,7 @@ bool HYDROData_LandCoverMap::ExportSHP( const QString& theSHPFileName, bool bUse
 {
   HYDROData_ShapeFile anExporter;
   QStringList aList;
-  anExporter.Export(HYDROData_Document::Document(1), theSHPFileName, this, aList, bUseDiscr, theDefl );
+  anExporter.Export(HYDROData_Document::Document(), theSHPFileName, this, aList, bUseDiscr, theDefl );
   if (aList.empty())
     return true;
   else 
index c3586ef5bc4f5e580aaf8bd8cbef960037652a63..eeb847bbb8b73c64091e35542fc39e3d5b227c9a 100644 (file)
@@ -235,13 +235,8 @@ bool HYDROData_Obstacle::ImportFromGeomIOR( const TCollection_AsciiString& theIO
     return aRes;
   }
   
-  int aDocId = -1;
-  if ( !HYDROData_Document::DocumentId( HYDROData_Document::Document( myLab ), aDocId ) || aDocId < 0 ) {
-    return aRes;
-  }
-
   // TopoDS_Shape aShape = GEOMBase::GetShapeFromIOR( theIOR.ToCString() );
-  TopoDS_Shape aShape = HYDROData_GeomTool::GetShapeFromIOR( aDocId, theIOR.ToCString() );
+  TopoDS_Shape aShape = HYDROData_GeomTool::GetShapeFromIOR( theIOR.ToCString() );
 
   if ( !aShape.IsNull() ) {
     SetShape3D( aShape );
@@ -277,13 +272,8 @@ TCollection_AsciiString HYDROData_Obstacle::GetGeomObjectName() const
 {
   TCollection_AsciiString aRes;
 
-  int aDocId = -1;
-  if ( !HYDROData_Document::DocumentId( HYDROData_Document::Document( myLab ), aDocId ) || aDocId < 0 ) {
-    return aRes;
-  }
-
 #ifndef LIGHT_MODE
-  SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudyByID( aDocId );
+  SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudy();
 
   if ( !aDSStudy->_is_nil() ) {
     TCollection_AsciiString anEntry = GetGeomObjectEntry();
index bfb64ec4535a95ce647f323b26071d8775a58850..e9e8bc4559106cc0c8b8e95ad22b624ff4796297 100644 (file)
@@ -118,7 +118,7 @@ bool HYDROGUI_DataModel::open( const QString& theURL,
 
     try
     {
-      res = HYDROData_Document::Load( (char*)aDataFullPath.toLatin1().constData(), aStudyId );
+      res = HYDROData_Document::Load( (char*)aDataFullPath.toLatin1().constData() );
     }
     catch(...)
     {
@@ -225,7 +225,7 @@ bool HYDROGUI_DataModel::dumpPython( const QString& theURL,
   int aStudyId = theStudy->id();
 
   LightApp_Study* aStudy = ::qobject_cast<LightApp_Study*>( theStudy );
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( aStudyId );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( aDocument.IsNull() || !aStudy )
     return false;
 
@@ -265,7 +265,7 @@ void HYDROGUI_DataModel::update( const int theStudyId )
   // create a new root object
   CAM_DataObject* aNewRootObj = new CAM_DataObject();
 
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theStudyId );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if( aDocument.IsNull() )
     return;
 
@@ -817,7 +817,7 @@ QString HYDROGUI_DataModel::partitionName( const ObjectKind theObjectKind )
 Handle(HYDROData_Document) HYDROGUI_DataModel::getDocument() const
 {
   int aStudyId = module()->application()->activeStudy()->id();
-  return HYDROData_Document::Document( aStudyId );
+  return HYDROData_Document::Document();
 }
 
 LightApp_DataObject* HYDROGUI_DataModel::createObject( SUIT_DataObject*         theParent,
index 77978ee51bc52b9902ac70383030e6603f3f16eb..b024f3b5e30460526c236e0e4b6b26ab4620d7b4 100644 (file)
@@ -87,10 +87,9 @@ bool HYDROGUI_ExportCalculationOp::processApply( int& theUpdateFlags,
   myStatMess.clear();
   QString anErrorMsg;
   if ( aStudy ) {
-    SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy->studyDS() );
     GEOM::GEOM_Gen_var aGeomEngine = GeometryGUI::GetGeomGen();
     QString anEntry;
-    if ( aCalculation->Export( aGeomEngine, aDSStudy, anEntry, theErrorMsg, myStatMess ) ) {
+    if ( aCalculation->Export( aGeomEngine, anEntry, theErrorMsg, myStatMess ) ) {
       theUpdateFlags = UF_ObjBrowser;
       isOk = true;
     }
index 956fb7f3e57eb159ab21e7c6e42531e85d893ed0..0d9027d2253c70e5f8d80370026e873ed41c0b34 100644 (file)
@@ -107,7 +107,7 @@ void HYDROGUI_ExportFileOp::startOperation()
     {
       QStringList aNonExpList;
       HYDROData_ShapeFile anExporter;
-      Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() );
+      Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
       if (!aPolyXYSeq.IsEmpty() || !aPoly3DSeq.IsEmpty())
         //Export polylines
         anExporter.Export(aDoc, aFileName, aPolyXYSeq, aPoly3DSeq, aNonExpList);
index 7b8fedb099aefe2f2552dd754f93ab076b9ce576..351bf92b0f411f1498f0fd6a67b68de7882aa599 100644 (file)
@@ -263,7 +263,7 @@ bool HYDROGUI_ImportLandCoverMapOp::processApply( int& theUpdateFlags,
   if ( !aPanel->getFileName().isEmpty() )
     anObjName = aPanel->getObjectName();
   
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   //check if name of LCM is already exists
   QSet<QString> aNameList;
@@ -409,7 +409,7 @@ void HYDROGUI_ImportLandCoverMapOp::onNext( const int theIndex )
 
     //Collect all strickler_types
     QSet<QString> aSTSet;
-    Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() );
+    Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
     Handle(HYDROData_StricklerTable) DefStricklerTableObj;
     if ( aDoc )
     {
index aeacb30b53d9fb739a760cf440eab91fd948e7b1..40cc9237ae54da5369a22654357fbebca147e34d 100755 (executable)
@@ -250,7 +250,7 @@ bool HYDROGUI_Module::activateModule( SUIT_Study* theStudy )
   SalomeApp_Study* aStudy = 
     dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() );
   if ( aStudy ) {
-    SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy->studyDS() );
+    SALOMEDS::Study_var aDSStudy = GeometryGUI::getStudyServant();
     GEOM::GEOM_Gen_var aGeomEngine = GeometryGUI::GetGeomGen();
     if ( !aGeomEngine->_is_nil() && !aGeomEngine->_is_nil() ) {
       SALOMEDS::StudyBuilder_var aStudyBuilder = aDSStudy->NewBuilder();
@@ -969,7 +969,7 @@ void HYDROGUI_Module::preferencesChanged( const QString& theSection, const QStri
     if ( theSection == "preferences" && thePref == "default_strickler_coefficient" )
     {
         
-        Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() );
+        Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
         if ( resMgr && !aDoc.IsNull() )
             aDoc->SetDefaultStricklerCoefficient( resMgr->doubleValue( theSection, thePref, 0 ) );
     }
@@ -1932,8 +1932,7 @@ void HYDROGUI_Module::onMouseMove( SUIT_ViewWindow* theViewWindow, QMouseEvent*
     if ( aDesktop && aDesktop->statusBar() )
     {
       gp_Pnt aWPnt( X, Y, Z );
-      int aStudyId = application()->activeStudy()->id();
-      HYDROData_Document::Document( aStudyId )->Transform( aWPnt, false );
+      HYDROData_Document::Document()->Transform( aWPnt, false );
       double WX = aWPnt.X(), WY = aWPnt.Y();
 
       QString aXStr = HYDROGUI_Tool::GetCoordinateString( X, true );
index de674e8b413e1688fcd0962af2b346c3449ba316..2bb54eda444e496c872b0a98850f7d527bee2ee2 100644 (file)
@@ -194,7 +194,7 @@ void HYDROGUI_OCCDisplayer::Display( const HYDROData_SequenceOfObjects& theObjs,
     return;
 
   // Get the document
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( module()->getStudyId() );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   if ( !aDoc )
     return;
   
index 8d2ef26ef570d45a22acaec35d8525ee7240b936..5ac4330261f1fdf097c62d559e35e72ae368aff0 100644 (file)
@@ -119,7 +119,7 @@ SUIT_SelectionMgr* HYDROGUI_ObjComboBox::selectionMgr() const
 QStringList HYDROGUI_ObjComboBox::objectNames( HYDROData_SequenceOfObjects& theObjects ) const
 {
     QStringList aNames;
-    for ( HYDROData_Iterator it( HYDROData_Document::Document( module()->getStudyId() ), objectType() ); it.More(); it.Next() )
+    for ( HYDROData_Iterator it( HYDROData_Document::Document(), objectType() ); it.More(); it.Next() )
     {
         if ( !objectFilter() || objectFilter()->isOk( it.Current() ) )
         {
index 80365156df3a7c0d6d75fe17ff36e882495226b9..aeb8e4527e2068a4ae2fecd5e1410ef536485ea7 100644 (file)
@@ -395,7 +395,7 @@ void HYDROGUI_Operation::commitDocOperation()
 
 Handle(HYDROData_Document) HYDROGUI_Operation::doc() const
 {
-  return HYDROData_Document::Document( myModule->getStudyId() );
+  return HYDROData_Document::Document();
 }
 
 void HYDROGUI_Operation::onApplyAndClose()
index f4cec87b19e80ccce1cb00de53bd487b1315f4de..c828568ad9056f9413145a90a256f6bfd5ae25c0 100644 (file)
@@ -458,7 +458,7 @@ void HYDROGUI_Module::updateUndoRedoControls()
 
 void HYDROGUI_Module::enableLCMActions()
 {
-  HYDROData_Iterator anIt( HYDROData_Document::Document( getStudyId() ), KIND_LAND_COVER_MAP );
+  HYDROData_Iterator anIt( HYDROData_Document::Document(), KIND_LAND_COVER_MAP );
   bool anEnableTools = anIt.More();
 
   QtxListAction* anAction;
index 20220731762f8d1c9c7587a5d1be40a6ef3108e5..9af735e48880f823afa5ab68a16f6f1c4cd22ce5 100644 (file)
@@ -127,12 +127,11 @@ void HYDROGUI_RecognizeContoursOp::startOperation()
 
   // Export the selected image to GEOM module
   if ( aStudy && aViewMgr ) {
-    SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy->studyDS() );
     GEOM::GEOM_Gen_var aGeomEngine = GeometryGUI::GetGeomGen();
 
     QString aGeomPictureEntry;
 
-    HYDROData_GeomTool::createFaceInGEOM( aGeomEngine, aDSStudy, aQImage.width(), aQImage.height(), 
+    HYDROData_GeomTool::createFaceInGEOM( aGeomEngine, aQImage.width(), aQImage.height(), 
                                           anImageName, aGeomPictureEntry );
     
     if ( !aGeomPictureEntry.isEmpty() ) {
index 321a72cdc7f44ad5d83d9fd0bb3761740ff50172..3b0a2f4d1ca3372c40a27de003c022b8f3c23f1a 100644 (file)
@@ -46,7 +46,7 @@ HYDROGUI_StricklerTypeComboBox::HYDROGUI_StricklerTypeComboBox( HYDROGUI_Module*
   if ( myModule )
   {
     // Construct a list of unique names of all Strickler types defined within the data model
-    Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myModule->getStudyId() );
+    Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
     if ( aDoc )
     {
       QStringList aStricklerTypes;
index a7b684ff76b71f5f1e94b54b08eda6d26a1c457d..ad41ec63473ec70553d36c87cd47ebdecec4d7f9 100644 (file)
@@ -141,7 +141,7 @@ bool HYDROGUI_Tool::IsObjectHasPresentation( const Handle(HYDROData_Entity)& the
 void HYDROGUI_Tool::GetPrsSubObjects( HYDROGUI_Module* theModule,
                                       HYDROData_SequenceOfObjects& theSeq )
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if( !aDocument.IsNull() )
   {
     HYDROData_Iterator anIterator( aDocument );
@@ -230,7 +230,7 @@ Handle(HYDROData_Entity) HYDROGUI_Tool::GetSelectedObject( HYDROGUI_Module* theM
 
 HYDROData_SequenceOfObjects HYDROGUI_Tool::GetGeometryObjects( HYDROGUI_Module* theModule )
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
 
   HYDROData_SequenceOfObjects aResSeq;
 
@@ -389,7 +389,7 @@ Handle(HYDROData_Entity) HYDROGUI_Tool::FindObjectByName( HYDROGUI_Module* theMo
 {
   Handle(HYDROData_Entity) aResObj;
   
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( !aDocument.IsNull() )
     aResObj = aDocument->FindObjectByName( theName, theObjectKind );
   
@@ -402,7 +402,7 @@ HYDROData_SequenceOfObjects HYDROGUI_Tool::FindObjectsByNames( HYDROGUI_Module*
 {
   HYDROData_SequenceOfObjects aResSeq;
 
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   if ( !aDocument.IsNull() )
     aResSeq = aDocument->FindObjectsByNames( theNames, theObjectKind );
 
@@ -414,7 +414,7 @@ QString HYDROGUI_Tool::GenerateObjectName( HYDROGUI_Module*   theModule,
                                            const QStringList& theUsedNames,
                                            const bool         theIsTryToUsePurePrefix)
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   return HYDROData_Tool::GenerateObjectName( aDocument, thePrefix, theUsedNames, theIsTryToUsePurePrefix );
 }
 
@@ -509,7 +509,7 @@ void HYDROGUI_Tool::setOCCActionShown( HYDROGUI_Module* theModule,
 QColor HYDROGUI_Tool::GenerateFillingColor( HYDROGUI_Module*   theModule,
                                             const QStringList& theZoneNames )
 {
-  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
   return GenerateFillingColor( aDocument, theZoneNames );
 }
 
index dac4e0d40f026c2e4ad101f581c3cebfb3b1dc6d..10532be631e36330539c1b34b5a726e9cca54832 100644 (file)
@@ -378,13 +378,11 @@ public:
   /**
    * Exports the calculation case data (shell and groups) to GEOM module.
    * \param theGeomEngine GEOM module engine
-   * \param theStudy SALOMEDS study, is used for publishing of GEOM objects
    * \return true in case of success
    */
-//TODO:  virtual bool Export( GEOM::GEOM_Gen_var theGeomEngine,
-//                       SALOMEDS::Study_ptr theStudy );
+//TODO:  virtual bool Export( GEOM::GEOM_Gen_var theGeomEngine );
        
-       QString Export( int theStudyId ) const;
+       QString Export( ) const;
 
 public:      
   // Public methods to work with Calculation services
index 49febca4cea5406453b4d26c3dcb627c87170708..6c0a75aa4cf74b6f9dfe1d0f745380ebc3756cbf 100644 (file)
@@ -205,13 +205,13 @@ class HYDROData_Document
 public:
 
   //! Returns the existing document or creates new if it is not exist
-  static HYDROData_Document Document( const int theStudyID ) [opencascade::handle<HYDROData_Document> (const int)] ;
+  static HYDROData_Document Document() [opencascade::handle<HYDROData_Document> ()] ;
   %MethodCode
 
     Handle(HYDROData_Document) aDocument;
 
     Py_BEGIN_ALLOW_THREADS
-    aDocument = HYDROData_Document::Document( a0 );
+    aDocument = HYDROData_Document::Document();
     Py_END_ALLOW_THREADS
 
     if ( !aDocument.IsNull() )
@@ -220,13 +220,12 @@ public:
   %End
 
   //! Returns true if data model contains document for this study
-  static bool HasDocument( const int theStudyID );
+  static bool HasDocument();
 
   //! Loads the OCAF document from the file.
   //! \param theFileName full name of the file to load
-  //! \param theStudyID identifier of the SALOME study to associate with loaded file
   //! \returns error status (OK in case of success)
-  static Data_DocError Load( const char* theFileName, const int theStudyID );
+  static Data_DocError Load( const char* theFileName);
 
   //! Saves the OCAF document to the file.
   //! \param theFileName full name of the file to store
index 7bbc96bbf128891384fd2127fca8e0a543222c5c..b97d7543cb123e18fa6396594aa3bd46b3be3448 100644 (file)
@@ -30,7 +30,7 @@
 
 void test_Dependencies::test_dependencies_broad_cast()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Bathymetry) aBath =
     Handle(HYDROData_Bathymetry)::DownCast( aDoc->CreateObject( KIND_BATHYMETRY ) );
@@ -101,7 +101,7 @@ void test_Dependencies::test_dependencies_broad_cast()
 
 void test_Dependencies::test_calc_case_ref_objects()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_ImmersibleZone) aZone =
     Handle(HYDROData_ImmersibleZone)::DownCast( aDoc->CreateObject( KIND_IMMERSIBLE_ZONE ) );
index 5de3256b66156050084c4a35d293cf1657af14c7..a243d1aef5e46137bc2367792ea9532e0491815f 100644 (file)
@@ -117,7 +117,7 @@ bool test_HYDROData_Bathymetry::createTestFile( const QString& theFileName )
 
 void test_HYDROData_Bathymetry::testFileImport()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Bathymetry) aBathymetry = 
     Handle(HYDROData_Bathymetry)::DownCast( aDoc->CreateObject( KIND_BATHYMETRY ) );
@@ -161,7 +161,7 @@ void test_HYDROData_Bathymetry::testFileImport()
 
 void test_HYDROData_Bathymetry::testCopy()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   
   Handle(HYDROData_Bathymetry) aBathymetry1 = 
     Handle(HYDROData_Bathymetry)::DownCast( aDoc->CreateObject( KIND_BATHYMETRY ) );
index 1877e1a3be2408f93f6a3508f76edd03071acaed..541f54ba85cfe57ac5e907d8f7bd115207639001 100644 (file)
@@ -34,9 +34,9 @@ void test_HYDROData_BoundaryPolygons::test_bp_1()
 {  
   TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
   fname += "/test_boundary_polygon_calc_case_1.cbf";
-  CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString(), 1 ) );
+  CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString() ) );
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);  
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();  
   //Calc case already contains already contains 4 boundary poltgons (3 cut, 1 include)
   //Update it to recalculate the shape groups
   Handle(HYDROData_CalculationCase) aCase = 
@@ -109,8 +109,8 @@ void test_HYDROData_BoundaryPolygons::test_bp_2()
 {
   TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
   fname += "/test_boundary_polygon_calc_case_2.cbf";
-  CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString(), 1 ) );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString() ) );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   //add boundary polygons to case_1
   Handle(HYDROData_CalculationCase) aCase = 
     Handle(HYDROData_CalculationCase)::DownCast( aDoc->FindObjectByName( "Case_1" ) );
index 91141a7c19a77d5e4f0ed80f9ee68f16e8628784..e383b41d4ea82f68ec3720cc02c2ea639f603f73 100644 (file)
@@ -135,9 +135,9 @@ void test_HYDROData_CalcCase::test_complete_1()
 {  
   TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
   fname += "/study_cc_1.cbf";
-  CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString(), 1 ) );
+  CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString() ) );
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);  
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();  
 
   Handle(HYDROData_CalculationCase) aCase = 
     Handle(HYDROData_CalculationCase)::DownCast( aDoc->FindObjectByName( "Case_1" ) );
@@ -222,9 +222,9 @@ void test_HYDROData_CalcCase::test_complete_2()
 {  
   TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
   fname += "/study_cc_2.cbf";
-  CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString(), 1 ) );
+  CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString() ) );
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);  
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();  
 
   Handle(HYDROData_CalculationCase) aCase = 
     Handle(HYDROData_CalculationCase)::DownCast( aDoc->FindObjectByName( "Case_1" ) );
index c80b0da3c356626d86e999e08668d5589480a4ea..be1cced8dc5d3ed970459847256ffaef64378748 100644 (file)
@@ -37,7 +37,7 @@ TopoDS_Edge Spline( const QList<double>& theXYList, bool isClosed = false );
 
 void test_HYDROData_Channel::test_channel_prs_refs_751()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) Polyline_2 = 
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
index 48a470691ea6d6f25058ff9a37caab63f9454b58..6fc2fb9f21c561c4576900a9f8836d03bb3e9cdc 100644 (file)
@@ -160,7 +160,7 @@ void test_HYDROData_DTM::setUp()
 
 void test_HYDROData_DTM::test_creation()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_DTM) DTM = 
     Handle(HYDROData_DTM)::DownCast( aDoc->CreateObject( KIND_DTM ) );
@@ -172,7 +172,7 @@ void test_HYDROData_DTM::test_creation()
 
 void test_HYDROData_DTM::test_hydraulic_axis()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Profile) aProfile1 = 
     Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
@@ -225,7 +225,7 @@ void test_HYDROData_DTM::test_hydraulic_axis()
 
 void test_HYDROData_DTM::test_profile_conversion_to_2d()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Profile) aProfile1 = 
     Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
@@ -296,7 +296,7 @@ void test_HYDROData_DTM::test_profile_conversion_to_2d()
 
 void test_HYDROData_DTM::test_profile_properties()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Profile) aProfile = 
     Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
@@ -332,7 +332,7 @@ void test_HYDROData_DTM::test_profile_properties()
 
 void test_HYDROData_DTM::test_profile_discretization_polyline()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Profile) aProfile = 
     Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
@@ -371,7 +371,7 @@ void test_HYDROData_DTM::test_profile_discretization_polyline()
 
 void test_HYDROData_DTM::test_profile_discretization_spline()
 {
-Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Profile) aProfile = 
     Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
@@ -479,7 +479,7 @@ void test_HYDROData_DTM::test_curves_interpolation()
 
 void test_HYDROData_DTM::test_curve_to_3d()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Profile) aProfile1 = 
     Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
@@ -523,7 +523,7 @@ void test_HYDROData_DTM::test_curve_to_3d()
 
 void test_HYDROData_DTM::test_presentation()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_DTM) DTM = Handle(HYDROData_DTM)::DownCast( aDoc->CreateObject( KIND_DTM ) );
 
@@ -578,7 +578,7 @@ void test_HYDROData_DTM::test_presentation()
 
 void test_HYDROData_DTM::test_garonne()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   
   TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
   fname += "/Profiles.xyz";
@@ -634,9 +634,9 @@ void test_HYDROData_DTM::test_classifier_1()
 {
   TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
   fname += "/pb_1066.cbf";
-  CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString(), 1 ) );
+  CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString() ) );
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   
   Handle(HYDROData_CalculationCase) aCase = 
     Handle(HYDROData_CalculationCase)::DownCast( aDoc->FindObjectByName( "Case_1" ) );
index 9469ec38efeafa4043e2ab7216e93ffe43904047..d1079f2de87721362037fbc8bfda4b1cbdc29372 100644 (file)
@@ -26,7 +26,7 @@ void test_HYDROData_Document::testSaveOpen()
   // temporarly created file name (in the current directory)
   const char* aTestFile = "TestDoc.cbf";
   // save
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   CPPUNIT_ASSERT(!aDoc.IsNull());
   // keep some saved information to check after retreive
   aDoc->NewID();
@@ -34,13 +34,13 @@ void test_HYDROData_Document::testSaveOpen()
   Data_DocError aStatus = aDoc->Save(aTestFile);
   CPPUNIT_ASSERT(aStatus == DocError_OK);
   aDoc->Close();
-  CPPUNIT_ASSERT(!HYDROData_Document::HasDocument(1));
+  CPPUNIT_ASSERT(!HYDROData_Document::HasDocument());
 
   // open
-  aStatus = HYDROData_Document::Load(aTestFile, 2);
+  aStatus = HYDROData_Document::Load(aTestFile);
   CPPUNIT_ASSERT(aStatus == DocError_OK);
-  CPPUNIT_ASSERT(HYDROData_Document::HasDocument(2));
-  aDoc = HYDROData_Document::Document(2);
+  CPPUNIT_ASSERT(HYDROData_Document::HasDocument());
+  aDoc = HYDROData_Document::Document();
   CPPUNIT_ASSERT(!aDoc.IsNull());
   // check that retreived correctly
   CPPUNIT_ASSERT(aDoc->NewID() == anID + 1);
@@ -54,7 +54,7 @@ void test_HYDROData_Document::testSaveOpen()
 
 void test_HYDROData_Document::testOperations()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   CPPUNIT_ASSERT(!aDoc.IsNull());
   CPPUNIT_ASSERT(!aDoc->IsOperation());
   CPPUNIT_ASSERT(!aDoc->IsModified());
@@ -80,7 +80,7 @@ void test_HYDROData_Document::testOperations()
 
 void test_HYDROData_Document::testUndoRedo()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   CPPUNIT_ASSERT(!aDoc.IsNull());
   CPPUNIT_ASSERT(!aDoc->CanUndo());
   CPPUNIT_ASSERT(!aDoc->CanRedo());
index ca377c32f91a62bdba62ec72241d3759bf0f851f..285d9972ce1243b8c852a4e32390cf5b634471fb 100644 (file)
@@ -25,7 +25,7 @@
 
 void test_HYDROData_Entity::testName()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
   static const QString aName("test_name");
@@ -37,7 +37,7 @@ void test_HYDROData_Entity::testName()
 
 void test_HYDROData_Entity::testRemove()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   
   Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
   CPPUNIT_ASSERT(!anObj->IsRemoved());
@@ -49,7 +49,7 @@ void test_HYDROData_Entity::testRemove()
 
 void test_HYDROData_Entity::testCopy()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
   static const QString aName("test_name");
@@ -67,7 +67,7 @@ void test_HYDROData_Entity::testCopy()
 
 void test_HYDROData_Entity::testPythonNameChoice()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
   
index 9e2014ae69660938b9923dedc0460bc050b8fd3a..bcea756c4fa66a36590dd8fbc5ab8ddd16897d25 100644 (file)
@@ -39,7 +39,7 @@ static QImage TestImage() {
 
 void test_HYDROData_Image::testQImage()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Image) anImage = 
     Handle(HYDROData_Image)::DownCast(aDoc->CreateObject(KIND_IMAGE));
@@ -61,7 +61,7 @@ void test_HYDROData_Image::testQImage()
 
 void test_HYDROData_Image::testTrsf()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Image) anImage = 
     Handle(HYDROData_Image)::DownCast(aDoc->CreateObject(KIND_IMAGE));
@@ -86,7 +86,7 @@ void test_HYDROData_Image::testTrsf()
 
 void test_HYDROData_Image::testReferences()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Image) anImage1 = 
     Handle(HYDROData_Image)::DownCast(aDoc->CreateObject(KIND_IMAGE));
@@ -137,7 +137,7 @@ void test_HYDROData_Image::testReferences()
 
 void test_HYDROData_Image::testCopy()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Image) anImage1 = 
     Handle(HYDROData_Image)::DownCast(aDoc->CreateObject(KIND_IMAGE));
@@ -193,7 +193,7 @@ void test_HYDROData_Image::test_loadECW()
   QString refECWPath = REF_DATA_PATH + "/01-2009-0865-6525-LA93.ecw";    
   QString refPNGPath = REF_DATA_PATH + "/01-2009-0865-6525-LA93.png";
   //
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   Handle(HYDROData_Image) ecwHImage = Handle(HYDROData_Image)::DownCast(aDoc->CreateObject(KIND_IMAGE));
   //
   CPPUNIT_ASSERT (ecwHImage->LoadImageECW(refECWPath));
index 7381a4e77ee294a1d54ed3a9437bf002e185c640..4efa7cfdd090f548cfbe8f83fbe34d29d64ea6e3 100644 (file)
@@ -27,7 +27,7 @@ void test_HYDROData_Iterator::testOneKind()
 {
   static const QString aName1("test_name1");
   static const QString aName2("test_name2");
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // image object
   anObj->SetName(aName1);
@@ -55,7 +55,7 @@ void test_HYDROData_Iterator::testAllKinds()
 {
   static const QString aName1("test_name1");
   static const QString aName2("test_name2");
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // image object
   anObj->SetName(aName1);
index b1eb3e1a6e58335323f5f3df18a6c698d906f4e1..1423827be9b2817ff34e009dc9a28992e3d0015b 100644 (file)
@@ -54,7 +54,7 @@ extern QString TMP_DIR;
 
 void test_HYDROData_LandCoverMap::test_add_2_objects()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_LandCoverMap) aMap =
     Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
@@ -100,7 +100,7 @@ void test_HYDROData_LandCoverMap::test_add_2_objects()
 
 void test_HYDROData_LandCoverMap::test_split()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_LandCoverMap) aMap =
     Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
@@ -135,7 +135,7 @@ void test_HYDROData_LandCoverMap::test_split()
 
 void test_HYDROData_LandCoverMap::test_incomplete_split()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_LandCoverMap) aMap =
     Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
@@ -167,7 +167,7 @@ void test_HYDROData_LandCoverMap::test_incomplete_split()
 
 void test_HYDROData_LandCoverMap::test_merge()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_LandCoverMap) aMap =
     Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
@@ -212,7 +212,7 @@ void test_HYDROData_LandCoverMap::test_merge()
 
 void test_HYDROData_LandCoverMap::test_merge_refs_691()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) Polyline_4 =
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
@@ -272,7 +272,7 @@ void test_HYDROData_LandCoverMap::test_merge_refs_691()
 
 void test_HYDROData_LandCoverMap::test_remove()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_LandCoverMap) aMap =
     Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
@@ -534,7 +534,7 @@ void test_HYDROData_LandCoverMap::test_merge_faces_circles()
 
 void test_HYDROData_LandCoverMap::test_import_dbf()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_LandCoverMap) aMap =
     Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
@@ -572,7 +572,7 @@ void test_HYDROData_LandCoverMap::test_import_dbf()
 #include <QTest>
 void test_HYDROData_LandCoverMap::test_land_cover_prs_by_types()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
@@ -624,7 +624,7 @@ void test_HYDROData_LandCoverMap::test_land_cover_prs_by_types()
 
 void test_HYDROData_LandCoverMap::test_land_cover_prs_by_coeff()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
@@ -660,7 +660,7 @@ void test_HYDROData_LandCoverMap::test_land_cover_prs_by_coeff()
 
 void test_HYDROData_LandCoverMap::test_dump_python()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
@@ -702,7 +702,7 @@ void test_HYDROData_LandCoverMap::test_dump_python()
 
 void test_HYDROData_LandCoverMap::test_transparent_prs()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
@@ -742,7 +742,7 @@ void test_HYDROData_LandCoverMap::test_transparent_prs()
 
 void test_HYDROData_LandCoverMap::test_add_triangles()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) Polyline_1 =
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
@@ -813,7 +813,7 @@ void test_HYDROData_LandCoverMap::test_add_triangles()
 
 void test_HYDROData_LandCoverMap::test_assign_to_calc_case()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_LandCoverMap) aMap =
     Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
@@ -830,7 +830,7 @@ void test_HYDROData_LandCoverMap::test_shp_import_cyp()
 {
   //TestViewer::eraseAll(true);
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   QString aFileName = REF_DATA_PATH + "/cyprus_natural.shp";
   HYDROData_ShapeFile anImporter;
   QStringList PolygonList;
@@ -861,7 +861,7 @@ void test_HYDROData_LandCoverMap::test_shp_import_cyp()
 
 void test_HYDROData_LandCoverMap::test_shp_import_clc_dec()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   QString aFileName = REF_DATA_PATH + "/CLC_decoupe.shp";
   HYDROData_ShapeFile anImporter;
   QStringList PolygonList;
@@ -892,7 +892,7 @@ void test_HYDROData_LandCoverMap::test_shp_import_clc_dec()
 
 void test_HYDROData_LandCoverMap::test_shp_import_nld_areas()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   QString aFileName = REF_DATA_PATH + "/NLD_water_areas_dcw.shp";
   HYDROData_ShapeFile anImporter;
   QStringList PolygonList;
@@ -929,7 +929,7 @@ void test_HYDROData_LandCoverMap::test_shp_loop_back()
   {
     //DEBTRACE("aFFileName: " << aFFileName.toStdString());
     //DEBTRACE("aSFileName: " << aSFileName.toStdString());
-    Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+    Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
     HYDROData_ShapeFile anImporter;
     QStringList PolygonList;
     TopTools_SequenceOfShape PolygonFaces;
@@ -962,7 +962,7 @@ void test_HYDROData_LandCoverMap::test_shp_loop_back()
     aDoc->Close();
   }
   {
-    Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+    Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
     HYDROData_ShapeFile anImporter;
     QStringList PolygonList;
     TopTools_SequenceOfShape PolygonFaces;
@@ -991,7 +991,7 @@ void test_HYDROData_LandCoverMap::test_shp_loop_back()
 
 void test_HYDROData_LandCoverMap::test_add_2_section_poly()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) Polyline_12 =
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
@@ -1021,7 +1021,7 @@ void test_HYDROData_LandCoverMap::test_add_2_section_poly()
 
 void test_HYDROData_LandCoverMap::test_split_2()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) Polyline_1 =
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
@@ -1094,7 +1094,7 @@ void test_HYDROData_LandCoverMap::test_split_2()
 
 void test_HYDROData_LandCoverMap::test_export_telemac()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
@@ -1135,7 +1135,7 @@ void test_HYDROData_LandCoverMap::test_export_telemac()
 
 void test_HYDROData_LandCoverMap::test_copy()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_LandCoverMap) aMap =
     Handle(HYDROData_LandCoverMap)::DownCast( aDoc->CreateObject( KIND_LAND_COVER_MAP ) );
@@ -1177,7 +1177,7 @@ void test_HYDROData_LandCoverMap::test_copy()
 
 void test_HYDROData_LandCoverMap::test_shp_clc_classification_perf()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   QString aFileName = REF_DATA_PATH + "/CLC_decoupe.shp";
   HYDROData_ShapeFile anImporter;
   QStringList PolygonList;
@@ -1244,7 +1244,7 @@ void test_HYDROData_LandCoverMap::test_shp_clc_classification_perf()
 
 void test_HYDROData_LandCoverMap::test_shp_clc_classification_check()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   QString aFileName = REF_DATA_PATH + "/CLC_decoupe.shp";
   HYDROData_ShapeFile anImporter;
   QStringList PolygonList;
@@ -1307,7 +1307,7 @@ void test_HYDROData_LandCoverMap::test_shp_clc_classification_check()
 
 void test_HYDROData_LandCoverMap::test_lcm_classification()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
index f9c08ec5484d56b0111146a2a56e9ae8bfa57c3d..b01dc7b98a285b7ab568ef205beb67332b46c2a4 100644 (file)
@@ -31,7 +31,7 @@
 
 void test_HYDROData_OperationsFactory::testCreate()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   
   HYDROData_OperationsFactory* aFactory = HYDROData_OperationsFactory::Factory();
   CPPUNIT_ASSERT(aFactory);
@@ -56,7 +56,7 @@ static QImage TestImage() {
 
 void test_HYDROData_OperationsFactory::testCrop()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   HYDROData_OperationsFactory* aFactory = HYDROData_OperationsFactory::Factory();
   
   // prepare the original image and crop-path
index 914097681dc23b405dbba726f8e3f0806a43f7bc..2fed851cd9a2475dbdc2800b79ea93ec0e857ca9 100644 (file)
@@ -54,7 +54,7 @@ extern QString REF_DATA_PATH;
 
 void test_HYDROData_PolylineXY::test_polyline()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) aPolyline = 
     Handle(HYDROData_PolylineXY)::DownCast(aDoc->CreateObject(KIND_POLYLINEXY));
@@ -84,7 +84,7 @@ void test_HYDROData_PolylineXY::test_polyline()
 
 void test_HYDROData_PolylineXY::test_copy()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   Handle(HYDROData_PolylineXY) aPolyline1 = 
     Handle(HYDROData_PolylineXY)::DownCast(aDoc->CreateObject(KIND_POLYLINEXY));
 
@@ -102,7 +102,7 @@ void test_HYDROData_PolylineXY::test_copy()
 
 void test_HYDROData_PolylineXY::test_split_refs_624()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) aPolyline = 
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
@@ -135,7 +135,7 @@ void test_HYDROData_PolylineXY::test_split_refs_624()
 
 void test_HYDROData_PolylineXY::test_extraction_immersible_zone()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) aPolyline = 
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
@@ -169,7 +169,7 @@ void test_HYDROData_PolylineXY::test_extraction_immersible_zone()
 
 void test_HYDROData_PolylineXY::test_extraction_channel_refs_611()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) aPolyline2d = 
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
@@ -226,7 +226,7 @@ void test_HYDROData_PolylineXY::test_extraction_channel_refs_611()
 
 void test_HYDROData_PolylineXY::test_presentation()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) aPolyline2d = 
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
@@ -299,7 +299,7 @@ void test_HYDROData_PolylineXY::test_presentation()
 
 void test_HYDROData_PolylineXY::test_split_refs_627()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) aPolyline = 
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
@@ -370,7 +370,7 @@ void test_HYDROData_PolylineXY::test_split_refs_627()
 
 void test_HYDROData_PolylineXY::test_custom_polylines()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) aPolyline1 = 
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
@@ -426,7 +426,7 @@ void test_HYDROData_PolylineXY::test_custom_polylines()
 
 void test_HYDROData_PolylineXY::test_merge_refs_630()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) aPolyline1 = 
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
@@ -476,7 +476,7 @@ void test_HYDROData_PolylineXY::test_merge_refs_630()
 
 void test_HYDROData_PolylineXY::test_split_straight_refs_634()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_PolylineXY) aPolyline1 = 
     Handle(HYDROData_PolylineXY)::DownCast( aDoc->CreateObject( KIND_POLYLINEXY ) );
@@ -548,7 +548,7 @@ void test_HYDROData_PolylineXY::test_split_straight_refs_634()
 void test_HYDROData_PolylineXY::test_import_from_xyz()
 {
   NCollection_Sequence<Handle(HYDROData_Entity)> ents;
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
   fname += "/profiles1.xyz";
 
@@ -578,7 +578,7 @@ void test_HYDROData_PolylineXY::test_import_from_xyz()
 
 void test_HYDROData_PolylineXY::test_import_from_sx()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
   fname += "/polylines_sx.sx";
 
index d649b6dcc639fa7d5d909aee99b7ea80456d4fd0..d4ebe9853740cd8175c5969636fdf727ce53455d 100644 (file)
@@ -80,7 +80,7 @@ bool test_HYDROData_Profile::createTestFile( const QString& theFileName,
 
 void test_HYDROData_Profile::testFileImport()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   QString aParamFileName = TMP_DIR + QDir::separator() + "parametric.pa";
   QString aGeorefFileName = TMP_DIR + QDir::separator() + "georef.pa";
@@ -139,7 +139,7 @@ void test_HYDROData_Profile::testFileImport()
 
 void test_HYDROData_Profile::testCopy()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   
   Handle(HYDROData_Profile) aProfile1 = 
     Handle(HYDROData_Profile)::DownCast( aDoc->CreateObject( KIND_PROFILE ) );
@@ -187,7 +187,7 @@ void test_HYDROData_Profile::testProjection()
 {
   std::string aPath = ( REF_DATA_PATH+"/profiles1.xyz" ).toStdString();
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   TCollection_AsciiString aFileName( aPath.c_str() );
   NCollection_Sequence<int> aBadProfilesList;
index 6d63658f26597f296aa18943bf3bade33d90504e..a6dfe1cee142267e911d840a1231824f28322f44 100644 (file)
@@ -77,7 +77,7 @@ void test_HYDROData_Stream::test_alt_object()
 {
   TestViewer::eraseAll( true, true );
   
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Stream) aStream = 
     Handle(HYDROData_Stream)::DownCast( aDoc->CreateObject( KIND_STREAM ) );
@@ -99,7 +99,7 @@ void test_HYDROData_Stream::test_params_sync()
 {
   TestViewer::eraseAll( true, true );
   
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Stream) aStream = 
     Handle(HYDROData_Stream)::DownCast( aDoc->CreateObject( KIND_STREAM ) );
@@ -153,7 +153,7 @@ void test_HYDROData_Stream::test_dump()
   TestViewer::eraseAll( true, true );
   
   // Case 1. Without hydraulic axis
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_Stream) aStream1 = 
     Handle(HYDROData_Stream)::DownCast( aDoc->CreateObject( KIND_STREAM ) );
@@ -243,7 +243,7 @@ void test_HYDROData_Stream::test_presentation()
 {
   TestViewer::eraseAll( true, true );
   
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   
   TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
   fname += "/Profiles.xyz";
@@ -293,9 +293,9 @@ void test_HYDROData_Stream::test_lism_1()
 
   TCollection_AsciiString fname = REF_DATA_PATH.toLatin1().data();
   fname += "/study_lism_1.cbf";
-  CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString(), 1 ) );
+  CPPUNIT_ASSERT_EQUAL( (int)DocError_OK, (int)HYDROData_Document::Load( fname.ToCString() ) );
 
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);  
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();  
 
   HYDROData_SequenceOfObjects profiles;
   HYDROData_Iterator it( aDoc, KIND_PROFILE );
index bfc5403733f7860e8485b7f23eb0b689e1539c0e..659d490134bcd0c1cf183e8f60d4d8f298fe8411 100644 (file)
@@ -33,7 +33,7 @@ extern QString TMP_DIR;
 
 void test_HYDROData_StricklerTable::test_import()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
@@ -59,7 +59,7 @@ void test_HYDROData_StricklerTable::test_import()
 
 void test_HYDROData_StricklerTable::test_import_export_equivalence()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
@@ -90,7 +90,7 @@ void test_HYDROData_StricklerTable::test_import_export_equivalence()
 
 void test_HYDROData_StricklerTable::test_type_by_attr()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
@@ -106,7 +106,7 @@ void test_HYDROData_StricklerTable::test_type_by_attr()
 
 void test_HYDROData_StricklerTable::test_unique_attr_name()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable1 =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
@@ -134,7 +134,7 @@ void test_HYDROData_StricklerTable::test_unique_attr_name()
 
 void test_HYDROData_StricklerTable::test_colors_sync()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable1 =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
@@ -158,7 +158,7 @@ void test_HYDROData_StricklerTable::test_colors_sync()
 
 void test_HYDROData_StricklerTable::test_duplication_refs_613()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable1 =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
@@ -204,7 +204,7 @@ void test_HYDROData_StricklerTable::test_duplication_refs_613()
 
 void test_HYDROData_StricklerTable::test_dump_python()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
@@ -222,7 +222,7 @@ void test_HYDROData_StricklerTable::test_dump_python()
 
 void test_HYDROData_StricklerTable::test_add_row_in_gui_refs_717()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   Handle(HYDROData_StricklerTable) aTable =
     Handle(HYDROData_StricklerTable)::DownCast( aDoc->CreateObject( KIND_STRICKLER_TABLE ) );
index 4eec4f63173378f981a88b2a0eba9f1427932e45..a250928903f61e80f630b12eadf0f23ddde6140b 100644 (file)
@@ -63,7 +63,7 @@ void test_HYDROGUI_BathymetryPrs::updateColors()
 void test_HYDROGUI_BathymetryPrs::test_presentation()
 {
   TestViewer::eraseAll( true, true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
@@ -95,7 +95,7 @@ void select( int x1, int y1, int x2, int y2 )
 void test_HYDROGUI_BathymetryPrs::test_selection()
 {
   TestViewer::eraseAll( true, true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
@@ -126,7 +126,7 @@ void test_HYDROGUI_BathymetryPrs::test_selection()
 void test_HYDROGUI_BathymetryPrs::test_rescale_by_selection()
 {
   TestViewer::eraseAll( true, true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
@@ -185,7 +185,7 @@ void test_HYDROGUI_BathymetryPrs::test_rescale_by_selection()
 void test_HYDROGUI_BathymetryPrs::test_rescale_by_visible()
 {
   TestViewer::eraseAll( true, true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
@@ -232,7 +232,7 @@ void test_HYDROGUI_BathymetryPrs::test_rescale_by_visible()
 void test_HYDROGUI_BathymetryPrs::test_text_presentation()
 {
   TestViewer::eraseAll( true, true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
@@ -283,7 +283,7 @@ void test_HYDROGUI_BathymetryPrs::test_text_presentation()
 void test_HYDROGUI_BathymetryPrs::test_rescale_default()
 {
   TestViewer::eraseAll( true, true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
@@ -340,7 +340,7 @@ void test_HYDROGUI_BathymetryPrs::test_rescale_default()
 void test_HYDROGUI_BathymetryPrs::test_fit_on_selected()
 {
   TestViewer::eraseAll( true, true );
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
 
   importTestBath( aDoc );
   TestViewer::showColorScale( false );
index a9ac1dc0cde1af86480a7c8d66e2f629a614d76d..9836f3e635d474df0c82462f08cd9aa41e87882d 100644 (file)
@@ -35,7 +35,7 @@ bool isOK( const HYDROGUI_LandCoverArgsFilter& theFilter,
 
 void test_HYDROGUI_LandCoverMapDlg::test_objects_filtering_refs_707()
 {
-  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( 1 );
+  Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
   
   HYDROGUI_LandCoverArgsFilter f( AddLandCoverId );
 
index 2290ed7e174f96abe8cd3b6799b56b4c80072498..dc1bdc22a8b0d944670a8da51221f987bc874a5b 100644 (file)
@@ -24,7 +24,7 @@
 
 Handle(HYDROData_Document) GetDocument()
 {
-  return HYDROData_Document::Document( 0 );
+  return HYDROData_Document::Document();
 }
 
 HYDROGUI_ListModel::Object2VisibleList CreateTestObjects( int theObjCount )