Salome HOME
Initial merge of branch 'BR_HYDRO_IMPS_2016' into BR_PORTING_OCCT_7
[modules/hydro.git] / src / HYDROData / HYDROData_Profile.h
index f1f5238076afee17d34b514fcfd36118348b99f5..198cb2411208435553bdcb8ad047f72cc0ddcb9e 100644 (file)
 #define HYDROData_Profile_HeaderFile
 
 #include "HYDROData_Object.h"
-
 #include "HYDROData_ProfileUZ.h"
 
-DEFINE_STANDARD_HANDLE(HYDROData_Profile, HYDROData_Object)
-
 class gp_XYZ;
 class OSD_File;
-class Handle(HYDROData_Document);
+class HYDROData_Document;
 
 /**\class HYDROData_Profile
  * \brief Class that stores/retreives information about the profile.
@@ -53,7 +50,7 @@ protected:
   };
 
 public:
-  DEFINE_STANDARD_RTTI(HYDROData_Profile);
+  DEFINE_STANDARD_RTTIEXT(HYDROData_Profile, HYDROData_Object);
 
   /**
    * Returns the kind of this object. Must be redefined in all objects of known type.
@@ -63,7 +60,8 @@ 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 ) const;
 
   /**
    * Returns the top shape of the object.
@@ -226,7 +224,8 @@ public:
    */
   HYDRODATA_EXPORT static int ImportFromFile( const Handle(HYDROData_Document)& theDoc,
                                                const TCollection_AsciiString&    theFileName,
-                                               NCollection_Sequence<int>&        theBadProfilesIds );
+                                               NCollection_Sequence<int>&        theBadProfilesIds,
+                                               bool isToProject = true );
 
   /**
    * Imports Profile data from file.
@@ -235,7 +234,8 @@ public:
    * \return \c true if file has been successfully read
    */
   HYDRODATA_EXPORT virtual bool ImportFromFile( const TCollection_AsciiString& theFileName,
-                                                bool*                          theIsRead = 0 );
+                                                bool isToProject = true,
+                                                bool* isNotEmpty = 0 );
 
   /**
    * Imports Profile data from file. 
@@ -244,7 +244,8 @@ public:
    * \return \c true if file has been successfully read
    */
   HYDRODATA_EXPORT virtual bool ImportFromFile( OSD_File& theFile,
-                                                bool*      theIsRead = 0 );
+                                                bool isToProject = true,
+                                                bool* isNotEmpty = 0 );
 
 protected:
   /**
@@ -255,6 +256,8 @@ protected:
 
   TopoDS_Shape CreateProfileWire( bool canUseDefaultPoints ) const;
 
+  static void ProjectProfilePoints( ProfilePoints& thePoints );
+
 protected:
 
   friend class HYDROData_Iterator;