Salome HOME
Small correction for writing of data to file.
[modules/hydro.git] / src / HYDROData / HYDROData_Object.h
index e5bfa5fb2945a3337fd4d9f5f465d4d5af1a454d..84d601560fd18e115f06b38d1bb6c3cbfe396bb6 100644 (file)
@@ -6,7 +6,9 @@
 #include <NCollection_Sequence.hxx>
 #include <TDF_Label.hxx>
 #include <QMap>
-#include <QString>
+
+class QString;
+class QStringList;
 
 ///! Kind of an object in a document
 typedef int ObjectKind;
@@ -19,6 +21,8 @@ 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.
  *
@@ -56,6 +60,14 @@ public:
    */
   HYDRODATA_EXPORT void SetName(const QString& theName);
 
+  /**
+   * 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 virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
+
   /**
    * Checks is object exists in the data structure.
    * \returns true is object is not exists in the data model