HYDROData_Digue.h
HYDROData_Document.h
HYDROData_DummyObject3D.h
- HYDROData_EdgesGroup.h
HYDROData_Entity.h
HYDROData_IAltitudeObject.h
HYDROData_Image.h
HYDROData_Projection.h
HYDROData_Region.h
HYDROData_River.h
- HYDROData_SplittedEdgesGroup.h
+ HYDROData_ShapesGroup.h
+ HYDROData_SplittedShapesGroup.h
HYDROData_SplitToZonesTool.h
HYDROData_Stream.h
HYDROData_Tool.h
HYDROData_Digue.cxx
HYDROData_Document.cxx
HYDROData_DummyObject3D.cxx
- HYDROData_EdgesGroup.cxx
HYDROData_Entity.cxx
HYDROData_IAltitudeObject.cxx
HYDROData_Image.cxx
HYDROData_Projection.cxx
HYDROData_Region.cxx
HYDROData_River.cxx
- HYDROData_SplittedEdgesGroup.cxx
+ HYDROData_ShapesGroup.cxx
+ HYDROData_SplittedShapesGroup.cxx
HYDROData_SplitToZonesTool.cxx
HYDROData_Stream.cxx
HYDROData_Tool.cxx
#include "HYDROData_ArtificialObject.h"
#include "HYDROData_Bathymetry.h"
#include "HYDROData_Document.h"
-#include "HYDROData_EdgesGroup.h"
+#include "HYDROData_ShapesGroup.h"
#include "HYDROData_Iterator.h"
#include "HYDROData_NaturalObject.h"
#include "HYDROData_PolylineXY.h"
#include "HYDROData_SplitToZonesTool.h"
-#include "HYDROData_SplittedEdgesGroup.h"
+#include "HYDROData_SplittedShapesGroup.h"
#include "HYDROData_Region.h"
#include "HYDROData_Tool.h"
#include "HYDROData_Zone.h"
anIter.Init( aGroups );
for ( ; anIter.More(); anIter.Next() )
{
- Handle(HYDROData_SplittedEdgesGroup) aGroup =
- Handle(HYDROData_SplittedEdgesGroup)::DownCast( anIter.Value() );
+ Handle(HYDROData_SplittedShapesGroup) aGroup =
+ Handle(HYDROData_SplittedShapesGroup)::DownCast( anIter.Value() );
if ( aGroup.IsNull() )
continue;
QString aRegsPref = CALCULATION_REGIONS_PREF;
QString aZonesPref = CALCULATION_ZONES_PREF;
- QMap<QString,Handle(HYDROData_SplittedEdgesGroup)> aSplittedEdgesGroupsMap;
+ QMap<QString,Handle(HYDROData_SplittedShapesGroup)> aSplittedEdgesGroupsMap;
// Create result regions for case, by default one zone for one region
HYDROData_SplitToZonesTool::SplitDataListIterator anIter( aSplitedObjects );
else if ( aSplitData.Type == HYDROData_SplitToZonesTool::SplitData::Data_Edge )
{
// Create new edges group
- if ( aSplitData.ObjectNames.isEmpty() ||
- aSplitData.Shape.IsNull() || aSplitData.Shape.ShapeType() != TopAbs_EDGE )
+ if ( aSplitData.ObjectNames.isEmpty() || aSplitData.Shape.IsNull() )
continue;
QString anObjName = aSplitData.ObjectNames.first();
if ( anObjName.isEmpty() )
continue;
- Handle(HYDROData_SplittedEdgesGroup) aSplittedGroup;
+ Handle(HYDROData_SplittedShapesGroup) aSplittedGroup;
if ( !aSplittedEdgesGroupsMap.contains( anObjName ) )
{
aSplittedGroup = addNewSplittedGroup();
if ( aSplittedGroup.IsNull() )
continue;
- TopoDS_Edge anEdge = TopoDS::Edge( aSplitData.Shape );
- aSplittedGroup->AddEdge( anEdge );
+ aSplittedGroup->AddShape( aSplitData.Shape );
}
}
}
SetToUpdate( true );
}
-bool HYDROData_CalculationCase::AddGeometryGroup( const Handle(HYDROData_EdgesGroup)& theGroup )
+bool HYDROData_CalculationCase::AddGeometryGroup( const Handle(HYDROData_ShapesGroup)& theGroup )
{
if ( theGroup.IsNull() )
return false;
return GetReferenceObjects( DataTag_GeometryGroup );
}
-void HYDROData_CalculationCase::RemoveGeometryGroup( const Handle(HYDROData_EdgesGroup)& theGroup )
+void HYDROData_CalculationCase::RemoveGeometryGroup( const Handle(HYDROData_ShapesGroup)& theGroup )
{
if ( theGroup.IsNull() )
return;
return aNewRegion;
}
-Handle(HYDROData_SplittedEdgesGroup) HYDROData_CalculationCase::addNewSplittedGroup()
+Handle(HYDROData_SplittedShapesGroup) HYDROData_CalculationCase::addNewSplittedGroup()
{
TDF_Label aNewLab = myLab.FindChild( DataTag_SplittedGroups ).NewChild();
- Handle(HYDROData_SplittedEdgesGroup) aNewGroup =
- Handle(HYDROData_SplittedEdgesGroup)::DownCast(
+ Handle(HYDROData_SplittedShapesGroup) aNewGroup =
+ Handle(HYDROData_SplittedShapesGroup)::DownCast(
HYDROData_Iterator::CreateObject( aNewLab, KIND_SPLITTED_GROUP ) );
AddReferenceObject( aNewGroup, DataTag_SplittedGroups );
class Handle(HYDROData_Region);
class Handle(HYDROData_Zone);
class Handle(HYDROData_PolylineXY);
-class Handle(HYDROData_EdgesGroup);
-class Handle(HYDROData_SplittedEdgesGroup);
+class Handle(HYDROData_ShapesGroup);
+class Handle(HYDROData_SplittedShapesGroup);
DEFINE_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity)
/**
* Add new one reference geometry group for calculation case.
*/
- HYDRODATA_EXPORT virtual bool AddGeometryGroup( const Handle(HYDROData_EdgesGroup)& theGroup );
+ HYDRODATA_EXPORT virtual bool AddGeometryGroup( const Handle(HYDROData_ShapesGroup)& theGroup );
/**
* Returns all reference geometry groups of calculation case.
/**
* Removes reference geometry group from calculation case.
*/
- HYDRODATA_EXPORT virtual void RemoveGeometryGroup( const Handle(HYDROData_EdgesGroup)& theGroup );
+ HYDRODATA_EXPORT virtual void RemoveGeometryGroup( const Handle(HYDROData_ShapesGroup)& theGroup );
/**
* Removes all reference geometry groups from calculation case.
/**
* Add new one splitted edges group for calculation case.
*/
- HYDRODATA_EXPORT virtual Handle(HYDROData_SplittedEdgesGroup) addNewSplittedGroup();
+ HYDRODATA_EXPORT virtual Handle(HYDROData_SplittedShapesGroup) addNewSplittedGroup();
/**
* Returns shell containing faces which correspond to regions.
+++ /dev/null
-
-#include "HYDROData_EdgesGroup.h"
-
-#include <TDF_ChildIDIterator.hxx>
-
-#include <TopoDS.hxx>
-#include <TopoDS_Edge.hxx>
-
-#include <TNaming_Builder.hxx>
-#include <TNaming_NamedShape.hxx>
-
-IMPLEMENT_STANDARD_HANDLE(HYDROData_EdgesGroup,HYDROData_Entity)
-IMPLEMENT_STANDARD_RTTIEXT(HYDROData_EdgesGroup,HYDROData_Entity)
-
-HYDROData_EdgesGroup::HYDROData_EdgesGroup()
-: HYDROData_Entity()
-{
-}
-
-HYDROData_EdgesGroup::~HYDROData_EdgesGroup()
-{
-}
-
-bool HYDROData_EdgesGroup::CanBeUpdated() const
-{
- return false;
-}
-
-bool HYDROData_EdgesGroup::CanRemove()
-{
- return false;
-}
-
-void HYDROData_EdgesGroup::AddEdge( const TopoDS_Edge& theEdge )
-{
- if ( theEdge.IsNull() )
- return;
-
- TDF_Label aNewLab = myLab.FindChild( DataTag_Edge ).NewChild();
-
- TNaming_Builder aBuilder( aNewLab );
- aBuilder.Generated( theEdge );
-}
-
-void HYDROData_EdgesGroup::SetEdges( const HYDROData_SequenceOfEdges& theEdges )
-{
- RemoveEdges();
-
- for ( int i = 1, n = theEdges.Length(); i <= n; ++i )
- {
- const TopoDS_Edge& anEdge = theEdges.Value( i );
- AddEdge( anEdge );
- }
-}
-
-HYDROData_SequenceOfEdges HYDROData_EdgesGroup::GetEdges() const
-{
- HYDROData_SequenceOfEdges aResSeq;
-
- TDF_Label aLabel = myLab.FindChild( DataTag_Edge, false );
- if ( aLabel.IsNull() )
- return aResSeq;
-
- TDF_ChildIDIterator aChildIt( aLabel, TNaming_NamedShape::GetID() );
- for ( ; aChildIt.More(); aChildIt.Next() )
- {
- Handle(TNaming_NamedShape) aNamedShape =
- Handle(TNaming_NamedShape)::DownCast( aChildIt.Value() );
- if ( aNamedShape.IsNull() )
- continue;
-
- TopoDS_Shape aStoredShape = aNamedShape->Get();
- if ( aStoredShape.IsNull() || aStoredShape.ShapeType() != TopAbs_EDGE )
- continue;
-
- TopoDS_Edge aStoredEdge = TopoDS::Edge( aStoredShape );
- aResSeq.Append( aStoredEdge );
- }
-
- return aResSeq;
-}
-
-void HYDROData_EdgesGroup::RemoveEdges()
-{
- TDF_Label aLabel = myLab.FindChild( DataTag_Edge, false );
- if ( !aLabel.IsNull() )
- aLabel.ForgetAllAttributes();
-}
-
+++ /dev/null
-
-#ifndef HYDROData_EdgesGroup_HeaderFile
-#define HYDROData_EdgesGroup_HeaderFile
-
-#include <HYDROData_Entity.h>
-
-class TopoDS_Edge;
-
-DEFINE_STANDARD_HANDLE(HYDROData_EdgesGroup, HYDROData_Entity)
-
-typedef NCollection_Sequence<TopoDS_Edge> HYDROData_SequenceOfEdges;
-
-/**\class HYDROData_EdgesGroup
- * \brief The artificial objects are objects created or planned for creation by human.
- *
- */
-class HYDROData_EdgesGroup : public HYDROData_Entity
-{
-protected:
- /**
- * Enumeration of tags corresponding to the persistent object parameters.
- */
- enum DataTag
- {
- DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
- DataTag_Edge, ///< reference edges
- };
-
-public:
- DEFINE_STANDARD_RTTI(HYDROData_EdgesGroup);
-
- /**
- * Returns the kind of this object. Must be redefined in all objects of known type.
- */
- HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_EDGES_GROUP; }
-
- /**
- * Returns flag indicating that object is updateble or not.
- */
- HYDRODATA_EXPORT virtual bool CanBeUpdated() const;
-
- /**
- * Returns flag indicating that object can be removed or not.
- */
- HYDRODATA_EXPORT virtual bool CanRemove();
-
-public:
- // Public methods to work with reference Edges
-
- /**
- * Add new one edge for the group.
- */
- HYDRODATA_EXPORT virtual void AddEdge( const TopoDS_Edge& theEdge );
-
- /**
- * Sets new sequence of edges for the group.
- */
- HYDRODATA_EXPORT virtual void SetEdges( const HYDROData_SequenceOfEdges& theEdges );
-
- /**
- * Returns all edges of the group.
- */
- HYDRODATA_EXPORT virtual HYDROData_SequenceOfEdges GetEdges() const;
-
- /**
- * Removes all edges from the group.
- */
- HYDRODATA_EXPORT virtual void RemoveEdges();
-
-
-protected:
-
- friend class HYDROData_Iterator;
-
- /**
- * Creates new object in the internal data structure. Use higher level objects
- * to create objects with real content.
- */
- HYDRODATA_EXPORT HYDROData_EdgesGroup();
-
- /**
- * Destructs properties of the object and object itself, removes it from the document.
- */
- virtual HYDRODATA_EXPORT ~HYDROData_EdgesGroup();
-};
-
-#endif
const ObjectKind KIND_ARTIFICIAL_OBJECT = 19;
const ObjectKind KIND_NATURAL_OBJECT = 20;
const ObjectKind KIND_DUMMY_3D = 21;
-const ObjectKind KIND_EDGES_GROUP = 22;
+const ObjectKind KIND_SHAPES_GROUP = 22;
const ObjectKind KIND_SPLITTED_GROUP = 23;
const ObjectKind KIND_LAST = KIND_SPLITTED_GROUP;
#include "HYDROData_Confluence.h"
#include "HYDROData_DummyObject3D.h"
#include "HYDROData_Digue.h"
-#include "HYDROData_EdgesGroup.h"
+#include "HYDROData_ShapesGroup.h"
#include "HYDROData_Image.h"
#include "HYDROData_ImmersibleZone.h"
#include "HYDROData_Obstacle.h"
#include "HYDROData_VisualState.h"
#include "HYDROData_Region.h"
#include "HYDROData_River.h"
-#include "HYDROData_SplittedEdgesGroup.h"
+#include "HYDROData_SplittedShapesGroup.h"
#include "HYDROData_Stream.h"
#include "HYDROData_Zone.h"
case KIND_ZONE: aResult = new HYDROData_Zone(); break;
case KIND_VISUAL_STATE: aResult = new HYDROData_VisualState(); break;
case KIND_DUMMY_3D: aResult = new HYDROData_DummyObject3D(); break;
- case KIND_EDGES_GROUP: aResult = new HYDROData_EdgesGroup(); break;
- case KIND_SPLITTED_GROUP: aResult = new HYDROData_SplittedEdgesGroup();break;
+ case KIND_SHAPES_GROUP: aResult = new HYDROData_ShapesGroup(); break;
+ case KIND_SPLITTED_GROUP: aResult = new HYDROData_SplittedShapesGroup();break;
default: break;
}
#include "HYDROData_Bathymetry.h"
#include "HYDROData_DummyObject3D.h"
-#include "HYDROData_EdgesGroup.h"
+#include "HYDROData_ShapesGroup.h"
#include "HYDROData_Iterator.h"
#include <TNaming_Builder.hxx>
return DefaultBorderColor();
}
-Handle(HYDROData_EdgesGroup) HYDROData_Object::createGroupObject()
+Handle(HYDROData_ShapesGroup) HYDROData_Object::createGroupObject()
{
TDF_Label aNewLab = myLab.FindChild( DataTag_EdgesGroup ).NewChild();
- Handle(HYDROData_EdgesGroup) aNewGroup =
- Handle(HYDROData_EdgesGroup)::DownCast( HYDROData_Iterator::CreateObject( aNewLab, KIND_EDGES_GROUP ) );
+ Handle(HYDROData_ShapesGroup) aNewGroup =
+ Handle(HYDROData_ShapesGroup)::DownCast( HYDROData_Iterator::CreateObject( aNewLab, KIND_SHAPES_GROUP ) );
AddReferenceObject( aNewGroup, DataTag_EdgesGroup );
return aNewGroup;
class TopoDS_Shape;
class Handle(HYDROData_Bathymetry);
class Handle(HYDROData_DummyObject3D);
-class Handle(HYDROData_EdgesGroup);
+class Handle(HYDROData_ShapesGroup);
/**\class HYDROData_Object
* \brief The base class for all geometrical objects in the HYDRO module.
/**
* Create new one child group object.
*/
- HYDRODATA_EXPORT virtual Handle(HYDROData_EdgesGroup) createGroupObject();
+ HYDRODATA_EXPORT virtual Handle(HYDROData_ShapesGroup) createGroupObject();
/**
* Create all necessary child group objects.
#include "HYDROData_Obstacle.h"
#include "HYDROData_Document.h"
-#include "HYDROData_EdgesGroup.h"
+#include "HYDROData_ShapesGroup.h"
#include <Basics_Utils.hxx>
TopoDS_Shape anObstacleShape = GetTopShape();
if ( !anObstacleShape.IsNull() )
{
- HYDROData_SequenceOfEdges aWireEdges;
+ TopTools_SequenceOfShape aWireEdges;
TopExp_Explorer anExp( anObstacleShape, TopAbs_EDGE );
for ( ; anExp.More(); anExp.Next() )
{
QString aWireGroupName = GetName() + "_External_Wire";
- Handle(HYDROData_EdgesGroup) anExtWireGroup = createGroupObject();
+ Handle(HYDROData_ShapesGroup) anExtWireGroup = createGroupObject();
anExtWireGroup->SetName( aWireGroupName );
- anExtWireGroup->SetEdges( aWireEdges );
+ anExtWireGroup->SetShapes( aWireEdges );
}
}
}
--- /dev/null
+
+#include "HYDROData_ShapesGroup.h"
+
+#include <TDF_ChildIDIterator.hxx>
+
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+
+#include <TNaming_Builder.hxx>
+#include <TNaming_NamedShape.hxx>
+
+IMPLEMENT_STANDARD_HANDLE(HYDROData_ShapesGroup,HYDROData_Entity)
+IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ShapesGroup,HYDROData_Entity)
+
+HYDROData_ShapesGroup::HYDROData_ShapesGroup()
+: HYDROData_Entity()
+{
+}
+
+HYDROData_ShapesGroup::~HYDROData_ShapesGroup()
+{
+}
+
+bool HYDROData_ShapesGroup::CanBeUpdated() const
+{
+ return false;
+}
+
+bool HYDROData_ShapesGroup::CanRemove()
+{
+ return false;
+}
+
+void HYDROData_ShapesGroup::AddShape( const TopoDS_Shape& theShape )
+{
+ if ( theShape.IsNull() )
+ return;
+
+ TDF_Label aNewLab = myLab.FindChild( DataTag_Shape ).NewChild();
+
+ TNaming_Builder aBuilder( aNewLab );
+ aBuilder.Generated( theShape );
+}
+
+void HYDROData_ShapesGroup::SetShapes( const TopTools_SequenceOfShape& theShapes )
+{
+ RemoveShapes();
+
+ for ( int i = 1, n = theShapes.Length(); i <= n; ++i )
+ {
+ const TopoDS_Shape& aShape = theShapes.Value( i );
+ AddShape( aShape );
+ }
+}
+
+void HYDROData_ShapesGroup::GeShapes( TopTools_SequenceOfShape& theShapes ) const
+{
+ theShapes.Clear();
+
+ TDF_Label aLabel = myLab.FindChild( DataTag_Shape, false );
+ if ( aLabel.IsNull() )
+ return;
+
+ TDF_ChildIDIterator aChildIt( aLabel, TNaming_NamedShape::GetID() );
+ for ( ; aChildIt.More(); aChildIt.Next() )
+ {
+ Handle(TNaming_NamedShape) aNamedShape =
+ Handle(TNaming_NamedShape)::DownCast( aChildIt.Value() );
+ if ( aNamedShape.IsNull() )
+ continue;
+
+ TopoDS_Shape aStoredShape = aNamedShape->Get();
+ if ( aStoredShape.IsNull() )
+ continue;
+
+ theShapes.Append( aStoredShape );
+ }
+}
+
+void HYDROData_ShapesGroup::RemoveShapes()
+{
+ TDF_Label aLabel = myLab.FindChild( DataTag_Shape, false );
+ if ( !aLabel.IsNull() )
+ aLabel.ForgetAllAttributes();
+}
+
--- /dev/null
+
+#ifndef HYDROData_ShapesGroup_HeaderFile
+#define HYDROData_ShapesGroup_HeaderFile
+
+#include <HYDROData_Entity.h>
+
+#include <TopTools_SequenceOfShape.hxx>
+
+class TopoDS_Shape;
+
+DEFINE_STANDARD_HANDLE(HYDROData_ShapesGroup, HYDROData_Entity)
+
+/**\class HYDROData_ShapesGroup
+ * \brief Class that stores/retreives the sequence of shapes.
+ */
+class HYDROData_ShapesGroup : public HYDROData_Entity
+{
+protected:
+ /**
+ * Enumeration of tags corresponding to the persistent object parameters.
+ */
+ enum DataTag
+ {
+ DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
+ DataTag_Shape, ///< reference edges
+ };
+
+public:
+ DEFINE_STANDARD_RTTI(HYDROData_ShapesGroup);
+
+ /**
+ * Returns the kind of this object. Must be redefined in all objects of known type.
+ */
+ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_SHAPES_GROUP; }
+
+ /**
+ * Returns flag indicating that object is updateble or not.
+ */
+ HYDRODATA_EXPORT virtual bool CanBeUpdated() const;
+
+ /**
+ * Returns flag indicating that object can be removed or not.
+ */
+ HYDRODATA_EXPORT virtual bool CanRemove();
+
+public:
+ // Public methods to work with reference Edges
+
+ /**
+ * Add new one edge for the group.
+ */
+ HYDRODATA_EXPORT virtual void AddShape( const TopoDS_Shape& theShape );
+
+ /**
+ * Sets new sequence of edges for the group.
+ */
+ HYDRODATA_EXPORT virtual void SetShapes( const TopTools_SequenceOfShape& theShapes );
+
+ /**
+ * Returns all edges of the group.
+ */
+ HYDRODATA_EXPORT virtual void GeShapes( TopTools_SequenceOfShape& theShapes ) const;
+
+ /**
+ * Removes all edges from the group.
+ */
+ HYDRODATA_EXPORT virtual void RemoveShapes();
+
+
+protected:
+
+ friend class HYDROData_Iterator;
+
+ /**
+ * Creates new object in the internal data structure. Use higher level objects
+ * to create objects with real content.
+ */
+ HYDRODATA_EXPORT HYDROData_ShapesGroup();
+
+ /**
+ * Destructs properties of the object and object itself, removes it from the document.
+ */
+ virtual HYDRODATA_EXPORT ~HYDROData_ShapesGroup();
+};
+
+#endif
+++ /dev/null
-
-#include "HYDROData_SplittedEdgesGroup.h"
-
-IMPLEMENT_STANDARD_HANDLE(HYDROData_SplittedEdgesGroup,HYDROData_EdgesGroup)
-IMPLEMENT_STANDARD_RTTIEXT(HYDROData_SplittedEdgesGroup,HYDROData_EdgesGroup)
-
-HYDROData_SplittedEdgesGroup::HYDROData_SplittedEdgesGroup()
-: HYDROData_EdgesGroup()
-{
-}
-
-HYDROData_SplittedEdgesGroup::~HYDROData_SplittedEdgesGroup()
-{
-}
-
-
+++ /dev/null
-
-#ifndef HYDROData_SplittedEdgesGroup_HeaderFile
-#define HYDROData_SplittedEdgesGroup_HeaderFile
-
-#include <HYDROData_EdgesGroup.h>
-
-DEFINE_STANDARD_HANDLE(HYDROData_SplittedEdgesGroup, HYDROData_EdgesGroup)
-
-
-/**\class HYDROData_SplittedEdgesGroup
- * \brief The artificial objects are objects created or planned for creation by human.
- *
- */
-class HYDROData_SplittedEdgesGroup : public HYDROData_EdgesGroup
-{
-protected:
- /**
- * Enumeration of tags corresponding to the persistent object parameters.
- */
- enum DataTag
- {
- DataTag_First = HYDROData_EdgesGroup::DataTag_First + 100 ///< first tag, to reserve
- };
-
-public:
- DEFINE_STANDARD_RTTI(HYDROData_SplittedEdgesGroup);
-
- /**
- * Returns the kind of this object. Must be redefined in all objects of known type.
- */
- HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_SPLITTED_GROUP; }
-
-protected:
-
- friend class HYDROData_Iterator;
-
- /**
- * Creates new object in the internal data structure. Use higher level objects
- * to create objects with real content.
- */
- HYDRODATA_EXPORT HYDROData_SplittedEdgesGroup();
-
- /**
- * Destructs properties of the object and object itself, removes it from the document.
- */
- virtual HYDRODATA_EXPORT ~HYDROData_SplittedEdgesGroup();
-};
-
-#endif
--- /dev/null
+
+#include "HYDROData_SplittedShapesGroup.h"
+
+IMPLEMENT_STANDARD_HANDLE(HYDROData_SplittedShapesGroup,HYDROData_ShapesGroup)
+IMPLEMENT_STANDARD_RTTIEXT(HYDROData_SplittedShapesGroup,HYDROData_ShapesGroup)
+
+HYDROData_SplittedShapesGroup::HYDROData_SplittedShapesGroup()
+: HYDROData_ShapesGroup()
+{
+}
+
+HYDROData_SplittedShapesGroup::~HYDROData_SplittedShapesGroup()
+{
+}
+
+
--- /dev/null
+
+#ifndef HYDROData_SplittedShapesGroup_HeaderFile
+#define HYDROData_SplittedShapesGroup_HeaderFile
+
+#include <HYDROData_ShapesGroup.h>
+
+DEFINE_STANDARD_HANDLE(HYDROData_SplittedShapesGroup, HYDROData_ShapesGroup)
+
+
+/**\class HYDROData_SplittedShapesGroup
+ * \brief Class that stores/retreives the sequence of splitted shapes.
+ */
+class HYDROData_SplittedShapesGroup : public HYDROData_ShapesGroup
+{
+protected:
+ /**
+ * Enumeration of tags corresponding to the persistent object parameters.
+ */
+ enum DataTag
+ {
+ DataTag_First = HYDROData_ShapesGroup::DataTag_First + 100 ///< first tag, to reserve
+ };
+
+public:
+ DEFINE_STANDARD_RTTI(HYDROData_SplittedShapesGroup);
+
+ /**
+ * Returns the kind of this object. Must be redefined in all objects of known type.
+ */
+ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_SPLITTED_GROUP; }
+
+protected:
+
+ friend class HYDROData_Iterator;
+
+ /**
+ * Creates new object in the internal data structure. Use higher level objects
+ * to create objects with real content.
+ */
+ HYDRODATA_EXPORT HYDROData_SplittedShapesGroup();
+
+ /**
+ * Destructs properties of the object and object itself, removes it from the document.
+ */
+ virtual HYDRODATA_EXPORT ~HYDROData_SplittedShapesGroup();
+};
+
+#endif
#include "HYDROGUI_Region.h"
#include <HYDROData_PolylineXY.h>
-#include <HYDROData_EdgesGroup.h>
+#include <HYDROData_ShapesGroup.h>
#include <HYDROData_Iterator.h>
#include <HYDROData_Object.h>
#include <HYDROData_Tool.h>
HYDROData_SequenceOfObjects aGroups = anObj->GetGroups();
for( int aGIndex = 1, aGLength = aGroups.Length(); aGIndex <= aGLength; aGIndex++ )
{
- Handle_HYDROData_EdgesGroup aGroup = Handle_HYDROData_EdgesGroup::DownCast( aGroups.Value( aGIndex ) );
+ Handle_HYDROData_ShapesGroup aGroup = Handle_HYDROData_ShapesGroup::DownCast( aGroups.Value( aGIndex ) );
aGroupsNames.append( aGroup->GetName() );
}
}
QStringList anAddedList;
for (int i = 0; i < aSelectedList.length(); i++)
{
- Handle(HYDROData_EdgesGroup) aGroup = Handle(HYDROData_EdgesGroup)::DownCast(
+ Handle(HYDROData_ShapesGroup) aGroup = Handle(HYDROData_ShapesGroup)::DownCast(
HYDROGUI_Tool::FindObjectByName( module(), aSelectedList.at( i ) ) );
if ( aGroup.IsNull() )
continue;
for (int i = 0; i < aSelectedList.length(); i++)
{
- Handle(HYDROData_EdgesGroup) aGroup = Handle(HYDROData_EdgesGroup)::DownCast(
+ Handle(HYDROData_ShapesGroup) aGroup = Handle(HYDROData_ShapesGroup)::DownCast(
HYDROGUI_Tool::FindObjectByName( module(), aSelectedList.at(i) ) );
if ( aGroup.IsNull() )
continue;
// #define DEB_GROUPS 1
#ifdef DEB_GROUPS
-#include <HYDROData_EdgesGroup.h>
+#include <HYDROData_ShapesGroup.h>
#endif
static HYDROData_SequenceOfObjects myCopyingObjects;
HYDROData_SequenceOfObjects::Iterator anIter( anObjGroups );
for ( ; anIter.More(); anIter.Next() )
{
- Handle(HYDROData_EdgesGroup) anObjGroup =
- Handle(HYDROData_EdgesGroup)::DownCast( anIter.Value() );
+ Handle(HYDROData_ShapesGroup) anObjGroup =
+ Handle(HYDROData_ShapesGroup)::DownCast( anIter.Value() );
if( !anObjGroup.IsNull() && !anObjGroup->IsRemoved() )
createObject( aGroupsSect, anObjGroup, aGuiObj->entry(), false );
}