Salome HOME
#19007 [CEA][Windows] SALOME non regression tests on Windows: fix KERNEL_SALOME_COMMA...
[modules/kernel.git] / idl / SALOMEDS.idl
index d43d58e835897ed3017d7cf0cde8cda65b17faad..b6c4dcf2b47936ba97f254cac3ee8c60bc38fa4c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020  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
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -41,7 +41,7 @@ module SALOMEDS
 {
 /*! \brief Name of the file in which the %Study is saved.
 */
 {
 /*! \brief Name of the file in which the %Study is saved.
 */
-  typedef string URLPath;
+  typedef wstring URLPath;
 
 /*! \brief Main identifier of an object in %SALOME application
 */
 
 /*! \brief Main identifier of an object in %SALOME application
 */
@@ -55,6 +55,8 @@ module SALOMEDS
 */
   typedef string SalomeReference;
 
 */
   typedef string SalomeReference;
 
+//! List of file names
+  typedef sequence<string> ListOfFileNames;
 //! List of modification dates of a study
   typedef sequence<string> ListOfDates ;
 //! An unbounded sequence of strings
 //! List of modification dates of a study
   typedef sequence<string> ListOfDates ;
 //! An unbounded sequence of strings
@@ -125,6 +127,7 @@ module SALOMEDS
 
 */
     SComponent NewComponent(in string ComponentDataType) raises(LockProtection);
 
 */
     SComponent NewComponent(in string ComponentDataType) raises(LockProtection);
+
 /*! \brief Definition of the instance to the %SComponent
 
     Defines the instance to the %SComponent.
 /*! \brief Definition of the instance to the %SComponent
 
     Defines the instance to the %SComponent.
@@ -238,15 +241,6 @@ module SALOMEDS
 
     void RemoveReference(in SObject anObject) ;
 
 
     void RemoveReference(in SObject anObject) ;
 
-/*!
-   Adds a directory in the %Study.
-   \param theName String parameter defining the name of the directory.
-
-<em>See \ref example23 for an example of this method usage in batchmode of %SALOME application.</em>
-
-*/
-    void AddDirectory(in string theName) raises(LockProtection);
-
 /*! \brief Identification of the %SObject's substructure.
 
       Identification of the %SObject's substructure by GUID.
 /*! \brief Identification of the %SObject's substructure.
 
       Identification of the %SObject's substructure by GUID.
@@ -255,8 +249,7 @@ module SALOMEDS
       \param anObject The %SObject which will be identified
       \param theGUID GUID has the following format "00000000-0000-0000-0000-000000000000"
 */
       \param anObject The %SObject which will be identified
       \param theGUID GUID has the following format "00000000-0000-0000-0000-000000000000"
 */
-
-     void SetGUID(in SObject anObject, in string theGUID) raises(LockProtection);
+    void SetGUID(in SObject anObject, in string theGUID) raises(LockProtection);
 /*!
 Searches for a definite %SObject with a definite GUID and returns True if it finds it.
 
 /*!
 Searches for a definite %SObject with a definite GUID and returns True if it finds it.
 
@@ -287,7 +280,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
     Returns True if at this moment there is a command under execution.
 */
     boolean HasOpenCommand();
     Returns True if at this moment there is a command under execution.
 */
     boolean HasOpenCommand();
-/*! \brief Cancelation of the command
+/*! \brief Cancellation of the command
 
     Cancels all actions declared within the command.
 
 
     Cancels all actions declared within the command.
 
@@ -379,8 +372,6 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 
 //! Invalid study reference
     exception StudyInvalidReference {};
 
 //! Invalid study reference
     exception StudyInvalidReference {};
-//! Invalid study context
-    exception StudyInvalidContext {};
 //! Invalid study component
     exception StudyInvalidComponent {};
 //! Invalid directory of the %study exception
 //! Invalid study component
     exception StudyInvalidComponent {};
 //! Invalid directory of the %study exception
@@ -393,7 +384,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
     exception StudyNameError {};
 //! Invalid study comment
     exception StudyCommentError {};
     exception StudyNameError {};
 //! Invalid study comment
     exception StudyCommentError {};
-    
+
 /*!
     Determines whether the server has already been loaded or not.
 */
 /*!
     Determines whether the server has already been loaded or not.
 */
@@ -413,14 +404,15 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 
    This is equivalent to the methods setName() & getName()
 */
 
    This is equivalent to the methods setName() & getName()
 */
-    readonly attribute string Name; // equivalent to getName()
+    attribute wstring Name; // equivalent to getName()
+
+/*! \brief  Indicate the file where the %study has been saved
+*/
 
 //! Sequence containing %SObjects
     typedef sequence<SObject> ListOfSObject;
 //!  Get the persistent reference to the %Study.
     PersistentReference  GetPersistentReference() raises(StudyInvalidReference);
 
 //! Sequence containing %SObjects
     typedef sequence<SObject> ListOfSObject;
 //!  Get the persistent reference to the %Study.
     PersistentReference  GetPersistentReference() raises(StudyInvalidReference);
-//! Get a transient reference to the %Study.
-    SalomeReference      GetTransientReference() raises(StudyInvalidReference);
 
 /*! \brief indicate whether the %Study is empty
 
 
 /*! \brief indicate whether the %Study is empty
 
@@ -482,38 +474,6 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 */
     string GetObjectPath(in Object theObject) raises(StudyInvalidReference);
 
 */
     string GetObjectPath(in Object theObject) raises(StudyInvalidReference);
 
-/*! \brief  Set the context of the %Study.
-
-    \param thePath String parameter defining the context of the study.
-
-<em>See \ref example23 for an example of this method usage in batchmode of %SALOME application.</em>
-*/
-    void SetContext(in string thePath) raises (StudyInvalidReference, StudyInvalidContext);
-/*!  \brief Get the context of the %Study.
-
-<em>See \ref example23 for an example of this method usage in batchmode of %SALOME application.</em>
-*/
-    string GetContext() raises (StudyInvalidReference, StudyInvalidContext);
-/*!  \brief Get a list of names of objects corresponding to the context.
-
-   \note  If the parameter <VAR>theContext</VAR> is empty, then the current context will be used.
-*/
-    ListOfStrings GetObjectNames(in string theContext) raises (StudyInvalidReference, StudyInvalidContext);
-/*! \brief Get a list of names of directories and subdirectories corresponding to the context.
-
-   \note  If the parameter <VAR>theContext</VAR> is empty, then the current context will be used.
-*/
-    ListOfStrings GetDirectoryNames(in string theContext) raises (StudyInvalidReference, StudyInvalidContext);
-/*! \brief  Get a list of names of Files corresponding to the context.
-
-    \note  If the parameter <VAR>theContext</VAR> is empty, then the current context will be used.
-*/
-    ListOfStrings GetFileNames(in string theContext) raises (StudyInvalidReference, StudyInvalidContext);
-/*! \brief Get a list of names of Components corresponding to the context.
-
-   \note  If the parameter <VAR>theContext</VAR> is empty, then the current context will be used.
-*/
-    ListOfStrings GetComponentNames(in string theContext) raises(StudyInvalidReference);
 /*!  \brief Create a new iterator of child levels of the given %SObject.
 
     \param aSO The given %SObject
 /*!  \brief Create a new iterator of child levels of the given %SObject.
 
     \param aSO The given %SObject
@@ -563,7 +523,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 
 /*! \brief  Indicate the file where the %study has been saved
 */
 
 /*! \brief  Indicate the file where the %study has been saved
 */
-    attribute string URL;
+    attribute wstring URL;
 
 /*! \brief List of %SObjects
 
 
 /*! \brief List of %SObjects
 
@@ -598,7 +558,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 /*! \brief Get a new %UseCaseBuilder.
 */
     UseCaseBuilder  GetUseCaseBuilder() raises(StudyInvalidReference);
 /*! \brief Get a new %UseCaseBuilder.
 */
     UseCaseBuilder  GetUseCaseBuilder() raises(StudyInvalidReference);
-    
+
 /*! \brief Clear a study object
 */
     void Clear() raises(StudyInvalidReference);
 /*! \brief Clear a study object
 */
     void Clear() raises(StudyInvalidReference);
@@ -606,50 +566,42 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 /*! \brief Initialization a study object
 */
     void Init() raises(StudyInvalidReference);
 /*! \brief Initialization a study object
 */
     void Init() raises(StudyInvalidReference);
-    
+
 /*! \brief Open a study by url
 
     Reads and activates the structure of the study %Objects.
     \param aStudyUrl The path to the study
 */
     boolean Open (in URLPath aStudyUrl) raises (SALOME::SALOME_Exception);
 /*! \brief Open a study by url
 
     Reads and activates the structure of the study %Objects.
     \param aStudyUrl The path to the study
 */
     boolean Open (in URLPath aStudyUrl) raises (SALOME::SALOME_Exception);
-    
-/*! \brief Saving the study in a HDF file (or files).
 
 
-    Saves a study.
-    \param theMultiFile If this parameter is True the study will be saved in several files.
+/*! \brief Check if study can be opened
+
+    Tries to open and read given url.
+    \param aStudyUrl The path to the study
 */
 */
-    boolean Save(in boolean theMultiFile) raises(StudyInvalidReference);
-    
-/*! \brief Saving a study in a ASCII file (or files).
+    boolean CanOpen (in URLPath aStudyUrl);
+
+/*! \brief Saving the study in a file (or files).
 
 
-    Saves a study in an ASCII format file (or files).
+    Saves a study.
     \param theMultiFile If this parameter is True the study will be saved in several files.
     \param theMultiFile If this parameter is True the study will be saved in several files.
+    \param theASCII If this parameter is True the study will be saved in ASCII format, otherwise in HDF format.
 */
 */
-    boolean  SaveASCII(in boolean theMultiFile) raises(StudyInvalidReference);
-/*! \brief Saving the study in a specified HDF file (or files).
+    boolean Save(in boolean theMultiFile, in boolean theASCII) raises(StudyInvalidReference);
+
+/*! \brief Saving the study in a specified file (or files).
 
     Saves the study in a specified file (or files).
 
     Saves the study in a specified file (or files).
-    \param aUrl The path to the definite file in whcih the study will be saved
-    \param aStudy The study which will be saved
+    \param aUrl The path to the definite file in which the study will be saved
     \param theMultiFile If this parameter is True the study will be saved in several files.
     \param theMultiFile If this parameter is True the study will be saved in several files.
+    \param theASCII If this parameter is True the study will be saved in ASCII format, otherwise in HDF format.
 
 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
 */
     boolean  SaveAs(in URLPath aUrl, // if the file already exists
 
 <em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
 */
     boolean  SaveAs(in URLPath aUrl, // if the file already exists
-                    in boolean theMultiFile) // overwrite (as option)
-                    raises(StudyInvalidReference); 
-/*! \brief Saving the study in a specified ASCII file (or files).
-
-    Saves the study in a specified ASCII file (or files).
-
-    \param aUrl The path to the definite file in whcih the study will be saved
-    \param aStudy The study which will be saved
-    \param theMultiFile If this parameter is True the study will be saved in several files.
-*/
-    boolean  SaveAsASCII(in URLPath aUrl, // if the file already exists
-                         in boolean theMultiFile) // overwrite (as option)
-                         raises(StudyInvalidReference); 
+                    in boolean theMultiFile, // overwrite (as option)
+                    in boolean theASCII)
+                    raises(StudyInvalidReference);
 /*!
     Returns True, if the given %SObject can be copied to the clipboard.
 */
 /*!
     Returns True, if the given %SObject can be copied to the clipboard.
 */
@@ -692,6 +644,10 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
                       in boolean isPublished,
                       in boolean isMultiFile) raises(StudyInvalidReference);
 
                       in boolean isPublished,
                       in boolean isMultiFile) raises(StudyInvalidReference);
 
+/*! \brief  Returns the folder of the python script which is currently dumped.
+*/
+    string GetDumpPath();
+
 /*! \brief  Get an AttributeParameter used to store common parameters for given %theSavePoint.
 
     \param theID identifies a common parameters set (Example: "Interface Applicative")
 /*! \brief  Get an AttributeParameter used to store common parameters for given %theSavePoint.
 
     \param theID identifies a common parameters set (Example: "Interface Applicative")
@@ -982,11 +938,6 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 */
     ListOfAttributes     GetAllAttributes();
 
 */
     ListOfAttributes     GetAllAttributes();
 
-/*! Gets the study of a given %SObject.
-    \return The study containing the given %SObject.
-*/
-    Study GetStudy();
-
 /*! Gets the CORBA object by its own IOR attribute.
     Returns nil, if can't.
     \return The CORBA object of the %SObject.
 /*! Gets the CORBA object by its own IOR attribute.
     Returns nil, if can't.
     \return The CORBA object of the %SObject.
@@ -1215,6 +1166,10 @@ Activates the %UseCaseIterator.
    Adds a child object <VAR>theObject</VAR> to the given father <VAR>theFather</VAR> object in the use case.
 */
     boolean AppendTo(in SObject theFather, in SObject theObject);
    Adds a child object <VAR>theObject</VAR> to the given father <VAR>theFather</VAR> object in the use case.
 */
     boolean AppendTo(in SObject theFather, in SObject theObject);
+/*!
+    Return index of a child among father children
+*/
+    long GetIndexInFather(in SObject theFather, in SObject theObject);
 /*!
     Inserts in the use case the object <VAR>theFirst</VAR> before the object <VAR>theNext</VAR>.
 */
 /*!
     Inserts in the use case the object <VAR>theFirst</VAR> before the object <VAR>theNext</VAR>.
 */
@@ -1276,7 +1231,7 @@ can be called by any component and which provide the following functionality:
 <ul>
     <li> publishing in the study of the objects created by a definite component
     <li> saving/loading of the data created by a definite component. These methods are called when loading/saving a study containing the data created by a definite component.
 <ul>
     <li> publishing in the study of the objects created by a definite component
     <li> saving/loading of the data created by a definite component. These methods are called when loading/saving a study containing the data created by a definite component.
-    <li> transforming of the transient references into persistant references (or vice versa) of the SObjects when saving (or loading) a study
+    <li> transforming of the transient references into persistent references (or vice versa) of the SObjects when saving (or loading) a study
     <li> copy/paste common functionality. These methods can be called by any component in order to copy/paste its object created in the study
 </ul>
 
     <li> copy/paste common functionality. These methods can be called by any component in order to copy/paste its object created in the study
 </ul>