From: adv Date: Tue, 5 Nov 2013 10:43:15 +0000 (+0000) Subject: The model acces is done by label instead of object. X-Git-Tag: BR_hydro_v_0_3~49 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dadcea132a8b5df65f63168ecdc59b245c374b8b;p=modules%2Fhydro.git The model acces is done by label instead of object. --- diff --git a/src/HYDROData/HYDROData_AltitudeObject.cxx b/src/HYDROData/HYDROData_AltitudeObject.cxx index 4a5bea01..005b4b1a 100644 --- a/src/HYDROData/HYDROData_AltitudeObject.cxx +++ b/src/HYDROData/HYDROData_AltitudeObject.cxx @@ -23,7 +23,7 @@ QStringList HYDROData_AltitudeObject::DumpToPython( MapOfTreatedObjects& theTrea { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; diff --git a/src/HYDROData/HYDROData_Bathymetry.cxx b/src/HYDROData/HYDROData_Bathymetry.cxx index 0de39887..95c0affd 100644 --- a/src/HYDROData/HYDROData_Bathymetry.cxx +++ b/src/HYDROData/HYDROData_Bathymetry.cxx @@ -34,7 +34,7 @@ QStringList HYDROData_Bathymetry::DumpToPython( MapOfTreatedObjects& theTreatedO { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index 6c5339e2..adc5843e 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -28,7 +28,7 @@ QStringList HYDROData_CalculationCase::DumpToPython( MapOfTreatedObjects& theTre { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; @@ -77,7 +77,7 @@ void HYDROData_CalculationCase::SplitGeometryObjects() // At first we remove previously created regions RemoveRegions(); - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return; @@ -166,7 +166,7 @@ Handle(HYDROData_Region) HYDROData_CalculationCase::AddNewRegion( const Handle(H return aNewRegion; // Generate new name for new region - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( !aDocument.IsNull() ) { QString aNewRegionName = HYDROData_Tool::GenerateObjectName( aDocument, "Region" ); diff --git a/src/HYDROData/HYDROData_Channel.cxx b/src/HYDROData/HYDROData_Channel.cxx index 0a1d13bd..b365008a 100644 --- a/src/HYDROData/HYDROData_Channel.cxx +++ b/src/HYDROData/HYDROData_Channel.cxx @@ -26,7 +26,7 @@ QStringList HYDROData_Channel::DumpToPython( MapOfTreatedObjects& theTreatedObje { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; diff --git a/src/HYDROData/HYDROData_Confluence.cxx b/src/HYDROData/HYDROData_Confluence.cxx index 7d898574..64aeacf8 100644 --- a/src/HYDROData/HYDROData_Confluence.cxx +++ b/src/HYDROData/HYDROData_Confluence.cxx @@ -26,7 +26,7 @@ QStringList HYDROData_Confluence::DumpToPython( MapOfTreatedObjects& theTreatedO { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; diff --git a/src/HYDROData/HYDROData_Digue.cxx b/src/HYDROData/HYDROData_Digue.cxx index b89a3425..89c92a86 100644 --- a/src/HYDROData/HYDROData_Digue.cxx +++ b/src/HYDROData/HYDROData_Digue.cxx @@ -26,7 +26,7 @@ QStringList HYDROData_Digue::DumpToPython( MapOfTreatedObjects& theTreatedObject { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; diff --git a/src/HYDROData/HYDROData_Document.cxx b/src/HYDROData/HYDROData_Document.cxx index cc119abe..7d1a1255 100644 --- a/src/HYDROData/HYDROData_Document.cxx +++ b/src/HYDROData/HYDROData_Document.cxx @@ -38,16 +38,16 @@ Handle(HYDROData_Document) HYDROData_Document::Document(const int theStudyID) } Handle(HYDROData_Document) HYDROData_Document::Document( - const Handle(HYDROData_Entity)& theObject ) + const TDF_Label& theObjectLabel ) { Handle(HYDROData_Document) aResDoc; - if ( theObject.IsNull() ) + if ( theObjectLabel.IsNull() ) return aResDoc; Handle(TDocStd_Document) anObjDoc; try { - anObjDoc = TDocStd_Document::Get( theObject->Label() ); + anObjDoc = TDocStd_Document::Get( theObjectLabel ); } catch( ... ) { diff --git a/src/HYDROData/HYDROData_Document.h b/src/HYDROData/HYDROData_Document.h index a702b03c..13bdffb0 100644 --- a/src/HYDROData/HYDROData_Document.h +++ b/src/HYDROData/HYDROData_Document.h @@ -43,7 +43,7 @@ public: //! Returns the document by object HYDRODATA_EXPORT static Handle(HYDROData_Document) Document( - const Handle(HYDROData_Entity)& theObject ); + const TDF_Label& theObjectLabel ); //! Returns true if data model contains document for this study HYDRODATA_EXPORT static bool HasDocument(const int theStudyID); diff --git a/src/HYDROData/HYDROData_ImmersibleZone.cxx b/src/HYDROData/HYDROData_ImmersibleZone.cxx index a174aa92..b66b6460 100644 --- a/src/HYDROData/HYDROData_ImmersibleZone.cxx +++ b/src/HYDROData/HYDROData_ImmersibleZone.cxx @@ -33,7 +33,7 @@ QStringList HYDROData_ImmersibleZone::DumpToPython( MapOfTreatedObjects& theTrea { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; diff --git a/src/HYDROData/HYDROData_Obstacle.cxx b/src/HYDROData/HYDROData_Obstacle.cxx index 957bb7c0..80552d91 100644 --- a/src/HYDROData/HYDROData_Obstacle.cxx +++ b/src/HYDROData/HYDROData_Obstacle.cxx @@ -26,7 +26,7 @@ QStringList HYDROData_Obstacle::DumpToPython( MapOfTreatedObjects& theTreatedObj { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; diff --git a/src/HYDROData/HYDROData_Polyline.cxx b/src/HYDROData/HYDROData_Polyline.cxx index fc6d72ce..8770a561 100755 --- a/src/HYDROData/HYDROData_Polyline.cxx +++ b/src/HYDROData/HYDROData_Polyline.cxx @@ -62,7 +62,7 @@ QStringList HYDROData_Polyline::DumpToPython( MapOfTreatedObjects& theTreatedObj { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; diff --git a/src/HYDROData/HYDROData_Region.cxx b/src/HYDROData/HYDROData_Region.cxx index 45f96d92..6e0a0f1d 100644 --- a/src/HYDROData/HYDROData_Region.cxx +++ b/src/HYDROData/HYDROData_Region.cxx @@ -26,7 +26,7 @@ QStringList HYDROData_Region::DumpToPython( MapOfTreatedObjects& theTreatedObjec { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; diff --git a/src/HYDROData/HYDROData_River.cxx b/src/HYDROData/HYDROData_River.cxx index ca45d158..7193b0e4 100644 --- a/src/HYDROData/HYDROData_River.cxx +++ b/src/HYDROData/HYDROData_River.cxx @@ -26,7 +26,7 @@ QStringList HYDROData_River::DumpToPython( MapOfTreatedObjects& theTreatedObject { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; diff --git a/src/HYDROData/HYDROData_Stream.cxx b/src/HYDROData/HYDROData_Stream.cxx index 985f6271..111eb9b0 100644 --- a/src/HYDROData/HYDROData_Stream.cxx +++ b/src/HYDROData/HYDROData_Stream.cxx @@ -26,7 +26,7 @@ QStringList HYDROData_Stream::DumpToPython( MapOfTreatedObjects& theTreatedObjec { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; diff --git a/src/HYDROData/HYDROData_Zone.cxx b/src/HYDROData/HYDROData_Zone.cxx index 5d6b4b65..fdbf91b0 100644 --- a/src/HYDROData/HYDROData_Zone.cxx +++ b/src/HYDROData/HYDROData_Zone.cxx @@ -34,7 +34,7 @@ QStringList HYDROData_Zone::DumpToPython( MapOfTreatedObjects& theTreatedObjects { QStringList aResList; - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); if ( aDocument.IsNull() ) return aResList; diff --git a/src/HYDROGUI/HYDROGUI_Shape.cxx b/src/HYDROGUI/HYDROGUI_Shape.cxx index 4eaecc51..1ac88c74 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.cxx +++ b/src/HYDROGUI/HYDROGUI_Shape.cxx @@ -106,7 +106,7 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer ) // Try to retrieve information from object if ( !myObject.IsNull() ) { - Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myObject ); + Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myObject->Label() ); if ( myObject->IsKind( STANDARD_TYPE(HYDROData_ImmersibleZone) ) ) {