RelativePath=".\HYDROData_VisualState.cxx"
>
</File>
+ <File
+ RelativePath=".\HYDROData_Zone.cxx"
+ >
+ </File>
<Filter
Name="Link"
>
RelativePath=".\HYDROData_VisualState.h"
>
</File>
+ <File
+ RelativePath=".\HYDROData_Zone.h"
+ >
+ </File>
<Filter
Name="Operations"
>
void HYDROData_Calculation::SetBoundaryPolyline( const Handle(HYDROData_Polyline)& thePolyline )
{
- Handle(TDataStd_ReferenceList) aRefs;
- myLab.FindChild( DataTag_BoundaryPolyline ).FindAttribute( TDataStd_ReferenceList::GetID(), aRefs );
- if ( aRefs.IsNull() )
- aRefs = TDataStd_ReferenceList::Set( myLab.FindChild( DataTag_BoundaryPolyline ) );
-
- aRefs->Clear();
-
- if ( thePolyline.IsNull() )
- return;
-
- aRefs->Append( thePolyline->Label() );
+ SetReferenceObject( thePolyline, DataTag_BoundaryPolyline );
}
Handle(HYDROData_Polyline) HYDROData_Calculation::GetBoundaryPolyline() const
{
- Handle(HYDROData_Polyline) aRes;
-
- Handle(TDataStd_ReferenceList) aRefs;
- myLab.FindChild( DataTag_BoundaryPolyline ).FindAttribute( TDataStd_ReferenceList::GetID(), aRefs );
- if ( !aRefs.IsNull() && !aRefs->IsEmpty() )
- {
- aRes = Handle(HYDROData_Polyline)::DownCast( HYDROData_Iterator::Object( aRefs->First() ) );
- }
-
- return aRes;
+ return Handle(HYDROData_Polyline)::DownCast(
+ GetReferenceObject( DataTag_BoundaryPolyline ) );
}
#include "HYDROData_Image.h"
-#include "HYDROData_Iterator.h"
-#include "HYDROOperations_Factory.h"
+#include "HYDROData_Document.h"
#include "HYDROData_Tool.h"
+#include "HYDROOperations_Factory.h"
#include <TDataStd_RealArray.hxx>
#include <TDataStd_ByteArray.hxx>
#include <TDataStd_Name.hxx>
#include <TDataStd_UAttribute.hxx>
#include <TDataStd_AsciiString.hxx>
-#include <TDF_ListIteratorOfLabelList.hxx>
#include <ImageComposer_Operator.h>
#include <ImageComposer_MetaTypes.h>
return myLab.FindChild(DataTag_TrsfPoints).FindAttribute(TDataStd_RealArray::GetID(), anArray);
}
-void HYDROData_Image::AppendReference(Handle(HYDROData_Object) theReferenced)
+void HYDROData_Image::AppendReference( const Handle(HYDROData_Object)& theReferenced )
{
- Handle(TDataStd_ReferenceList) aRefs;
- if (!myLab.FindAttribute(TDataStd_ReferenceList::GetID(), aRefs))
- aRefs = TDataStd_ReferenceList::Set(myLab);
- aRefs->Append(theReferenced->Label());
+ AddReferenceObject( theReferenced, 0 );
}
int HYDROData_Image::NbReferences() const
{
- Handle(TDataStd_ReferenceList) aRefs;
- if (!myLab.FindAttribute(TDataStd_ReferenceList::GetID(), aRefs))
- return 0;
- return aRefs->Extent();
+ return NbReferenceObjects( 0 );
}
-Handle(HYDROData_Object) HYDROData_Image::Reference(const int theIndex) const
+Handle(HYDROData_Object) HYDROData_Image::Reference( const int theIndex ) const
{
- Handle(TDataStd_ReferenceList) aRefs;
- if (!myLab.FindAttribute(TDataStd_ReferenceList::GetID(), aRefs))
- return Handle(HYDROData_Object)();
- if (theIndex < 0 || theIndex >= aRefs->Extent())
- return Handle(HYDROData_Object)();
-
- TDF_ListIteratorOfLabelList anIter(aRefs->List());
- for(int anIndex = 0; anIndex != theIndex; anIter.Next(), anIndex++);
- const TDF_Label& aRefLab = anIter.Value();
- return Handle(HYDROData_Object)::DownCast(HYDROData_Iterator::Object(aRefLab));
+ return GetReferenceObject( 0, theIndex );
}
void HYDROData_Image::ChangeReference(
const int theIndex, Handle(HYDROData_Object) theReferenced)
{
- Handle(TDataStd_ReferenceList) aRefs;
- if (!myLab.FindAttribute(TDataStd_ReferenceList::GetID(), aRefs))
- aRefs = TDataStd_ReferenceList::Set(myLab);
- if (theIndex >= aRefs->Extent()) { // for too big index append it just to the end
- AppendReference(theReferenced);
- } else { // remove and insert new
- TDF_ListIteratorOfLabelList anIter(aRefs->List());
- int anIndex = 0;
- for(; anIndex != theIndex; anIter.Next(), anIndex++);
- const TDF_Label& aRemovedLab = anIter.Value();
- anIter.Next();
- aRefs->Remove(aRemovedLab);
- if (anIter.More())
- aRefs->InsertBefore(theReferenced->Label(), anIter.Value());
- else
- aRefs->Append(theReferenced->Label());
- }
+ SetReferenceObject( theReferenced, 0, theIndex );
}
void HYDROData_Image::RemoveReference(const int theIndex)
{
- Handle(TDataStd_ReferenceList) aRefs;
- if (!myLab.FindAttribute(TDataStd_ReferenceList::GetID(), aRefs))
- return; // no references, nothing to remove
- if (aRefs->Extent() == 1 && theIndex == 0) { // remove all if only one
- ClearReferences();
- return;
- }
- TDF_ListIteratorOfLabelList anIter(aRefs->List());
- int anIndex = 0;
- for(; anIndex != theIndex && anIter.More(); anIter.Next(), anIndex++);
- if (anIter.More())
- aRefs->Remove(anIter.Value());
+ RemoveReferenceObject( 0, theIndex );
}
void HYDROData_Image::ClearReferences()
{
- myLab.ForgetAttribute(TDataStd_ReferenceList::GetID());
+ ClearReferenceObjects( 0 );
}
void HYDROData_Image::SetOperatorName(const QString theOpName)
* Appends reference to other object (image or polyline).
* \param theReferenced the object referenced by this
*/
- HYDRODATA_EXPORT void AppendReference(Handle(HYDROData_Object) theReferenced);
+ HYDRODATA_EXPORT void AppendReference( const Handle(HYDROData_Object)& theReferenced );
/**
* Returns the number of referenced objects
protected:
friend class HYDROData_Document;
- friend class HYDROData_Image;
- friend class HYDROData_Calculation;
+ friend class HYDROData_Object;
/**
* Creates object in the document, call HYDROData_Document method to create
-#include <HYDROData_Object.h>
+
+#include "HYDROData_Object.h"
+
+#include "HYDROData_Iterator.h"
#include <TDataStd_Name.hxx>
#include <TDataStd_ByteArray.hxx>
#include <TDataStd_IntegerArray.hxx>
#include <TDataStd_BooleanArray.hxx>
#include <TDataStd_RealArray.hxx>
+#include <TDataStd_ReferenceList.hxx>
+
#include <TDF_CopyLabel.hxx>
+#include <TDF_ListIteratorOfLabelList.hxx>
#include <QString>
#include <QStringList>
return (const char*)(&(aData->InternalArray()->ChangeArray1().ChangeValue(1)));
return NULL;
}
+
+int HYDROData_Object::NbReferenceObjects( const int theTag ) const
+{
+ Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, false );
+ return aRefs.IsNull() ? 0 : aRefs->Extent();
+}
+
+void HYDROData_Object::AddReferenceObject( const Handle_HYDROData_Object& theObj,
+ const int theTag )
+{
+ if ( theObj.IsNull() )
+ return;
+
+ Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, true );
+ aRefs->Append( theObj->Label() );
+}
+
+void HYDROData_Object::SetReferenceObject( const Handle_HYDROData_Object& theObj,
+ const int theTag,
+ const int theIndex )
+{
+ if ( theObj.IsNull() )
+ return;
+
+ Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, true );
+
+ if ( theIndex >= aRefs->Extent() )
+ {
+ aRefs->Append( theObj->Label() );
+ }
+ else if ( theIndex < 0 )
+ {
+ aRefs->Prepend( theObj->Label() );
+ }
+ else
+ {
+ RemoveReferenceObject( theTag, theIndex );
+
+ Handle(HYDROData_Object) aBeforeObj = GetReferenceObject( theTag, theIndex );
+
+ aRefs = getReferenceList( theTag, true ); // because reference list can be removed
+ if ( !aBeforeObj.IsNull() )
+ aRefs->InsertBefore( theObj->Label(), aBeforeObj->Label() );
+ else
+ aRefs->Append( theObj->Label() );
+ }
+}
+
+Handle(HYDROData_Object) HYDROData_Object::GetReferenceObject( const int theTag,
+ const int theIndex ) const
+{
+ Handle(HYDROData_Object) aRes;
+
+ Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, false );
+ if ( aRefs.IsNull() || theIndex < 0 || theIndex >= aRefs->Extent() )
+ return aRes;
+
+ TDF_ListIteratorOfLabelList anIter( aRefs->List() );
+ for ( int anIndex = 0; anIndex != theIndex && anIter.More(); anIter.Next(), ++anIndex );
+
+ const TDF_Label& aRefLabel = anIter.Value();
+ aRes = HYDROData_Iterator::Object( aRefLabel );
+
+ return aRes;
+}
+
+HYDROData_SequenceOfObjects HYDROData_Object::GetReferenceObjects( const int theTag ) const
+{
+ HYDROData_SequenceOfObjects aRes;
+
+ Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, false );
+ if ( aRefs.IsNull() )
+ return aRes;
+
+ TDF_ListIteratorOfLabelList anIter( aRefs->List() );
+ for ( ; anIter.More(); anIter.Next() )
+ {
+ const TDF_Label& aRefLabel = anIter.Value();
+
+ Handle(HYDROData_Object) aRefObject = HYDROData_Iterator::Object( aRefLabel );
+ if ( aRefObject.IsNull() )
+ continue;
+
+ aRes.Append( aRefObject );
+ }
+
+ return aRes;
+}
+
+void HYDROData_Object::RemoveReferenceObject( const int theTag,
+ const int theIndex )
+{
+ Handle(TDataStd_ReferenceList) aRefs = getReferenceList( theTag, false );
+ if ( aRefs.IsNull() )
+ return;
+
+ if ( aRefs->Extent() == 1 && theIndex == 0 )
+ {
+ // remove all if only one
+ ClearReferenceObjects( theTag );
+ return;
+ }
+
+ Handle(HYDROData_Object) aRemovedObj = GetReferenceObject( theTag, theIndex );
+ if ( aRemovedObj.IsNull() )
+ return;
+
+ aRefs->Remove( aRemovedObj->Label() );
+}
+
+void HYDROData_Object::ClearReferenceObjects( const int theTag )
+{
+ TDF_Label aSetLabel = theTag == 0 ? myLab : myLab.FindChild( theTag );
+ aSetLabel.ForgetAttribute( TDataStd_ReferenceList::GetID() );
+}
+
+Handle(TDataStd_ReferenceList) HYDROData_Object::getReferenceList( const int theTag,
+ const bool theIsCreate ) const
+{
+ TDF_Label aLabel = theTag == 0 ? myLab : myLab.FindChild( theTag );
+
+ Handle(TDataStd_ReferenceList) aRefs;
+ if ( !aLabel.FindAttribute( TDataStd_ReferenceList::GetID(), aRefs ) && theIsCreate )
+ aRefs = TDataStd_ReferenceList::Set( aLabel );
+
+ return aRefs;
+}
class QString;
class QVariant;
class QStringList;
+class Handle(TDataStd_ReferenceList);
+class Handle_HYDROData_Object;
///! Kind of an object in a document
typedef int ObjectKind;
///! Unrecognized object
-const ObjectKind KIND_UNKNOWN = 0;
-const ObjectKind KIND_IMAGE = 1;
-const ObjectKind KIND_POLYLINE = 2;
-const ObjectKind KIND_VISUAL_STATE = 3;
-const ObjectKind KIND_BATHYMETRY = 4;
-const ObjectKind KIND_CALCULATION = 5;
+const ObjectKind KIND_UNKNOWN = 0;
+const ObjectKind KIND_IMAGE = 1;
+const ObjectKind KIND_POLYLINE = 2;
+const ObjectKind KIND_VISUAL_STATE = 3;
+const ObjectKind KIND_BATHYMETRY = 4;
+const ObjectKind KIND_CALCULATION = 5;
+const ObjectKind KIND_PROFILE = 6;
+const ObjectKind KIND_PROFILES_GROUP = 7;
+const ObjectKind KIND_GUIDE_LINE = 8;
+const ObjectKind KIND_ZONE = 9;
DEFINE_STANDARD_HANDLE(HYDROData_Object, MMgt_TShared)
typedef QMap<QString,Handle(Standard_Transient)> MapOfTreatedObjects;
+typedef NCollection_Sequence<Handle_HYDROData_Object> HYDROData_SequenceOfObjects;
+
+
/**\class HYDROData_Object
* \brief Generic class of any object in the data model.
*
*/
const char* ByteArray(const int theTag, int& theLen) const;
+ /**
+ * Internal method that used to store the reference object label attribute
+ * \param theObj pointer to reference object
+ * \param theTag tag of a label to store attribute (for 0 this is myLab)
+ */
+ int NbReferenceObjects( const int theTag = 0 ) const;
+
+ /**
+ * Internal method that used to store the reference object label attribute
+ * \param theObj pointer to reference object
+ * \param theTag tag of a label to store attribute (for 0 this is myLab)
+ */
+ void AddReferenceObject( const Handle_HYDROData_Object& theObj,
+ const int theTag = 0 );
+
+ /**
+ * Internal method that used to store the reference object label attribute
+ * \param theObj pointer to reference object
+ * \param theTag tag of a label to store attribute (for 0 this is myLab)
+ * \param theIndex index in the list of references
+ - if more that len then just append it to the end of list
+ - if less than zero then prepend to the list
+ - indexing starts from 0
+ */
+ void SetReferenceObject( const Handle_HYDROData_Object& theObj,
+ const int theTag = 0,
+ const int theIndex = 0 );
+
+ /**
+ * Internal method that used to retreive the reference object(s) attribute
+ * \param theTag tag of a label that keeps the attribute (for 0 this is myLab)
+ * \param theIndex index in the list of references
+ * - indexing starts from 0
+ * \returns pointer to reference object or NULL if label is not set
+ */
+ Handle_HYDROData_Object GetReferenceObject( const int theTag = 0,
+ const int theIndex = 0 ) const;
+
+ HYDROData_SequenceOfObjects GetReferenceObjects( const int theTag = 0 ) const;
+
+ /**
+ * Internal method that used to remove the reference object attribute
+ * \param theTag tag of a label that keeps the attribute (for 0 this is myLab)
+ * \param theIndex index in the list of references
+ * - indexing starts from 0
+ */
+ void RemoveReferenceObject( const int theTag = 0, const int theIndex = 0 );
+
+ /**
+ * Internal method that used to clear list of the reference objects attribute
+ * \param theTag tag of a label that keeps the attribute (for 0 this is myLab)
+ */
+ void ClearReferenceObjects( const int theTag = 0 );
+
+protected:
+
+ Handle(TDataStd_ReferenceList) getReferenceList( const int theTag,
+ const bool theIsCreate ) 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
};
-typedef NCollection_Sequence<Handle_HYDROData_Object> HYDROData_SequenceOfObjects;
-
///! Is Equal for HYDROData_Object mapping
HYDRODATA_EXPORT bool IsEqual(const Handle_HYDROData_Object& theObj1, const Handle_HYDROData_Object& theObj2);
return aRes;
}
+/**
+ * Returns true if polyline is closed
+ */
+bool HYDROData_Polyline::isClosed() const
+{
+ int aDim = getDimension();
+ PolylineData aPolylineData = getPolylineData();
+
+ if ( aDim == 0 || aPolylineData.isEmpty() )
+ return false;
+
+ PolylineData::const_iterator anIt = aPolylineData.constBegin();
+ for ( ; anIt != aPolylineData.constEnd(); ++anIt )
+ {
+ const PolylineSection& aSection = *anIt;
+ if ( !aSection.myIsClosed )
+ return false;
+ }
+
+ return true;
+}
+
/**
* Remove all polyline attributes except dimension.
*/
* is ignored section type.
* \return polyline painter path.
*/
-QPainterPath HYDROData_Polyline::painterPath()
+QPainterPath HYDROData_Polyline::painterPath() const
{
QPainterPath aPath;
int aDim = getDimension();
*/
HYDRODATA_EXPORT PolylineData getPolylineData() const;
+ /**
+ * Returns true if polyline is closed
+ */
+ HYDRODATA_EXPORT bool isClosed() const;
+
/**
* Return polyline dimension
* \return polyline dimension (2 or 3)
/**
* Returns the painter path. The painter path is construct by lines
*/
- HYDRODATA_EXPORT QPainterPath painterPath();
+ HYDRODATA_EXPORT QPainterPath painterPath() const;
protected:
--- /dev/null
+
+#include "HYDROData_Zone.h"
+
+#include "HYDROData_Bathymetry.h"
+#include "HYDROData_Document.h"
+#include "HYDROData_Polyline.h"
+#include "HYDROData_Iterator.h"
+
+#include <TDataStd_IntegerArray.hxx>
+
+#include <QColor>
+#include <QStringList>
+
+#define PYTHON_POLYLINE_ID "KIND_ZONE"
+
+IMPLEMENT_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Object)
+IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Object)
+
+HYDROData_Zone::HYDROData_Zone()
+{
+}
+
+HYDROData_Zone::~HYDROData_Zone()
+{
+}
+
+QStringList HYDROData_Zone::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
+{
+ QStringList aResList;
+
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( this );
+ if ( aDocument.IsNull() )
+ return aResList;
+
+ return aResList;
+}
+
+void HYDROData_Zone::SetColor( const QColor& theColor )
+{
+ Handle(TDataStd_IntegerArray) aColorArray;
+ if ( !myLab.FindChild( DataTag_Color ).FindAttribute( TDataStd_IntegerArray::GetID(), aColorArray ) )
+ aColorArray = TDataStd_IntegerArray::Set( myLab.FindChild( DataTag_Color ), 1, 4 );
+
+ aColorArray->SetValue( 1, theColor.red() );
+ aColorArray->SetValue( 2, theColor.green() );
+ aColorArray->SetValue( 3, theColor.blue() );
+ aColorArray->SetValue( 4, theColor.alpha() );
+}
+
+QColor HYDROData_Zone::GetColor() const
+{
+ QColor aResColor( Qt::green );
+
+ Handle(TDataStd_IntegerArray) aColorArray;
+ if ( myLab.FindChild( DataTag_Color ).FindAttribute( TDataStd_IntegerArray::GetID(), aColorArray ) )
+ {
+ aResColor.setRed( aColorArray->Value( 1 ) );
+ aResColor.setGreen( aColorArray->Value( 2 ) );
+ aResColor.setBlue( aColorArray->Value( 3 ) );
+ aResColor.setAlpha( aColorArray->Value( 4 ) );
+ }
+
+ return aResColor;
+}
+
+void HYDROData_Zone::SetPolyline( const Handle(HYDROData_Polyline)& thePolyline )
+{
+ SetReferenceObject( thePolyline, DataTag_Polyline );
+}
+
+Handle(HYDROData_Polyline) HYDROData_Zone::GetPolyline() const
+{
+ return Handle(HYDROData_Polyline)::DownCast(
+ GetReferenceObject( DataTag_Polyline ) );
+}
+
+void HYDROData_Zone::RemovePolyline()
+{
+ ClearReferenceObjects( DataTag_Polyline );
+}
+
+int HYDROData_Zone::NbBathymetries() const
+{
+ return NbReferenceObjects( DataTag_Bathymetry );
+}
+
+void HYDROData_Zone::AddBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry )
+{
+ AddReferenceObject( theBathymetry, DataTag_Bathymetry );
+}
+
+void HYDROData_Zone::SetBathymetry( const int theIndex,
+ const Handle(HYDROData_Bathymetry)& theBathymetry )
+{
+ SetReferenceObject( theBathymetry, DataTag_Bathymetry, theIndex );
+}
+
+Handle(HYDROData_Bathymetry) HYDROData_Zone::GetBathymetry( const int theIndex ) const
+{
+ return Handle(HYDROData_Bathymetry)::DownCast(
+ GetReferenceObject( DataTag_Bathymetry, theIndex ) );
+}
+
+HYDROData_SequenceOfObjects HYDROData_Zone::GetBathymetries() const
+{
+ return GetReferenceObjects( DataTag_Bathymetry );
+}
+
+void HYDROData_Zone::RemoveBathymetries()
+{
+ ClearReferenceObjects( DataTag_Bathymetry );
+}
+
+QPainterPath HYDROData_Zone::GetPainterPath() const
+{
+ QPainterPath aPath;
+
+ Handle(HYDROData_Polyline) aPolyline = GetPolyline();
+ if ( !aPolyline.IsNull() )
+ {
+ aPath = aPolyline->painterPath();
+ }
+
+ return aPath;
+}
+
--- /dev/null
+
+#ifndef HYDROData_Zone_HeaderFile
+#define HYDROData_Zone_HeaderFile
+
+#include <HYDROData_Object.h>
+
+#include <QPointF>
+#include <QPainterPath>
+#include <QList>
+
+class Handle(HYDROData_Bathymetry);
+class Handle(HYDROData_Polyline);
+
+DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Object)
+
+
+/**\class HYDROData_Zone
+ * \brief Class that stores/retreives information about the 2d face.
+ */
+class HYDROData_Zone : public HYDROData_Object
+{
+
+protected:
+ /**
+ * Enumeration of tags corresponding to the persistent object parameters.
+ */
+ enum DataTag
+ {
+ DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
+ DataTag_Bathymetry, ///< reference bathymetries
+ DataTag_Polyline, ///< reference polyline
+ DataTag_Color ///< color of zone
+ };
+
+public:
+ DEFINE_STANDARD_RTTI(HYDROData_Zone);
+
+ /**
+ * Returns the kind of this object. Must be redefined in all objects of known type.
+ */
+ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_ZONE;}
+
+ /**
+ * Dump object to Python script representation.
+ */
+ HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
+
+
+ /**
+ * Sets color for zone.
+ */
+ HYDRODATA_EXPORT virtual void SetColor( const QColor& theColor );
+
+ /**
+ * Returns color of zone.
+ */
+ HYDRODATA_EXPORT virtual QColor GetColor() const;
+
+
+ /**
+ * Sets reference polyline object for zone.
+ */
+ HYDRODATA_EXPORT virtual void SetPolyline( const Handle(HYDROData_Polyline)& thePolyline );
+
+ /**
+ * Returns reference polyline object of zone.
+ */
+ HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline) GetPolyline() const;
+
+ /**
+ * Remove reference polyline object of zone.
+ */
+ HYDRODATA_EXPORT virtual void RemovePolyline();
+
+
+ /**
+ * Returns number of bathymetry objects for zone.
+ */
+ HYDRODATA_EXPORT virtual int NbBathymetries() const;
+
+ /**
+ * Add reference bathymetry object for zone.
+ */
+ HYDRODATA_EXPORT virtual void AddBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
+
+ /**
+ * Change reference bathymetry object with given index for zone.
+ */
+ HYDRODATA_EXPORT virtual void SetBathymetry( const int theIndex,
+ const Handle(HYDROData_Bathymetry)& theBathymetry );
+
+ /**
+ * Returns reference bathymetry object of zone by it index.
+ */
+ HYDRODATA_EXPORT virtual Handle(HYDROData_Bathymetry) GetBathymetry( const int theIndex ) const;
+
+ /**
+ * Returns list of all reference bathymetry objects of zone.
+ */
+ HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetBathymetries() const;
+
+ /**
+ * Clear list of bathymetry objects of zone.
+ */
+ HYDRODATA_EXPORT virtual void RemoveBathymetries();
+
+ /**
+ * Returns data of object wrapped to QVariant.
+ * Reimplemented to wrap and return saved 2d polyline.
+ */
+ //HYDRODATA_EXPORT virtual QVariant GetDataVariant();
+
+ /**
+ * Returns the painter path. The painter path is construct by polyline
+ */
+ HYDRODATA_EXPORT QPainterPath GetPainterPath() const;
+
+
+protected:
+
+ friend class HYDROData_Iterator;
+
+ /**
+ * Creates new object in the internal data structure. Use higher level objects
+ * to create objects with real content.
+ */
+ HYDROData_Zone();
+
+ /**
+ * Destructs properties of the object and object itself, removes it from the document.
+ */
+ ~HYDROData_Zone();
+};
+
+#endif