X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Region.h;h=205e546ef97bfdf1f214a25c0e5209b2f5be87c1;hb=b86ee42a0010ef6bde30373a8741dd865d557dd3;hp=f0d2075f107d886181494ab89e77c17430882c49;hpb=85eaba6cfd3cd0b88d4228afee4670ad75985377;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Region.h b/src/HYDROData/HYDROData_Region.h index f0d2075f..205e546e 100644 --- a/src/HYDROData/HYDROData_Region.h +++ b/src/HYDROData/HYDROData_Region.h @@ -1,22 +1,39 @@ +// Copyright (C) 2014-2015 EDF-R&D +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #ifndef HYDROData_Region_HeaderFile #define HYDROData_Region_HeaderFile -#include "HYDROData_Entity.h" +#include "HYDROData_ShapesGroup.h" -DEFINE_STANDARD_HANDLE(HYDROData_Region, HYDROData_Entity) - -class Handle(HYDROData_Zone); +class HYDROData_Zone; +class HYDROData_Document; +class TopoDS_Shape; +class TopoDS_Face; +class QStringList; /**\class HYDROData_Region * \brief Regions are groups (lists) of zones, they can include one or several zones. */ class HYDROData_Region : public HYDROData_Entity { - protected: - /** * Enumeration of tags corresponding to the persistent object parameters. */ @@ -28,7 +45,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_Region); + DEFINE_STANDARD_RTTIEXT(HYDROData_Region, HYDROData_Entity); /** * Returns the kind of this object. Must be redefined in all objects of known type. @@ -38,7 +55,14 @@ public: /** * Dump object to Python script representation. */ - HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const; + HYDRODATA_EXPORT virtual QStringList DumpToPython( const QString& thePyScriptPath, + MapOfTreatedObjects& theTreatedObjects, + QString defRegName = QString()) const; + + /** + * Returns flag indicating that object is updateble or not. + */ + HYDRODATA_EXPORT virtual bool CanBeUpdated() const; /** @@ -47,6 +71,16 @@ public: */ HYDRODATA_EXPORT virtual void Remove(); + /** + * Returns flag indicating that object can be removed or not. + */ + HYDRODATA_EXPORT virtual bool CanRemove(); + + /** + * Returns the list of all reference objects of this object. + */ + HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const; + /** * Add new one reference zone for region. @@ -69,6 +103,17 @@ public: */ HYDRODATA_EXPORT virtual void RemoveZones(); + /** + * \brief Returns the shape of the region. + * Shape of the region could be: + * - a face which is the union of the region zones faces + * - a shell if the zones faces can't be united into one face + * \return shape as TopoDS_Shape + */ + HYDRODATA_EXPORT virtual TopoDS_Shape GetShape( HYDROData_ShapesGroup::SeqOfGroupsDefs* theSeqOfGroups = 0, + const TopTools_SequenceOfShape* IntSh = NULL ) const; + + HYDRODATA_EXPORT bool IsSubmersible() const; protected: @@ -76,7 +121,10 @@ protected: * Create new one reference zone for region on child label. * The new zone is added into the list of reference zones. */ - HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) addNewZone(); + HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) addNewZone( const Handle(HYDROData_Document)& theDoc, + const QString& thePrefix, + const TopoDS_Face& theFace, + const QStringList& theRefObjects ); protected: @@ -87,12 +135,12 @@ protected: * Creates new object in the internal data structure. Use higher level objects * to create objects with real content. */ - HYDROData_Region(); + HYDRODATA_EXPORT HYDROData_Region(); /** * Destructs properties of the object and object itself, removes it from the document. */ - ~HYDROData_Region(); + HYDRODATA_EXPORT ~HYDROData_Region(); }; #endif