Salome HOME
Small correction for writing of data to file.
[modules/hydro.git] / src / HYDROData / HYDROData_Object.h
index f4b30d7076e29afafa161007657ad784a910b28d..84d601560fd18e115f06b38d1bb6c3cbfe396bb6 100644 (file)
@@ -5,7 +5,10 @@
 
 #include <NCollection_Sequence.hxx>
 #include <TDF_Label.hxx>
-#include <QString>
+#include <QMap>
+
+class QString;
+class QStringList;
 
 ///! Kind of an object in a document
 typedef int ObjectKind;
@@ -13,9 +16,13 @@ typedef int ObjectKind;
 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;
 
 DEFINE_STANDARD_HANDLE(HYDROData_Object, MMgt_TShared)
 
+typedef QMap<QString,Handle(Standard_Transient)> MapOfTreatedObjects;
+
 /**\class HYDROData_Object
  * \brief Generic class of any object in the data model.
  *
@@ -25,6 +32,16 @@ DEFINE_STANDARD_HANDLE(HYDROData_Object, MMgt_TShared)
  */
 class HYDROData_Object : public MMgt_TShared
 {
+protected:
+  /**
+   * Enumeration of tags corresponding to the persistent object parameters.
+   */
+  enum DataTag
+  {
+    DataTag_First = 0     ///< first tag, to reserve
+    // ...
+  };
+
 public:
   DEFINE_STANDARD_RTTI(HYDROData_Object);
 
@@ -44,16 +61,12 @@ public:
   HYDRODATA_EXPORT void SetName(const QString& theName);
 
   /**
-   * Returns the object visibility state.
-   * \returns visibility state
-   */
-  HYDRODATA_EXPORT bool GetVisibility() const;
-
-  /**
-   * Sets the object visibility state.
-   * \param theState visibility state
+   * Dump object to Python script representation.
+   * Base implementation returns empty list,
+   * You should reimplement this function in your derived class if it
+   * has Python API and can be imported/exported from/to Python script.
    */
-  HYDRODATA_EXPORT void SetVisibility(bool theState);
+  HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
 
   /**
    * Checks is object exists in the data structure.