]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Merge remote-tracking branch 'origin/master' into BR_LAND_COVER_MAP
authorasl <asl@opencascade.com>
Thu, 15 Oct 2015 13:43:57 +0000 (16:43 +0300)
committerasl <asl@opencascade.com>
Thu, 15 Oct 2015 13:43:57 +0000 (16:43 +0300)
Conflicts:
src/HYDROData/HYDROData_Entity.cxx
src/HYDROData/HYDROData_Object.cxx
src/HYDROData/HYDROData_StricklerTable.cxx
src/HYDROData/HYDROData_Tool.h

42 files changed:
src/HYDROData/HYDROData_ArtificialObject.cxx
src/HYDROData/HYDROData_ArtificialObject.h
src/HYDROData/HYDROData_Bathymetry.cxx
src/HYDROData/HYDROData_CalculationCase.cxx
src/HYDROData/HYDROData_Channel.cxx
src/HYDROData/HYDROData_Confluence.cxx
src/HYDROData/HYDROData_DummyObject3D.cxx
src/HYDROData/HYDROData_Entity.cxx
src/HYDROData/HYDROData_Entity.h
src/HYDROData/HYDROData_IAltitudeObject.cxx
src/HYDROData/HYDROData_IPolyline.cxx
src/HYDROData/HYDROData_Image.cxx
src/HYDROData/HYDROData_ImmersibleZone.cxx
src/HYDROData/HYDROData_LandCover.cxx
src/HYDROData/HYDROData_NaturalObject.cxx
src/HYDROData/HYDROData_NaturalObject.h
src/HYDROData/HYDROData_Object.cxx
src/HYDROData/HYDROData_Object.h
src/HYDROData/HYDROData_Obstacle.cxx
src/HYDROData/HYDROData_Polyline3D.cxx
src/HYDROData/HYDROData_PolylineXY.cxx
src/HYDROData/HYDROData_Profile.cxx
src/HYDROData/HYDROData_Region.cxx
src/HYDROData/HYDROData_River.cxx
src/HYDROData/HYDROData_ShapesGroup.cxx
src/HYDROData/HYDROData_Stream.cxx
src/HYDROData/HYDROData_StricklerTable.cxx
src/HYDROData/HYDROData_Tool.cxx
src/HYDROData/HYDROData_Tool.h
src/HYDROData/HYDROData_VisualState.cxx
src/HYDROData/HYDROData_Zone.cxx
src/HYDROGUI/HYDROGUI_CalculationOp.cxx
src/HYDROGUI/HYDROGUI_ChannelOp.cxx
src/HYDROGUI/HYDROGUI_DataObject.cxx
src/HYDROGUI/HYDROGUI_LandCoverOp.cxx
src/HYDROGUI/HYDROGUI_Module.cxx
src/HYDROGUI/HYDROGUI_Polyline.cxx
src/HYDROGUI/HYDROGUI_ProfileOp.cxx
src/HYDROGUI/HYDROGUI_StreamOp.cxx
src/HYDROGUI/HYDROGUI_UpdateObjectOp.cxx
src/HYDROGUI/HYDROGUI_ViewerDlg.cxx
src/HYDROPy/HYDROData_Entity.sip

index 170477a8d6590c9416971383ea1da767dd773380..80a476546c2b87cd88cf9b087c1aff58a3012d64 100644 (file)
@@ -21,8 +21,8 @@
 IMPLEMENT_STANDARD_HANDLE(HYDROData_ArtificialObject,HYDROData_Object)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ArtificialObject,HYDROData_Object)
 
-HYDROData_ArtificialObject::HYDROData_ArtificialObject()
-: HYDROData_Object()
+HYDROData_ArtificialObject::HYDROData_ArtificialObject( Geometry theGeometry )
+: HYDROData_Object( theGeometry )
 {
 }
 
index e12d6a3fb6a3c21768b63de98ab7542060489c01..dc91253b3a924093632b0bb1d8777c0dc24858f3 100644 (file)
@@ -48,7 +48,7 @@ protected:
    * Creates new object in the internal data structure. Use higher level objects 
    * to create objects with real content.
    */
-  HYDRODATA_EXPORT HYDROData_ArtificialObject();
+  HYDRODATA_EXPORT HYDROData_ArtificialObject( Geometry );
 
   /**
    * Destructs properties of the object and object itself, removes it from the document.
index e48d04ffd93f6e3eae9ced1edeb14187b0a66f12..73e763ef27ac061a40fb2c287de62773f01df5ba 100644 (file)
@@ -96,7 +96,7 @@ void HYDROData_Bathymetry::SetAltitudePoints( const AltitudePoints& thePoints )
     aCoordsArray->SetValue( i * 3 + 2, aPoint.Z() );
   }
 
-  SetToUpdate( true );
+  Changed( Geom_Z );
 }
 
 HYDROData_Bathymetry::AltitudePoints HYDROData_Bathymetry::GetAltitudePoints(bool IsConvertToGlobal) const
@@ -136,7 +136,7 @@ void HYDROData_Bathymetry::RemoveAltitudePoints()
   if ( !aLabel.IsNull() )
   {
     aLabel.ForgetAllAttributes();
-    SetToUpdate( true );
+    Changed( Geom_Z );
   }
 }
 
@@ -358,7 +358,7 @@ void HYDROData_Bathymetry::SetAltitudesInverted( const bool theIsInverted,
 
   TDataStd_Integer::Set( myLab.FindChild( DataTag_AltitudesInverted ), (Standard_Integer)theIsInverted );
 
-  SetToUpdate( true );
+  Changed( Geom_Z );
 
   if ( !theIsUpdate )
     return;
index 8d2363c7a2ecf8d50f3296f678b0497198bd6948..89adcee4354315a6732900602a0d09cfc77898d6 100644 (file)
@@ -82,7 +82,7 @@ IMPLEMENT_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_CalculationCase, HYDROData_Entity)
 
 HYDROData_CalculationCase::HYDROData_CalculationCase()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_2d_and_groups )
 {
 }
 
@@ -502,7 +502,7 @@ bool HYDROData_CalculationCase::AddGeometryObject( const Handle(HYDROData_Object
   AddReferenceObject( theObject, DataTag_GeometryObject );
   
   // Indicate model of the need to update splitting
-  SetToUpdate( true );
+  Changed( Geom_2d );
 
   return true;
 }
@@ -520,7 +520,7 @@ void HYDROData_CalculationCase::RemoveGeometryObject( const Handle(HYDROData_Obj
   RemoveReferenceObject( theObject->Label(), DataTag_GeometryObject );
 
   // Indicate model of the need to update splitting
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 void HYDROData_CalculationCase::RemoveGeometryObjects()
@@ -528,7 +528,7 @@ void HYDROData_CalculationCase::RemoveGeometryObjects()
   ClearReferenceObjects( DataTag_GeometryObject );
 
   // Indicate model of the need to update splitting
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 bool HYDROData_CalculationCase::AddGeometryGroup( const Handle(HYDROData_ShapesGroup)& theGroup )
@@ -542,7 +542,7 @@ bool HYDROData_CalculationCase::AddGeometryGroup( const Handle(HYDROData_ShapesG
   AddReferenceObject( theGroup, DataTag_GeometryGroup );
   
   // Indicate model of the need to update splitting
-  SetToUpdate( true );
+  Changed( Geom_Groups );
 
   return true;
 }
@@ -560,7 +560,7 @@ void HYDROData_CalculationCase::RemoveGeometryGroup( const Handle(HYDROData_Shap
   RemoveReferenceObject( theGroup->Label(), DataTag_GeometryGroup );
 
   // Indicate model of the need to update splitting
-  SetToUpdate( true );
+  Changed( Geom_Groups );
 }
 
 void HYDROData_CalculationCase::RemoveGeometryGroups()
@@ -568,7 +568,7 @@ void HYDROData_CalculationCase::RemoveGeometryGroups()
   ClearReferenceObjects( DataTag_GeometryGroup );
 
   // Indicate model of the need to update splitting
-  SetToUpdate( true );
+  Changed( Geom_Groups );
 }
 
 void HYDROData_CalculationCase::SetBoundaryPolyline( const Handle(HYDROData_PolylineXY)& thePolyline )
@@ -578,7 +578,8 @@ void HYDROData_CalculationCase::SetBoundaryPolyline( const Handle(HYDROData_Poly
   SetReferenceObject( thePolyline, DataTag_Polyline );
 
   // Indicate model of the need to update zones splitting
-  SetToUpdate( !IsEqual( aPrevPolyline, thePolyline ) || IsMustBeUpdated() );
+  if( !IsEqual( aPrevPolyline, thePolyline ) )
+    Changed( Geom_2d );
 }
 
 Handle(HYDROData_PolylineXY) HYDROData_CalculationCase::GetBoundaryPolyline() const
@@ -594,7 +595,7 @@ void HYDROData_CalculationCase::RemoveBoundaryPolyline()
   ClearReferenceObjects( DataTag_Polyline );
 
   // Indicate model of the need to update zones splitting
-  SetToUpdate( !aPrevPolyline.IsNull() || IsMustBeUpdated() );
+  Changed( Geom_2d );
 }
 
 void HYDROData_CalculationCase::SetStricklerTable( const Handle(HYDROData_StricklerTable)& theStricklerTable )
@@ -604,7 +605,8 @@ void HYDROData_CalculationCase::SetStricklerTable( const Handle(HYDROData_Strick
   SetReferenceObject( theStricklerTable, DataTag_StricklerTable );
 
   // Indicate model of the need to update land covers partition
-  SetToUpdate( !IsEqual( aPrevStricklerTable, theStricklerTable ) || IsMustBeUpdated() );
+  if( !IsEqual( aPrevStricklerTable, theStricklerTable ) )
+    Changed( Geom_No );
 }
 
 Handle(HYDROData_StricklerTable) HYDROData_CalculationCase::GetStricklerTable() const
@@ -620,7 +622,7 @@ void HYDROData_CalculationCase::RemoveStricklerTable()
   ClearReferenceObjects( DataTag_StricklerTable );
 
   // Indicate model of the need to update land covers partition
-  SetToUpdate( !aPrevStricklerTable.IsNull() || IsMustBeUpdated() );
+  Changed( Geom_No );
 }
 
 bool HYDROData_CalculationCase::AddLandCover( const Handle(HYDROData_LandCover)& theLandCover )
@@ -631,7 +633,7 @@ bool HYDROData_CalculationCase::AddLandCover( const Handle(HYDROData_LandCover)&
   AddReferenceObject( theLandCover, DataTag_LandCover );
   
   // Indicate model of the need to update land covers partition
-  SetToUpdate( true );
+  Changed( Geom_No );
 
   return true;
 }
@@ -649,7 +651,7 @@ void HYDROData_CalculationCase::RemoveLandCover( const Handle(HYDROData_LandCove
   RemoveReferenceObject( theLandCover->Label(), DataTag_LandCover );
 
   // Indicate model of the need to update land cover partition
-  SetToUpdate( true );
+  Changed( Geom_No );
 }
 
 void HYDROData_CalculationCase::RemoveLandCovers()
@@ -657,7 +659,7 @@ void HYDROData_CalculationCase::RemoveLandCovers()
   ClearReferenceObjects( DataTag_LandCover );
 
   // Indicate model of the need to update land cover partition
-  SetToUpdate( true );
+  Changed( Geom_No );
 }
 
 Handle(HYDROData_Region) HYDROData_CalculationCase::AddNewRegion( const Handle(HYDROData_Zone)& theZone,
@@ -1301,7 +1303,7 @@ void HYDROData_CalculationCase::ClearRules( HYDROData_CalculationCase::DataTag t
 
   // Indicate model of the need to update splitting
   if ( theIsSetToUpdate ) {
-    SetToUpdate( true );
+    Changed( Geom_2d );
   }
 }
 
@@ -1315,7 +1317,7 @@ void HYDROData_CalculationCase::AddRule( const Handle(HYDROData_Entity)&    theO
   HYDROData_PriorityQueue::AddRule( aRulesLab, theObject1, thePriority, theObject2, theMergeType );
 
   // Indicate model of the need to update splitting
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 QString HYDROData_CalculationCase::DumpRules() const
@@ -1336,7 +1338,7 @@ void HYDROData_CalculationCase::SetAssignmentMode( AssignmentMode theMode )
   TDataStd_Integer::Set( aModeLab, ( int ) theMode );
 
   // Indicate model of the need to update splitting
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 HYDROData_CalculationCase::AssignmentMode HYDROData_CalculationCase::GetAssignmentMode() const
@@ -1439,7 +1441,7 @@ void HYDROData_CalculationCase::SetAssignmentLandCoverMode( AssignmentMode theMo
   TDataStd_Integer::Set( aModeLab, ( int ) theMode );
 
   // Indicate model of the need to update land covers partition
-  SetToUpdate( true );
+  Changed( Geom_No );
 }
 
 HYDROData_CalculationCase::AssignmentMode HYDROData_CalculationCase::GetAssignmentLandCoverMode() const
index 13ba16f7581e87e26633ffcedd7949fd68013c09..9a8fae8657a8a4250d6aa3263216fb65d23de6a4 100644 (file)
@@ -72,7 +72,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Channel,HYDROData_ArtificialObject)
 
 
 HYDROData_Channel::HYDROData_Channel()
-: HYDROData_ArtificialObject()
+: HYDROData_ArtificialObject( Geom_3d )
 {
 }
 
@@ -372,7 +372,7 @@ bool HYDROData_Channel::SetGuideLine( const Handle(HYDROData_Polyline3D)& theGui
   SetReferenceObject( theGuideLine, DataTag_GuideLine );
 
   // Indicate model of the need to update the chanel presentation
-  SetToUpdate( true );
+  Changed( Geom_3d );
 
   return true;
 }
@@ -392,7 +392,7 @@ void HYDROData_Channel::RemoveGuideLine()
   ClearReferenceObjects( DataTag_GuideLine );
 
   // Indicate model of the need to update the chanel presentation
-  SetToUpdate( true );
+  Changed( Geom_3d );
 }
 
 bool HYDROData_Channel::SetProfile( const Handle(HYDROData_Profile)& theProfile )
@@ -411,7 +411,7 @@ bool HYDROData_Channel::SetProfile( const Handle(HYDROData_Profile)& theProfile
   SetReferenceObject( theProfile, DataTag_Profile );
 
   // Indicate model of the need to update the chanel presentation
-  SetToUpdate( true );
+  Changed( Geom_3d );
 
   return true;
 }
@@ -431,7 +431,7 @@ void HYDROData_Channel::RemoveProfile()
   ClearReferenceObjects( DataTag_Profile );
 
   // Indicate model of the need to update the chanel presentation
-  SetToUpdate( true );
+  Changed( Geom_3d );
 }
 
 ObjectKind HYDROData_Channel::getAltitudeObjectType() const
index 7f617c404c64064d19cb71788b376552d8e3b876..e3995a6964d2bfbd22d6032fd2722ef99b9b85bf 100644 (file)
@@ -29,7 +29,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Confluence,HYDROData_NaturalObject)
 
 
 HYDROData_Confluence::HYDROData_Confluence()
-: HYDROData_NaturalObject()
+: HYDROData_NaturalObject( Geom_3d )
 {
 }
 
index f4f665b67dcbdf3c250b0a62f315fb42416b9ba8..fbc4851d3b7546b52f77c5afc64b0571934019a8 100644 (file)
@@ -29,7 +29,7 @@ IMPLEMENT_STANDARD_HANDLE(HYDROData_DummyObject3D,HYDROData_Entity)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_DummyObject3D,HYDROData_Entity)
 
 HYDROData_DummyObject3D::HYDROData_DummyObject3D()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_3d )
 {
 }
 
index 1ff7379a109902a3e447754d168767cdd58d4d15..ceea46b60ff4305b7d9f45f61f3c90c129411b89 100644 (file)
@@ -53,8 +53,6 @@ HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects( const NCollection_Sequ
 }
 
 
-static const Standard_GUID GUID_MUST_BE_UPDATED("80f2bb81-3873-4631-8ddd-940d2119f000");
-
 IMPLEMENT_STANDARD_HANDLE(HYDROData_Entity,MMgt_TShared)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Entity,MMgt_TShared)
 
@@ -97,7 +95,7 @@ QStringList HYDROData_Entity::DumpToPython( MapOfTreatedObjects& theTreatedObjec
 
 void HYDROData_Entity::Update()
 {
-  SetToUpdate( false );
+  ClearChanged();
 }
 
 void HYDROData_Entity::UpdateLocalCS( double theDx, double theDy )
@@ -127,31 +125,59 @@ QVariant HYDROData_Entity::GetDataVariant()
   return QVariant();
 }
 
-void HYDROData_Entity::SetToUpdate( bool theFlag )
+void HYDROData_Entity::ClearChanged()
 {
-  if ( IsMustBeUpdated() == theFlag )
+  TDataStd_Integer::Set( myLab.FindChild( DataTag_GeomChange ), 0 );
+}
+
+int HYDROData_Entity::GetGeomChangeFlag() const
+{
+  int aGeomChangeFlag = 0;
+  Handle(TDataStd_Integer) aGeomChangeAttr;
+  TDF_Label aGeomChangeLab = myLab.FindChild( DataTag_GeomChange );
+  aGeomChangeLab.FindAttribute( TDataStd_Integer::GetID(), aGeomChangeAttr );
+  if ( !aGeomChangeAttr.IsNull() )
+    aGeomChangeFlag = aGeomChangeAttr->Get();
+  return aGeomChangeFlag;
+}
+
+void HYDROData_Entity::Changed( Geometry theChangedGeometry )
+{
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+  if( aDocument.IsNull() )
     return;
 
-  if ( theFlag )
-  {
-    TDataStd_UAttribute::Set( myLab, GUID_MUST_BE_UPDATED );
+  int aGeomChangeFlag = 0;
+  Handle(TDataStd_Integer) aGeomChangeAttr;
+  TDF_Label aGeomChangeLab = myLab.FindChild( DataTag_GeomChange );
+  aGeomChangeLab.FindAttribute( TDataStd_Integer::GetID(), aGeomChangeAttr );
+  if ( !aGeomChangeAttr.IsNull() )
+    aGeomChangeFlag = aGeomChangeAttr->Get();
 
-    Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
-    if ( !aDocument.IsNull() )
+  int aBitsToChange = ( myGeom & theChangedGeometry );
+  if( aBitsToChange == 0 )
+    return;
+
+  aGeomChangeFlag = ( aGeomChangeFlag | aBitsToChange );
+  TDataStd_Integer::Set( aGeomChangeLab, aGeomChangeFlag );
+
+  HYDROData_Iterator anIter( aDocument );
+  for ( ; anIter.More(); anIter.Next() )
+  {
+    Handle(HYDROData_Entity) anObject = anIter.Current();
+    HYDROData_SequenceOfObjects aRefSeq = anObject->GetAllReferenceObjects();
+    for ( int i = 1, n = aRefSeq.Length(); i <= n; ++i )
     {
-      // Change the states of this and all depended objects
-      HYDROData_Tool::SetMustBeUpdatedObjects( aDocument );
+      Handle(HYDROData_Entity) aRefObject = aRefSeq.Value( i );
+      if( aRefObject->Label()==myLab )
+        anObject->Changed( theChangedGeometry );
     }
   }
-  else
-  {
-    myLab.ForgetAttribute( GUID_MUST_BE_UPDATED );
-  }
 }
 
-bool HYDROData_Entity::IsMustBeUpdated() const
+bool HYDROData_Entity::IsMustBeUpdated( Geometry theGeom ) const
 {
-  return myLab.IsAttribute( GUID_MUST_BE_UPDATED );
+  return ( ( GetGeomChangeFlag() & theGeom ) != 0 );
 }
 
 bool HYDROData_Entity::CanBeUpdated() const
@@ -174,7 +200,8 @@ bool HYDROData_Entity::CanRemove()
   return true;
 }
 
-HYDROData_Entity::HYDROData_Entity()
+HYDROData_Entity::HYDROData_Entity( Geometry theGeom )
+  : myGeom( theGeom )
 {
 }
 
index d7ad12cb87b89ff03442f9c73996c515efb2ddfb..21f14e4ac9daafe9f29832d610c704a6d78d79c7 100644 (file)
@@ -92,9 +92,7 @@ HYDRODATA_EXPORT bool IsEqual(const Handle_HYDROData_Entity& theObj1, const Hand
  */
 class HYDROData_Entity : public MMgt_TShared
 {
-
 protected:
-
   /**
    * Enumeration of tags corresponding to the persistent object parameters.
    */
@@ -102,6 +100,20 @@ protected:
   {
     DataTag_First  = 0,     ///< first tag, to reserve
     DataTag_ZLevel,         ///< z-level of object presentation
+    DataTag_GeomChange,
+  };
+
+public:
+  enum Geometry
+  {
+    Geom_No = 1,
+    Geom_2d = 2,
+    Geom_Z  = 4,
+    Geom_Groups = 8,
+
+    Geom_3d = Geom_2d | Geom_Z,
+    Geom_2d_and_groups = Geom_2d | Geom_Groups,
+    Geom_All = Geom_3d | Geom_Groups | Geom_No,
   };
 
 public:
@@ -120,7 +132,7 @@ public:
   /**
    * Updates the name of this object.
    */
-  HYDRODATA_EXPORT virtual void SetName( const QString& theName );
+  HYDRODATA_EXPORT void SetName( const QString& theName );
 
   /**
    * Returns the name of this object valid for Python script.
@@ -160,17 +172,11 @@ public:
   HYDRODATA_EXPORT virtual QVariant GetDataVariant();
 
 
-  /**
-   * Sets the "MustBeUpdated" flag: if object is depended on updated features.
-   * \param theFlag is true for objects that must be updated, false for up-to-date
-   */
-  HYDRODATA_EXPORT virtual void SetToUpdate( bool theFlag );
 
-  /**
-   * Returns the "MustBeUpdated" flag: is object data must be updated or not
-   * \returns false if object is up to date
-   */
-  HYDRODATA_EXPORT virtual bool IsMustBeUpdated() const;
+  HYDRODATA_EXPORT virtual void ClearChanged();
+  HYDRODATA_EXPORT virtual void Changed( Geometry );
+
+  HYDRODATA_EXPORT bool IsMustBeUpdated( Geometry ) const;
 
   /**
    * Returns flag indicating that object is updateble or not.
@@ -270,7 +276,7 @@ protected:
    * Creates new object in the internal data structure. Use higher level objects 
    * to create objects with real content.
    */
-  HYDRODATA_EXPORT HYDROData_Entity();
+  HYDRODATA_EXPORT HYDROData_Entity( Geometry );
 
   /**
    * Destructs properties of the object and object itself, removes it from the document.
@@ -417,7 +423,6 @@ protected:
                              const QColor&        theColor,
                              const QColor&        theDefaultColor,
                              const QString&       theMethod ) const;
-
 protected:
 
   Handle(TDataStd_ReferenceList) getReferenceList( const int  theTag,
@@ -426,9 +431,12 @@ protected:
   void SetShape( int theTag, const TopoDS_Shape& theShape );
   TopoDS_Shape GetShape( int theTag ) const;
 
+  int GetGeomChangeFlag() const;
+
 protected:
   /// Array of pointers to the properties of this object; index in this array is returned by \a AddProperty.
   TDF_Label myLab; ///< label of this object
+  Geometry  myGeom;
 };
 
 #endif
index 5a307eadc8d0f9b573b2652d340a1e282d82741a..86ecdf4fc08c1cadcec38cbb029e07ac89c7cc54 100644 (file)
@@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_HANDLE(HYDROData_IAltitudeObject, HYDROData_Entity)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_IAltitudeObject, HYDROData_Entity)
 
 HYDROData_IAltitudeObject::HYDROData_IAltitudeObject()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_Z )
 {
 }
 
index 62b1e3d32071d94db05faec3f26d9b027189c8e9..adc76d3b87fe47b3b677c041adabcca52240be77 100755 (executable)
@@ -31,7 +31,7 @@ IMPLEMENT_STANDARD_HANDLE(HYDROData_IPolyline, HYDROData_Entity)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_IPolyline, HYDROData_Entity)
 
 HYDROData_IPolyline::HYDROData_IPolyline()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_2d )
 {
 }
 
index 64af6de3cf9103010b3830263de53821707b8775..4e91edafb18e9e543e5069a31cb8f3f5ca54827b 100644 (file)
@@ -54,7 +54,7 @@ IMPLEMENT_STANDARD_HANDLE(HYDROData_Image, HYDROData_Entity)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Image, HYDROData_Entity)
 
 HYDROData_Image::HYDROData_Image()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_2d )
 {
 }
 
@@ -183,7 +183,7 @@ QStringList HYDROData_Image::DumpToPython( MapOfTreatedObjects& theTreatedObject
 
 void HYDROData_Image::Update()
 {
-  bool anIsToUpdate = IsMustBeUpdated();
+  bool anIsToUpdate = IsMustBeUpdated( Geom_2d );
 
   HYDROData_Entity::Update();
 
@@ -234,7 +234,7 @@ void HYDROData_Image::Update()
     UpdateTrsf();
   }
 
-  SetToUpdate( false );
+  ClearChanged();
 }
 
 bool HYDROData_Image::IsHas2dPrs() const
@@ -302,7 +302,7 @@ void HYDROData_Image::SetImage(const QImage& theImage)
     SaveByteArray(0, aData, anImage.byteCount());
   }
 
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 bool HYDROData_Image::LoadImage( const QString& theFilePath )
@@ -334,7 +334,7 @@ void HYDROData_Image::SetFilePath( const QString& theFilePath )
   TCollection_AsciiString anAsciiStr( theFilePath.toStdString().c_str() );
   TDataStd_AsciiString::Set( myLab.FindChild( DataTag_FilePath ), anAsciiStr );
 
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 QString HYDROData_Image::GetFilePath() const
@@ -370,7 +370,7 @@ void HYDROData_Image::SetTrsf(const QTransform& theTrsf)
   anArray->SetValue(8, theTrsf.m32());
   anArray->SetValue(9, theTrsf.m33());
 
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 QTransform HYDROData_Image::Trsf() const
@@ -515,7 +515,7 @@ void HYDROData_Image::RemoveAllReferences()
   QImage anImage = Image();
   if ( anImage.isNull() )
   {
-    SetToUpdate( false );
+    ClearChanged();
     return;
   }
 
@@ -536,7 +536,7 @@ void HYDROData_Image::RemoveAllReferences()
 
   SetGlobalPoints( ManualCartesian, aTrsfPointA, aTrsfPointB, aTrsfPointC );
 
-  SetToUpdate( false );
+  ClearChanged();
 }
 
 void HYDROData_Image::SetLocalPoints( const QPoint& thePointA,
@@ -560,7 +560,7 @@ void HYDROData_Image::SetLocalPoints( const QPoint& thePointA,
   if ( theIsUpdate )
     UpdateTrsf();
 
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 bool HYDROData_Image::GetLocalPoints( QPoint& thePointA,
@@ -615,7 +615,7 @@ void HYDROData_Image::SetGlobalPoints( const TransformationMode& theMode,
   if ( theIsUpdate )
     UpdateTrsf();
 
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 bool HYDROData_Image::GetGlobalPoints( TransformationMode& theMode,
@@ -767,7 +767,7 @@ bool HYDROData_Image::HasReferencePoints() const
 void HYDROData_Image::SetTrsfMode( const TransformationMode& theMode )
 {
   TDataStd_Integer::Set( myLab.FindChild( DataTag_TrsfMode ), (int)theMode );
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 HYDROData_Image::TransformationMode HYDROData_Image::GetTrsfMode() const
@@ -788,7 +788,7 @@ HYDROData_Image::TransformationMode HYDROData_Image::GetTrsfMode() const
 void HYDROData_Image::SetTrsfReferenceImage( const Handle(HYDROData_Image)& theRefImage )
 {
   SetReferenceObject( theRefImage, DataTag_TrsfImage );
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 Handle(HYDROData_Image) HYDROData_Image::GetTrsfReferenceImage() const
@@ -799,13 +799,13 @@ Handle(HYDROData_Image) HYDROData_Image::GetTrsfReferenceImage() const
 void HYDROData_Image::RemoveTrsfReferenceImage()
 {
   RemoveReferenceObject( DataTag_TrsfImage );
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 void HYDROData_Image::AppendReference( const Handle(HYDROData_Entity)& theReferenced )
 {
   AddReferenceObject( theReferenced, 0 );
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 int HYDROData_Image::NbReferences() const
@@ -822,26 +822,26 @@ void HYDROData_Image::ChangeReference(
     const int theIndex, Handle(HYDROData_Entity) theReferenced)
 {
   SetReferenceObject( theReferenced, 0, theIndex );
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 void HYDROData_Image::RemoveReference(const int theIndex)
 {
   RemoveReferenceObject( 0, theIndex );
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 void HYDROData_Image::ClearReferences()
 {
   ClearReferenceObjects( 0 );
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 void HYDROData_Image::SetOperatorName( const QString theOpName )
 {
   TCollection_AsciiString anAsciiStr( theOpName.toStdString().c_str() );
   TDataStd_AsciiString::Set( myLab.FindChild( DataTag_Operator ), anAsciiStr );
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 QString HYDROData_Image::OperatorName() const
@@ -862,7 +862,7 @@ QString HYDROData_Image::OperatorName() const
 void HYDROData_Image::SetArgs(const QByteArray& theArgs)
 {
   SaveByteArray(DataTag_Operator, theArgs.constData(), theArgs.length());
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 QByteArray HYDROData_Image::Args() const
@@ -881,7 +881,7 @@ void HYDROData_Image::SetIsSelfSplitted(bool theFlag)
   } else {
     myLab.ForgetAttribute(GUID_SELF_SPLITTED);
   }
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 bool HYDROData_Image::IsSelfSplitted() const
index 3e54c04522af296092e76e4a16e5da8f1cd54b70..f3c5467998e8856aab51eec0e77e7d4231fda73e 100644 (file)
@@ -49,7 +49,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ImmersibleZone,HYDROData_NaturalObject)
 
 
 HYDROData_ImmersibleZone::HYDROData_ImmersibleZone()
-: HYDROData_NaturalObject()
+: HYDROData_NaturalObject( Geom_2d )
 {
 }
 
@@ -250,7 +250,7 @@ void HYDROData_ImmersibleZone::SetPolyline( const Handle(HYDROData_PolylineXY)&
     return;
 
   SetReferenceObject( thePolyline, DataTag_Polyline );
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 Handle(HYDROData_PolylineXY) HYDROData_ImmersibleZone::GetPolyline() const
@@ -262,5 +262,5 @@ Handle(HYDROData_PolylineXY) HYDROData_ImmersibleZone::GetPolyline() const
 void HYDROData_ImmersibleZone::RemovePolyline()
 {
   ClearReferenceObjects( DataTag_Polyline );
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
index 410f93e4a26ba52fa5a24ce0c95b1b5f278b6b28..98fadcf4755e40cf719e468bf2fccc7eaf89c0c4 100644 (file)
@@ -44,6 +44,7 @@ IMPLEMENT_STANDARD_HANDLE( HYDROData_LandCover, HYDROData_Entity )
 IMPLEMENT_STANDARD_RTTIEXT( HYDROData_LandCover, HYDROData_Entity )
 
 HYDROData_LandCover::HYDROData_LandCover()
+: HYDROData_Entity( Geom_2d )
 {
 }
 
@@ -131,7 +132,7 @@ void HYDROData_LandCover::Update()
 void HYDROData_LandCover::SetPolylines( const HYDROData_SequenceOfObjects& thePolylines )
 {
   SetReferenceObjects( thePolylines, DataTag_Polylines );
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 HYDROData_SequenceOfObjects HYDROData_LandCover::GetPolylines() const
index a9cac71de16e69a04d9790f8de12c7c9109bc9f6..001104383161c2d8a1ed8867425ac63637ce8b5c 100644 (file)
@@ -21,8 +21,8 @@
 IMPLEMENT_STANDARD_HANDLE(HYDROData_NaturalObject,HYDROData_Object)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_NaturalObject,HYDROData_Object)
 
-HYDROData_NaturalObject::HYDROData_NaturalObject()
-: HYDROData_Object()
+HYDROData_NaturalObject::HYDROData_NaturalObject( Geometry theGeometry )
+: HYDROData_Object( theGeometry )
 {
 }
 
index 4454437de7dcf8e8e3e7cc9380d8861ad322ce05..e002b9a7b2733aabfa486fe62297bec2d06c5134 100644 (file)
@@ -48,7 +48,7 @@ protected:
    * Creates new object in the internal data structure. Use higher level objects 
    * to create objects with real content.
    */
-  HYDRODATA_EXPORT HYDROData_NaturalObject();
+  HYDRODATA_EXPORT HYDROData_NaturalObject( Geometry );
 
   /**
    * Destructs properties of the object and object itself, removes it from the document.
index 4a094521720404b1eeac7ef0fc7a0920a941e0cb..927bd86524aee657da9c88063146792e5aa3da40 100644 (file)
@@ -31,8 +31,8 @@
 IMPLEMENT_STANDARD_HANDLE(HYDROData_Object,HYDROData_Entity)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Object,HYDROData_Entity)
 
-HYDROData_Object::HYDROData_Object()
-: HYDROData_Entity()
+HYDROData_Object::HYDROData_Object( Geometry theGeometry )
+  : HYDROData_Entity( theGeometry )
 {
 }
 
@@ -71,9 +71,14 @@ void HYDROData_Object::SetName( const QString& theName )
 
 void HYDROData_Object::Update()
 {
-  RemoveTopShape();
-  RemoveShape3D();
-  RemoveGroupObjects();
+  if( IsMustBeUpdated( Geom_2d ) )
+  {
+    removeTopShape();
+    removeGroupObjects();
+  }
+  if( IsMustBeUpdated( Geom_3d ) )
+    removeShape3D();
+
   checkAndSetAltitudeObject();
   HYDROData_Entity::Update();
 }
@@ -89,13 +94,13 @@ HYDROData_SequenceOfObjects HYDROData_Object::GetAllReferenceObjects() const
   return aResSeq;
 }
 
-void HYDROData_Object::SetToUpdate( bool theFlag )
+void HYDROData_Object::Changed( Geometry theChangedGeometry )
 {
-  HYDROData_Entity::SetToUpdate( theFlag );
+  HYDROData_Entity::Changed( theChangedGeometry );
 
   Handle(HYDROData_DummyObject3D) anObject3D = GetObject3D();
   if ( !anObject3D.IsNull() )
-    anObject3D->SetToUpdate( theFlag );
+    anObject3D->Changed( theChangedGeometry );
 }
 
 void HYDROData_Object::SetTopShape( const TopoDS_Shape& theShape )
index 3b653ce773979455844256d81b1983b459a8443c..aa85d5aca966356f30e06cc5243c9ea1ad7320f1 100644 (file)
@@ -76,7 +76,7 @@ public:
    * Sets the "MustBeUpdated" flag: if object is depended on updated features.
    * Reimplemented to update the state of child 3D object.
    */
-  HYDRODATA_EXPORT virtual void SetToUpdate( bool theFlag );
+  HYDRODATA_EXPORT virtual void Changed( Geometry );
 
 
   /**
@@ -166,7 +166,7 @@ protected:
    * Creates new object in the internal data structure. Use higher level objects 
    * to create objects with real content.
    */
-  HYDRODATA_EXPORT HYDROData_Object();
+  HYDRODATA_EXPORT HYDROData_Object( Geometry );
 
   /**
    * Destructs properties of the object and object itself, removes it from the document.
index 9c7f58b9a18b1322da083d44e067cb231c4209af..6af8456d008e19bf3a123b20383251cb705bc66e 100644 (file)
@@ -80,7 +80,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Obstacle,HYDROData_ArtificialObject)
 
 
 HYDROData_Obstacle::HYDROData_Obstacle()
-: HYDROData_ArtificialObject()
+: HYDROData_ArtificialObject( Geom_3d )
 {
 }
 
index 743e5f56f504cd24fa3f8ba4c7de5cc4afceb0fd..d11aaf9348ed2d334017edeec9783dea8c97f520 100644 (file)
@@ -55,7 +55,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Polyline3D,HYDROData_Object)
 
 
 HYDROData_Polyline3D::HYDROData_Polyline3D()
-: HYDROData_Object()
+: HYDROData_Object( Geom_3d )
 {
 }
 
@@ -226,7 +226,7 @@ bool HYDROData_Polyline3D::SetPolylineXY( const Handle(HYDROData_PolylineXY)& th
     updateChildProfilePoints();
 
   // Indicate model of the need to update the polyline presentation
-  SetToUpdate( true );
+  Changed( Geom_2d );
 
   return true;
 }
@@ -246,7 +246,7 @@ void HYDROData_Polyline3D::RemovePolylineXY()
   ClearReferenceObjects( DataTag_PolylineXY );
 
   // Indicate model of the need to update the polyline presentation
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 bool HYDROData_Polyline3D::SetProfileUZ( const Handle(HYDROData_ProfileUZ)& theProfile )
@@ -264,7 +264,7 @@ bool HYDROData_Polyline3D::SetProfileUZ( const Handle(HYDROData_ProfileUZ)& theP
   RemoveAltitudeObject();
 
   // Indicate model of the need to update the polyline presentation
-  SetToUpdate( true );
+  Changed( Geom_Z );
 
   return true;
 }
@@ -284,7 +284,7 @@ void HYDROData_Polyline3D::RemoveProfileUZ()
   ClearReferenceObjects( DataTag_ProfileUZ );
 
   // Indicate model of the need to update the polyline presentation
-  SetToUpdate( true );
+  Changed( Geom_Z );
 }
 
 bool HYDROData_Polyline3D::SetAltitudeObject( 
index 807c8c3fccedbf1dc0aac89b2eb91d21dde63d05..d47f2cb8c19a058ac0b1857bc47948507e4361a8 100755 (executable)
@@ -479,7 +479,7 @@ void HYDROData_PolylineXY::Update()
   if ( !IsEditable() )
   {
     // If polyline is not editable we no need to update it wire
-    SetToUpdate( false );
+    ClearChanged();
     return;
   }
 
@@ -705,7 +705,7 @@ void HYDROData_PolylineXY::AddSection( const TCollection_AsciiString& theSectNam
   aTypesList->Append( theSectionType );
   aClosuresList->Append( theIsClosed );
 
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 TCollection_AsciiString HYDROData_PolylineXY::GetSectionName( const int theSectionIndex ) const
@@ -749,8 +749,6 @@ void HYDROData_PolylineXY::SetSectionName( const int                      theSec
   TDataStd_ListIteratorOfListOfExtendedString aNamesIter( anOldNamesList );
   for ( int i = 0; aNamesIter.More(); aNamesIter.Next(), ++i )
     aNamesList->Append( i == theSectionIndex ? aNewSectName : aNamesIter.Value() );
-
-  SetToUpdate( true );
 }
 
 HYDROData_PolylineXY::SectionType HYDROData_PolylineXY::GetSectionType( const int theSectionIndex ) const
@@ -788,7 +786,7 @@ void HYDROData_PolylineXY::SetSectionType( const int         theSectionIndex,
   for ( int i = 0; aTypesIter.More(); aTypesIter.Next(), ++i )
     aTypesList->Append( i == theSectionIndex ? theSectionType : aTypesIter.Value() );
 
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 bool HYDROData_PolylineXY::IsClosedSection( const int theSectionIndex ) const
@@ -826,7 +824,7 @@ void HYDROData_PolylineXY::SetSectionClosed( const int  theSectionIndex,
   for ( int i = 0; aClosuresIter.More(); aClosuresIter.Next(), ++i )
     aClosuresList->Append( i == theSectionIndex ? theIsClosed : (bool)aClosuresIter.Value() );
 
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 void HYDROData_PolylineXY::GetSections( NCollection_Sequence<TCollection_AsciiString>& theSectNames,
@@ -908,14 +906,14 @@ void HYDROData_PolylineXY::RemoveSection( const int theSectionIndex )
     removePointsLists( theSectionIndex );
   }
 
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 void HYDROData_PolylineXY::RemoveSections()
 {
   removeSectionsLists();
   removePointsLists();
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 void HYDROData_PolylineXY::AddPoint( const int    theSectionIndex,
@@ -961,7 +959,7 @@ void HYDROData_PolylineXY::AddPoint( const int    theSectionIndex,
     }
   }
 
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 void HYDROData_PolylineXY::SetPoint( const int    theSectionIndex,
@@ -1012,7 +1010,7 @@ void HYDROData_PolylineXY::SetPoint( const int    theSectionIndex,
     }
   }
 
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 void HYDROData_PolylineXY::SetPoints( const int         theSectionIndex,
@@ -1068,7 +1066,7 @@ void HYDROData_PolylineXY::RemovePoint( const int theSectionIndex,
     }
   }
 
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 HYDROData_PolylineXY::PointsList HYDROData_PolylineXY::GetPoints( const int theSectionIndex, bool IsConvertToGlobal ) const
@@ -1151,7 +1149,7 @@ void HYDROData_PolylineXY::UpdateLocalCS( double theDx, double theDy )
     }
     SetPoints( i, aPoints );
   }
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 void HYDROData_PolylineXY::Transform( const QTransform& theTrsf )
index f8dc8a3327ab9d175d309393e6191fd025e3f19c..217c49c9981db2e5471b2412470258b21bfb8ca8 100755 (executable)
@@ -56,7 +56,7 @@ IMPLEMENT_STANDARD_HANDLE(HYDROData_Profile, HYDROData_Object)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Profile, HYDROData_Object)
 
 HYDROData_Profile::HYDROData_Profile()
-: HYDROData_Object()
+: HYDROData_Object( Geom_3d )
 {
 }
 
@@ -229,7 +229,7 @@ void HYDROData_Profile::SetLeftPoint( const gp_XY& theGPoint, bool IsConvertFrom
   anArray->SetValue( 0, aLPoint.X() );
   anArray->SetValue( 1, aLPoint.Y() );
 
-  SetToUpdate( true );
+  Changed( Geom_3d );
 }
 
 bool HYDROData_Profile::GetLeftPoint( gp_XY& thePoint, bool IsConvertToGlobal,
@@ -281,7 +281,7 @@ void HYDROData_Profile::SetRightPoint( const gp_XY& theGPoint, bool IsConvertFro
   anArray->SetValue( 0, aLPoint.X() );
   anArray->SetValue( 1, aLPoint.Y() );
 
-  SetToUpdate( true );
+  Changed( Geom_3d );
 }
 
 bool HYDROData_Profile::GetRightPoint( gp_XY& thePoint, bool IsConvertToGlobal,
@@ -326,7 +326,7 @@ void HYDROData_Profile::Invalidate()
   if ( !aLastLabel.IsNull() )
     aLastLabel.ForgetAllAttributes();
 
-  SetToUpdate( true );
+  Changed( Geom_3d );
 }
 
 Handle(HYDROData_ProfileUZ) HYDROData_Profile::GetProfileUZ( const bool theIsCreate ) const
@@ -359,7 +359,7 @@ void HYDROData_Profile::RemovePoints()
   if ( !aProfileUZ.IsNull() )
   {
     aProfileUZ->RemoveSections();
-    SetToUpdate( true );
+    Changed( Geom_3d );
   }
 }
 
@@ -374,7 +374,7 @@ void HYDROData_Profile::SetParametricPoints( const HYDROData_ProfileUZ::PointsLi
     aProfileUZ->AddPoint( 0, aPoint );
   }
 
-  SetToUpdate( true );
+  Changed( Geom_3d );
 }
 
 HYDROData_ProfileUZ::PointsList HYDROData_Profile::GetParametricPoints() const
index c82d17e9d4ea42aa3e38597b1f5400a63bcbf669..582357e8dc2f33fce07215099e70dd3bfe9105ef 100644 (file)
@@ -52,7 +52,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Region, HYDROData_Entity)
 
 
 HYDROData_Region::HYDROData_Region()
- : HYDROData_Entity()
+ : HYDROData_Entity( Geom_2d )
 {
 }
 
index 085a9127c711e742715f97f9ab683d3955930779..406ca4b121ce9f9d92b9ecc037d7eb9ea45aa03b 100644 (file)
@@ -29,7 +29,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_River,HYDROData_NaturalObject)
 
 
 HYDROData_River::HYDROData_River()
-: HYDROData_NaturalObject()
+: HYDROData_NaturalObject( Geom_3d )
 {
 }
 
index f7f597a3c240ebd4733e7456373ad3a0f0bfaac5..6c0d5ae00a91fa2b54fd081020f6ebc63e767855 100644 (file)
@@ -133,7 +133,7 @@ void HYDROData_ShapesGroup::GroupDefinition::Dump( std::ostream&           theSt
 
 
 HYDROData_ShapesGroup::HYDROData_ShapesGroup()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_Groups )
 {
 }
 
index 9a6f335f8cf239276d7ed6c5ffef5bbe1c299445..c2def15f030fcaccf22861a997e6d5de74748f99 100644 (file)
@@ -95,7 +95,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Stream,HYDROData_NaturalObject)
 
 
 HYDROData_Stream::HYDROData_Stream()
-: HYDROData_NaturalObject()
+: HYDROData_NaturalObject( Geom_3d )
 {
 }
 
@@ -332,7 +332,7 @@ bool HYDROData_Stream::SetHydraulicAxis( const Handle(HYDROData_PolylineXY)& the
   updateProfilesOrder();
 
   // Indicate model of the need to update the stream presentation
-  SetToUpdate( true );
+  Changed( Geom_3d );
 
   return true;
 }
@@ -355,7 +355,7 @@ void HYDROData_Stream::RemoveHydraulicAxis()
   RemoveProfiles();
 
   // Indicate model of the need to update the stream presentation
-  SetToUpdate( true );
+  Changed( Geom_3d );
 }
 
 bool HYDROData_Stream::HasIntersection( const Handle(HYDROData_Profile)& theProfile,
@@ -489,7 +489,7 @@ bool HYDROData_Stream::AddProfile( const Handle(HYDROData_Profile)& theProfile )
   insertProfileInToOrder( theProfile, aProfileIndex );
   
   // Indicate model of the need to update the stream presentation
-  SetToUpdate( true );
+  Changed( Geom_3d );
 
   return true;
 }
@@ -534,7 +534,7 @@ bool HYDROData_Stream::SetProfiles( const HYDROData_SequenceOfObjects& theProfil
     SetReferenceObjects( theProfiles, DataTag_Profile );
 
     if ( anIsToUpdate )
-      SetToUpdate( true );
+      Changed( Geom_3d );
   }
 
   return true;
@@ -577,22 +577,20 @@ bool HYDROData_Stream::RemoveProfile( const Handle(HYDROData_Profile)& theProfil
   removeParameter( aProfileIndex );
 
   // Indicate model of the need to update the stream presentation
-  SetToUpdate( true );
+  Changed( Geom_3d );
 
   return true;
 }
 
 void HYDROData_Stream::RemoveProfiles()
 {
-  bool anIsToUpdate = IsMustBeUpdated() || NbReferenceObjects( DataTag_Profile ) > 0;
-
   ClearReferenceObjects( DataTag_Profile );
 
   // Remove the parameters array
   removeParametersArray();
 
   // Indicate model of the need to update the stream presentation
-  SetToUpdate( anIsToUpdate );
+  Changed( Geom_3d );
 }
 
 void HYDROData_Stream::insertProfileInToOrder( const Handle(HYDROData_Profile)& theProfile,
index 13a6e529a47284cc10aa7481f25da4e64aa834a2..9a583a949bd8c5503f03d7dfeb7e533050357bc3 100644 (file)
@@ -42,6 +42,7 @@ IMPLEMENT_STANDARD_HANDLE( HYDROData_StricklerTable, HYDROData_Entity )
 IMPLEMENT_STANDARD_RTTIEXT( HYDROData_StricklerTable, HYDROData_Entity )
 
 HYDROData_StricklerTable::HYDROData_StricklerTable()
+: HYDROData_Entity( Geom_No )
 {
 }
 
index e9fef89f472746aa02041461025a3df2fbaf03f2..210ec410ee8434a29e59973e95a6531c50d91662 100644 (file)
@@ -57,38 +57,6 @@ void HYDROData_Tool::WriteStringsToFile( QFile&             theFile,
   anOutStream << aWriteStr << theSep << theSep;
 }
 
-void HYDROData_Tool::SetMustBeUpdatedObjects(
-  const Handle(HYDROData_Document)& theDoc  )
-{
-  bool anIsChanged = true;
-
-  // iterate until there is no changes because objects on all level of dependency must be updated
-  while ( anIsChanged )
-  {
-    anIsChanged = false;
-
-    HYDROData_Iterator anIter( theDoc );
-    for ( ; anIter.More(); anIter.Next() )
-    {
-      Handle(HYDROData_Entity) anObject = anIter.Current();
-      if ( anObject.IsNull() || anObject->IsMustBeUpdated() )
-        continue;
-
-      HYDROData_SequenceOfObjects aRefSeq = anObject->GetAllReferenceObjects();
-      for ( int i = 1, n = aRefSeq.Length(); i <= n; ++i )
-      {
-        Handle(HYDROData_Entity) aRefObject = aRefSeq.Value( i );
-        if ( aRefObject.IsNull() || !aRefObject->IsMustBeUpdated() )
-          continue;
-
-        anObject->SetToUpdate( true );
-        anIsChanged = true;
-        break;
-      }
-    }
-  }
-}
-
 QString HYDROData_Tool::GenerateObjectName( const Handle(HYDROData_Document)& theDoc,
                                             const QString&                    thePrefix,
                                             const QStringList&                theUsedNames,
index db72e3ff984bb21994d3075611a1452ebbf37531..39fc887b87cb5b1356db19b4589b57b8c3139979 100644 (file)
@@ -50,12 +50,6 @@ public:
                                                             const QStringList& theStrings,
                                                             const QString&     theSep = "\n" );
 
-  /**
-   * Enables "MustBeUpdated" flag for objects that are depended on "MustBeUpdated" objects.
-   * \param theDoc document where this operation is performed
-   */
-  static void                           SetMustBeUpdatedObjects( const Handle_HYDROData_Document& theDoc );
-
   /**
    * \brief Generate name for new object.
    * \param theDoc document
index e2867ea8e3e4a199ddbbb3267a00cc2f3b71c61c..e7d8ff79529ffb5e03bf33c67669db9f120ce1fc 100644 (file)
@@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_HANDLE(HYDROData_VisualState, HYDROData_Entity)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_VisualState, HYDROData_Entity)
 
 HYDROData_VisualState::HYDROData_VisualState()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_No )
 {
 }
 
index c25176912fb24c039206acfa0bc9434c38ae546f..4bceba9a7c69b895d35ea237643e06c6b2d69136 100644 (file)
@@ -32,7 +32,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Entity)
 
 
 HYDROData_Zone::HYDROData_Zone()
-: HYDROData_Entity()
+: HYDROData_Entity( Geom_2d )
 {
   myInterpolator = NULL;
 }
index 29150b4f3130c49f90181f3d703b4cb38597561f..97c826ada354267084d96e259e7a1075079b24fa 100644 (file)
@@ -632,7 +632,7 @@ void HYDROGUI_CalculationOp::onRemoveObjects()
 bool HYDROGUI_CalculationOp::confirmRegionsChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with zones
@@ -657,7 +657,7 @@ bool HYDROGUI_CalculationOp::confirmRegionsChange() const
 bool HYDROGUI_CalculationOp::confirmOrderChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with zones
@@ -682,7 +682,7 @@ bool HYDROGUI_CalculationOp::confirmOrderChange() const
 bool HYDROGUI_CalculationOp::confirmRuleChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with zones
@@ -707,7 +707,7 @@ bool HYDROGUI_CalculationOp::confirmRuleChange() const
 bool HYDROGUI_CalculationOp::confirmModeChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with zones
@@ -761,7 +761,7 @@ bool HYDROGUI_CalculationOp::confirmContinueWithWarning( const HYDROData_Warning
 bool HYDROGUI_CalculationOp::confirmLandCoverRegionsChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with land cover zones
@@ -786,7 +786,7 @@ bool HYDROGUI_CalculationOp::confirmLandCoverRegionsChange() const
 bool HYDROGUI_CalculationOp::confirmLandCoverModeChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with land cover zones
@@ -811,7 +811,7 @@ bool HYDROGUI_CalculationOp::confirmLandCoverModeChange() const
 bool HYDROGUI_CalculationOp::confirmLandCoverOrderChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with land cover zones
@@ -836,7 +836,7 @@ bool HYDROGUI_CalculationOp::confirmLandCoverOrderChange() const
 bool HYDROGUI_CalculationOp::confirmLandCoverRuleChange() const
 {
   // Check if the case is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_No );
   if ( !isConfirmed )
   {
     // If not modified check if the case has already defined regions with land cover zones
@@ -987,10 +987,10 @@ void HYDROGUI_CalculationOp::onNext( const int theIndex )
       }
     }
     aPanel->setStricklerTableNames( aList, anEntryList );
-    bool anUpdateState = myEditedObject->IsMustBeUpdated();
+    //@ASL: bool anUpdateState = myEditedObject->IsMustBeUpdated();
     if ( !aList.isEmpty() )
       aPanel->setStricklerTable( aList.at( 0 ), false );
-    myEditedObject->SetToUpdate( anUpdateState );
+    //@ASL: myEditedObject->SetToUpdate( anUpdateState );
 
     // Fill in list widget with all available land covers
     aSeq = HYDROGUI_Tool::GetLandCovers( module() );
@@ -1060,7 +1060,7 @@ void HYDROGUI_CalculationOp::onNext( const int theIndex )
     if ( aMode == HYDROData_CalculationCase::AUTOMATIC )
     {
       // Set objects in the specified order
-      if( myEditedObject->IsMustBeUpdated() )
+      if( myEditedObject->IsMustBeUpdated(  HYDROData_Entity::Geom_2d ) )
       {
         myEditedObject->RemoveGeometryObjects();
         foreach ( const QString& aName, aPanel->getAllGeomObjects() )
@@ -1093,7 +1093,7 @@ void HYDROGUI_CalculationOp::onNext( const int theIndex )
     if ( aMode == HYDROData_CalculationCase::AUTOMATIC )
     {
       // Set objects in the specified order
-      if( myEditedObject->IsMustBeUpdated() )
+      if( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d ) )
       {
         myEditedObject->RemoveLandCovers();
         foreach ( const QString& aName, aPanel->getAllLandCovers() )
@@ -1119,7 +1119,7 @@ void HYDROGUI_CalculationOp::onNext( const int theIndex )
     }
     aPanel->setEditLandCoverZonesEnabled( aMode == HYDROData_CalculationCase::MANUAL );
          
-    if ( myEditedObject->IsMustBeUpdated() )
+    if ( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_All ) )
     {
       myShowZones = true;
       myEditedObject->Update();
@@ -1577,7 +1577,7 @@ void HYDROGUI_CalculationOp::setAvailableGroups()
       aGroupsNames.append( aGroup->GetName() );
     }
   }
-  if( myEditedObject->IsMustBeUpdated() ) {
+  if( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d ) ) {
     for( int anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ ) {
       Handle(HYDROData_ShapesGroup) aGeomGroup =
         Handle(HYDROData_ShapesGroup)::DownCast( aSeq.Value( anIndex ) );
@@ -1590,7 +1590,7 @@ void HYDROGUI_CalculationOp::setAvailableGroups()
   aPanel->setAvailableGroups( aGroupsNames );
   aPanel->includeGroups( aList );
 
-  bool isUpdated = myEditedObject->IsMustBeUpdated();
+  //@ASL: bool isUpdated = myEditedObject->IsMustBeUpdated();
 }
 
 void HYDROGUI_CalculationOp::onAddGroups()
@@ -1747,7 +1747,7 @@ void HYDROGUI_CalculationOp::onOrderChanged( bool& isConfirmed )
 
   isConfirmed = confirmOrderChange();
   if( isConfirmed )
-    myEditedObject->SetToUpdate( true );
+    myEditedObject->Changed( HYDROData_Entity::Geom_2d );
 }
 
 void HYDROGUI_CalculationOp::onOrderLandCoverChanged( bool& isConfirmed )
@@ -1759,7 +1759,7 @@ void HYDROGUI_CalculationOp::onOrderLandCoverChanged( bool& isConfirmed )
 
   isConfirmed = confirmLandCoverOrderChange();
   if( isConfirmed )
-    myEditedObject->SetToUpdate( true );
+    myEditedObject->Changed( HYDROData_Entity::Geom_No );
 }
 
 void HYDROGUI_CalculationOp::onRuleChanged( bool& isConfirmed )
@@ -1771,7 +1771,7 @@ void HYDROGUI_CalculationOp::onRuleChanged( bool& isConfirmed )
 
   isConfirmed = confirmRuleChange();
   if( isConfirmed )
-    myEditedObject->SetToUpdate( true );
+    myEditedObject->Changed( HYDROData_Entity::Geom_2d );
 }
 
 void HYDROGUI_CalculationOp::onRuleLandCoverChanged( bool& isConfirmed )
@@ -1783,7 +1783,7 @@ void HYDROGUI_CalculationOp::onRuleLandCoverChanged( bool& isConfirmed )
 
   isConfirmed = confirmLandCoverRuleChange();
   if( isConfirmed )
-    myEditedObject->SetToUpdate( true );
+    myEditedObject->Changed( HYDROData_Entity::Geom_No );
 }
 
 void HYDROGUI_CalculationOp::onRegenerateColors()
index e052d7d0288c5fb1769320f53b00f7cfcf381c78..f1613b07a406d8bf28d35f6aac76458d200136c5 100644 (file)
@@ -211,7 +211,7 @@ bool HYDROGUI_ChannelOp::processApply( int& theUpdateFlags,
     myEditedObject->SetProfile( aProfile );
   }
 
-  if ( myEditedObject->IsMustBeUpdated() )
+  if ( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d ) )
     myEditedObject->Update();
 
   erasePreview();
index e0183809bff9da876c0cd9f5bdcd50d93d4ed0e5..8ec9658dab3b3c3120276eaca84a192d9b5e15f6 100644 (file)
@@ -74,7 +74,7 @@ QFont HYDROGUI_DataObject::font( const int theId ) const
   if( theId == NameId )
   {
     Handle(HYDROData_Entity) aDataObject = modelObject();
-    if( !aDataObject.IsNull() && aDataObject->IsMustBeUpdated() )
+    if( !aDataObject.IsNull() && aDataObject->IsMustBeUpdated( HYDROData_Entity::Geom_All ) )
     {
       aFont.setItalic( true );
       aFont.setBold( true );
@@ -108,7 +108,7 @@ QColor HYDROGUI_DataObject::color( const ColorRole theRole, const int theId ) co
   if ( !aColor.isValid() )
   {
     Handle(HYDROData_Entity) aDataObject = modelObject();
-    if( !aDataObject.IsNull() && aDataObject->IsMustBeUpdated() )
+    if( !aDataObject.IsNull() && aDataObject->IsMustBeUpdated( HYDROData_Entity::Geom_All ) )
     {
       switch ( theRole )
       {
@@ -148,7 +148,7 @@ QPixmap HYDROGUI_DataObject::icon( const int theId ) const
     }
     else
     {
-      QString aNeedUpdate( aDataObject->IsMustBeUpdated() ? "M_" : "" );
+      QString aNeedUpdate( aDataObject->IsMustBeUpdated( HYDROData_Entity::Geom_All ) ? "M_" : "" );
 
       int anObjectKind = (int)aDataObject->GetKind();
       if ( anObjectKind == KIND_DUMMY_3D )
index 205b14864ba343c341e5262366a834e915cd939c..d81f0d07217ccd53cce135b66bc246dced711de4 100644 (file)
@@ -372,7 +372,7 @@ bool HYDROGUI_LandCoverOp::confirmPolylinesChange() const
     return true;
 
   // Check if the land cover object is already modified or not
-  bool isConfirmed = myEditedObject->IsMustBeUpdated();
+  bool isConfirmed = myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d );
   if ( !isConfirmed )
   {
     // If not modified check if the land cover has already defined polylines
index 60609a971612abb30b26f6291b1901b73daa82a9..81ad9fa08755b9f788dd910c46f02633b4c3bd1b 100644 (file)
@@ -399,7 +399,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
       anIsVisibleInSelection |= aVisibility;
       anIsHiddenInSelection |= !aVisibility;
 
-      if ( anObject->CanBeUpdated() && anObject->IsMustBeUpdated() )
+      if ( anObject->CanBeUpdated() && anObject->IsMustBeUpdated( HYDROData_Entity::Geom_All ) )
       {
         anIsMustObjectBeUpdated = true;
       }
index 7d312cb56d6c75b55e674507463c87bd1c4afbd1..91e0a06ab5c10de7e1653de9b4776db9f950ce4c 100644 (file)
 #include <TopoDS_Vertex.hxx>
 #include <BRepBndLib.hxx>
 #include <Precision.hxx>
+#include <Graphic3d_ArrayOfPolylines.hxx>
+#include <GCPnts_QuasiUniformDeflection.hxx>
+#include <BRepAdaptor_Curve.hxx>
+#include <Prs3d_LineAspect.hxx>
 
 IMPLEMENT_STANDARD_HANDLE (HYDROGUI_Polyline, AIS_Shape)
 IMPLEMENT_STANDARD_RTTIEXT(HYDROGUI_Polyline, AIS_Shape)
@@ -53,11 +57,43 @@ HYDROGUI_Polyline::~HYDROGUI_Polyline()
 {
 }
 
+Handle( Graphic3d_ArrayOfPolylines ) BuildEdgePresentation( const TopoDS_Edge& theEdge, double theDeviation )
+{
+  BRepAdaptor_Curve aCurveAdaptor( theEdge );
+  GCPnts_QuasiUniformDeflection aPnts( aCurveAdaptor, theDeviation );
+
+  Handle( Graphic3d_ArrayOfPolylines ) anArray;
+  if( !aPnts.IsDone() )
+    return anArray;
+
+  int n = aPnts.NbPoints();
+  anArray = new Graphic3d_ArrayOfPolylines( n );
+  for( int i=1; i<=n; i++ )
+    anArray->AddVertex( aPnts.Value( i ) );
+
+  return anArray;
+}
+
 void HYDROGUI_Polyline::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
                             const Handle(Prs3d_Presentation)& aPrs,
                             const Standard_Integer aMode)
 {  
-  AIS_Shape::Compute(aPresentationManager, aPrs, aMode);
+  //AIS_Shape::Compute(aPresentationManager, aPrs, aMode);
+
+  aPrs->Clear();
+  Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup( aPrs );
+  Handle(Graphic3d_AspectLine3d) anAspect = Attributes()->FaceBoundaryAspect()->Aspect();
+  aGroup->SetGroupPrimitivesAspect( anAspect );
+
+  TopExp_Explorer Exp1 ( myshape, TopAbs_EDGE );
+  for ( ; Exp1.More(); Exp1.Next() )
+  {
+    TopoDS_Edge anEdge = TopoDS::Edge( Exp1.Current() );
+    Handle( Graphic3d_ArrayOfPolylines ) anArray = BuildEdgePresentation( anEdge, 0.1 );
+    if( !anArray.IsNull() )
+      aGroup->AddPrimitiveArray ( anArray );
+  }
+
    
   TopExp_Explorer Exp ( myshape, TopAbs_EDGE );
   for ( ; Exp.More(); Exp.Next() ) {
index 3148703ac66326a9a8f261f249071cc4827dec6e..c4c822df57515a5a9fdb4461e27b74928da49049 100644 (file)
@@ -232,7 +232,7 @@ bool HYDROGUI_ProfileOp::processApply( int& theUpdateFlags,
   }
 
   // At first we update the child u,z profile object
-  aProfileUZ->SetToUpdate( true );
+  aProfileUZ->Changed( HYDROData_Entity::Geom_2d );
   aProfileUZ->Update();
 
   // And now we update our edited object
index 5835dc95f41d2a3c1fbd5455d61c5e4c0c5255a0..a2072046345be71268bd07eeb74fdbcfe26457c6 100755 (executable)
@@ -245,7 +245,7 @@ bool HYDROGUI_StreamOp::processApply( int& theUpdateFlags,
   myEditedObject->SetHydraulicAxis( aHydAxis );
   myEditedObject->SetProfiles( aRefProfiles, false );
 
-  if ( myEditedObject->IsMustBeUpdated() )
+  if ( myEditedObject->IsMustBeUpdated( HYDROData_Entity::Geom_2d ) )
     myEditedObject->Update();
 
   if ( !myIsEdit )
index d7925e36df72fda09021920f105fa64a084745f0..08a1de813863cefaf12ceb177f98c0b8fe66aca8 100644 (file)
@@ -73,7 +73,7 @@ void HYDROGUI_UpdateObjectOp::updateObject( const Handle(HYDROData_Entity)& theO
     updateObject( anObject, theMapOfTreated );
   }
 
-  if ( !myIsForced && !theObject->IsMustBeUpdated() )
+  if ( !myIsForced && !theObject->IsMustBeUpdated( HYDROData_Entity::Geom_All ) )
     return;
 
   theObject->Update();
index 43a017d36e66e0b8ae1724a36ea9dff5480d3903..8be7fa3739c21e284da2c3317c63a998de22025f 100644 (file)
@@ -72,7 +72,7 @@ HYDROGUI_ViewerDlg::HYDROGUI_ViewerDlg( HYDROGUI_Module* theModule, const QStrin
 
   myViewManager->setViewModel( aViewer );// custom view model, which extends SALOME_View interface
 
-  aViewer->enableMultiselection( false );
+  //aViewer->enableMultiselection( false );
 
   SUIT_ViewWindow* aViewWin = myViewManager->createViewWindow();
   aViewer->setStaticTrihedronDisplayed( false );
index 7ef4fd137546ccc860428ea26da70bb4129f55a4..ee4e48417ad23aa3c5784c438a799a6f2b76d5fc 100644 (file)
@@ -154,6 +154,16 @@ class HYDROData_Entity
 %End
 
 public:
+  enum Geometry
+  {
+    Geom_No = 1,
+    Geom_2d = 2,
+    Geom_Z  = 4,
+    Geom_Groups = 8,
+
+    Geom_3d = 6,
+    Geom_2d_and_groups = 10,
+  };
 
   /**
    * Returns the kind of this object. Must be redefined in all objects of known type.
@@ -186,19 +196,6 @@ public:
    */
   virtual QVariant GetDataVariant();
 
-
-  /**
-   * Sets the "MustBeUpdated" flag: if object is depended on updated features.
-   * \param theFlag is true for objects that must be updated, false for up-to-date
-   */
-  virtual void SetToUpdate( bool theFlag );
-
-  /**
-   * Returns the "MustBeUpdated" flag: is object data must be updated or not
-   * \returns false if object is up to date
-   */
-  virtual bool IsMustBeUpdated() const;
-
   /**
    * Returns flag indicating that object is updateble or not.
    */
@@ -261,7 +258,7 @@ protected:
    * Creates new object in the internal data structure. Use higher level objects 
    * to create objects with real content.
    */
-  HYDROData_Entity();
+  HYDROData_Entity( Geometry );
 
   /**
    * Destructs properties of the object and object itself, removes it from the document.