Salome HOME
export of 3D poly to SHP (lot 5)
[modules/hydro.git] / src / HYDROData / HYDROData_Entity.h
index 7042b8d06db4731f66b1c9ab1a60c16c27a1b02a..f55fa33acf5ecbc56ec86ecb009dceea6cc8e6c2 100644 (file)
 #include <QMap>
 #include <QString>
 #include <Standard_Type.hxx>
+#include <MMgt_TShared.hxx>
+
+#ifdef NONLS
+#undef NONLS
+#endif
+
+#ifdef NOMINMAX
+#undef NOMINMAX
+#endif
 
 class QColor;
 class QVariant;
@@ -67,7 +76,8 @@ const ObjectKind KIND_LAND_COVER_OBSOLETE = 27;
 const ObjectKind KIND_CHANNEL_ALTITUDE    = 28;
 const ObjectKind KIND_LAND_COVER_MAP      = 29;
 const ObjectKind KIND_DTM                 = 30;
-const ObjectKind KIND_LAST                = KIND_DTM;
+const ObjectKind KIND_BC_POLYGON          = 31;
+const ObjectKind KIND_LAST                = KIND_BC_POLYGON+1;
 
 class MapOfTreatedObjects : public QMap<QString,Handle(Standard_Transient)>
 {
@@ -121,6 +131,9 @@ public:
 public:
   DEFINE_STANDARD_RTTIEXT(HYDROData_Entity, MMgt_TShared);
 
+  HYDRODATA_EXPORT static QString Type( ObjectKind );
+  HYDRODATA_EXPORT virtual QString GetType() const;
+
   /**
    * Returns the kind of this object. Must be redefined in all objects of known type.
    */
@@ -283,6 +296,14 @@ public:
    * \param theDefColor default color to return if attribute has not been set before
    */
   HYDRODATA_EXPORT QColor GetColor( const QColor& theDefColor, const int theTag = 0 ) const;
+
+  /* Internal method that used to retreive the color attribute
+    * \param theTag tag of a label that keeps the attribute (for 0 this is myLab)
+   * \param theOutColor color to return if attribute has been set before
+   * \return true if attribute is present
+   */
+  HYDRODATA_EXPORT bool GetColor( QColor& theOutColor,
+                                  const int     theTag ) const;
  
 protected: