// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // 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. // // 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 // %ExportedHeaderCode #include %End typedef int ObjectKind; const ObjectKind KIND_UNKNOWN; const ObjectKind KIND_IMAGE; const ObjectKind KIND_POLYLINE; const ObjectKind KIND_BATHYMETRY; const ObjectKind KIND_ALTITUDE; const ObjectKind KIND_IMMERSIBLE_ZONE; const ObjectKind KIND_RIVER; const ObjectKind KIND_STREAM; const ObjectKind KIND_CONFLUENCE; const ObjectKind KIND_CHANNEL; const ObjectKind KIND_OBSTACLE; const ObjectKind KIND_DIGUE; const ObjectKind KIND_PROFILE; const ObjectKind KIND_PROFILEUZ; const ObjectKind KIND_POLYLINEXY; const ObjectKind KIND_CALCULATION; const ObjectKind KIND_ZONE; const ObjectKind KIND_REGION; class HYDROData_Entity { %TypeHeaderCode #include %End %ConvertToSubClassCode // HYDROData_Entity sub-classes provide a unique kind ID. switch ( sipCpp->GetKind() ) { case KIND_IMAGE: sipClass = sipClass_HYDROData_Image; break; case KIND_POLYLINEXY: sipClass = sipClass_HYDROData_PolylineXY; break; case KIND_BATHYMETRY: sipClass = sipClass_HYDROData_Bathymetry; break; case KIND_IMMERSIBLE_ZONE: sipClass = sipClass_HYDROData_ImmersibleZone; break; case KIND_CALCULATION: sipClass = sipClass_HYDROData_CalculationCase; break; case KIND_OBSTACLE: sipClass = sipClass_HYDROData_Obstacle; break; case KIND_REGION: sipClass = sipClass_HYDROData_Region; break; case KIND_ZONE: sipClass = sipClass_HYDROData_Zone; break; case KIND_UNKNOWN: sipClass = sipClass_HYDROData_Entity; break; default: // We don't recognise the type. sipClass = NULL; } %End public: /** * Returns the kind of this object. Must be redefined in all objects of known type. */ virtual const ObjectKind GetKind() const; /** * Returns the name of this object. */ virtual QString GetName() const; /** * Updates the name of this object. */ virtual void SetName(const QString& theName); /** * Updates object state. */ virtual void Update(); /** * Checks is object exists in the data structure. * \returns true is object is not exists in the data model */ bool IsRemoved() const; /** * Removes object from the data structure. */ void Remove(); /** * Returns unique integer identifier of the object (may be used for ordering of objects) */ int ID() const; /** * Copies all properties of this to the destinated object. * Objects must be the same type. * \param theDestination initialized object (from any document) - target of copying */ /* void CopyTo( HYDROData_Entity theDestination ) const; */ protected: /** * Creates new object in the internal data structure. Use higher level objects * to create objects with real content. */ HYDROData_Entity(); /** * Destructs properties of the object and object itself, removes it from the document. */ virtual ~HYDROData_Entity(); };