Salome HOME
Calcium and Palm ok
[modules/kernel.git] / idl / SALOMEDS.idl
index 15e6511642f67b5d8504422b921208160f70e544..ea9c11942bc9300b1002f971573526b87bb152ae 100644 (file)
@@ -15,7 +15,7 @@
 //  License along with this library; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
@@ -24,7 +24,7 @@
 //  $Header$
 
 /*! \mainpage
-    \image html Application-About.png
+    \image html Application-About1.jpg
 */
 
 /*!
@@ -36,6 +36,7 @@
 #define _SALOMEDS_IDL_
 
 #include "SALOME_Exception.idl"
+#include "SALOME_GenericObj.idl"
 
 /*!
      This package contains the interfaces used for creation, managment
@@ -96,9 +97,9 @@ during each working session.
   interface ChildIterator;
   interface Driver;
   interface AttributeStudyProperties;
+  interface AttributeParameter;
   interface UseCaseIterator;
   interface UseCaseBuilder;
-  interface Callback;
 
 /*! List of attributes of %SObjects
 */
@@ -172,7 +173,7 @@ during each working session.
    \param aComponentName    It's a string value in the Comment Attribute of the Component,
     which is looked for, defining the data type of this Component.
 
-<BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 */
     SComponent FindComponent  (in string aComponentName);
 /*!
@@ -185,7 +186,7 @@ during each working session.
     \param anObjectName String parameter defining the name of the object
     \return The obtained %SObject
 
-<BR><VAR>See also <A href=exemple/Example19.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     SObject       FindObject      (in string anObjectName);
@@ -233,14 +234,14 @@ during each working session.
     Sets the context of the %Study.
     \param thePath String parameter defining the context of the study.
 
-<BR><VAR>See also <A href=exemple/Example23.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example23.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     void SetContext(in string thePath);
 /*!
     Gets the context of the %Study.
     
-<BR><VAR>See also <A href=exemple/Example23.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example23.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     string GetContext();
@@ -282,7 +283,7 @@ during each working session.
 
    \return A new %StudyBuilder.
 
-<BR><VAR>See also <A href=exemple/Example20.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example20.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     StudyBuilder NewBuilder() ;
@@ -296,7 +297,7 @@ during each working session.
 
    Returns the attriubte, which contains the properties of this study.
 
-<BR><VAR>See also <A href=exemple/Example20.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example20.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     AttributeStudyProperties GetProperties();
@@ -367,6 +368,64 @@ during each working session.
     void RemovePostponed(in long theUndoLimit);
 
     void UndoPostponed(in long theWay);
+
+    boolean DumpStudy(in string thePath, in string theBaseName, in boolean isPublished);
+
+/*!
+    Returns an AttributeParameter used to store common parameters for given %theSavePoint.
+    \param theID identifies a common parameters set (Example: "Interface Applicative")
+    \param theSavePoint is number of a set of parameters as there can be several sets
+*/
+    AttributeParameter GetCommonParameters(in string theID, in long theSavePoint);
+
+/*!
+    Returns an AttributeParameter used to store parameters for given %theModuleName.
+    \param theID identifies a common parameters set (Example: "Interface Applicative")
+    \param theModuleName is a name of the module (Example: "Geometry")
+    \param theSavePoint is number of a set of parameters as there can be several sets
+*/
+    AttributeParameter GetModuleParameters(in string theID, in string theModuleName, in long theSavePoint);
+
+
+/*!
+    Returns a default Python script to restore visual parameters for given %theModuleName.
+    \param theID identifies a common parameters set (Example: "Interface Applicative")
+    \param theModuleName is a name of the module (Example: "Geometry")
+*/
+    string GetDefaultScript(in string theID, in string theModuleName);
+
+/*!
+    Private method, returns an implementation of this Study.
+   \param theHostname is a hostname of the caller
+   \param thePID is a process ID of the caller
+   \param isLocal is set True if the Study is launched locally with the caller
+*/
+    long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
+
+
+/*!
+    Marks this Study as being locked by the given locker. The lock status can be checked by method IsStudyLocked
+    \param theLockerID identifies a locker of the study can be for ex. IOR of the engine that locks the study.
+*/
+    void SetStudyLock(in string theLockerID);
+
+/*!
+    Returns True if the Study was marked locked. 
+*/
+    boolean IsStudyLocked();
+
+/*!
+    Marks this Study as being unlocked by the given locker. The lock status can be checked by method IsStudyLocked
+    \param theLockerID identifies a locker of the study can be for ex. IOR of the engine that unlocks the study.
+*/
+    void UnLockStudy(in string theLockerID);
+
+/*!
+    Returns the list iof IDs of the Study's lockers. 
+*/
+    ListOfStrings GetLockerID();
+
+
   };
 
   //==========================================================================
@@ -394,7 +453,7 @@ during each working session.
    Creates a new %SComponent
    \param ComponentDataType    Data type of the %SComponent which will be created.
 
-<BR><VAR>See also <A href=exemple/Example17.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     SComponent NewComponent(in string ComponentDataType) raises(LockProtection);
@@ -403,6 +462,7 @@ during each working session.
     Defines the instance to the %SComponent.
 */
     void       DefineComponentInstance (in SComponent aComponent,in Object ComponentIOR) raises(LockProtection);
+        
 /*! \brief Deletion of a %SComponent
 
   Removes a %SComponent.
@@ -416,7 +476,7 @@ during each working session.
    \param theFatherObject The father %SObject under which this one should be created.
    \return New %SObject
 
-<BR><VAR>See also <A href=exemple/Example18.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example18.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
 
@@ -449,7 +509,7 @@ during each working session.
 /*!
    Loads a %SComponent.
 
-<BR><VAR>See also <A href=exemple/Example19.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     void  LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception);
@@ -466,7 +526,7 @@ during each working session.
     \param anObject        The %SObject corresponding to the attribute which is looked for.
     \param aTypeOfAttribute     Type of the attribute.
 
-  <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+  <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 */
 
     GenericAttribute FindOrCreateAttribute(in  SObject        anObject,
@@ -490,7 +550,7 @@ during each working session.
     \param anObject        The %SObject corresponding to the attribute.
     \param aTypeOfAttribute     Type of the attribute.
 
-<BR><VAR>See also <A href=exemple/Example17.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 */
     void RemoveAttribute(in  SObject        anObject,
                         in  string         aTypeOfAttribute) raises(LockProtection);
@@ -514,7 +574,7 @@ during each working session.
    Adds a directory in the %Study.
    \param theName String parameter defining the name of the directory.
 
-<BR><VAR>See also <A href=exemple/Example23.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example23.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     void AddDirectory(in string theName) raises(LockProtection);
@@ -541,7 +601,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 
    Creates a new command which can contain several different actions.
    
-<BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     void NewCommand(); // command management
@@ -551,7 +611,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 
    \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
 
-<BR><VAR>See also <A href=exemple/Example16.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example16.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     void CommitCommand() raises(LockProtection); // command management
@@ -563,7 +623,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 
     Cancels all actions declared within the command.
     
-<BR><VAR>See also <A href=exemple/Example17.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 */
     void AbortCommand(); // command management
 /*! \brief Undolimit
@@ -577,7 +637,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 
     \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
 
-<BR><VAR>See also <A href=exemple/Example16.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example16.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     void Undo() raises (LockProtection);
@@ -587,40 +647,24 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 
 \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
 
- <BR><VAR>See also <A href=exemple/Example16.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+ <BR><VAR>See also <A href="exemple/Example16.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     void Redo() raises (LockProtection);
 /*!
     Returns True if at this moment there are any actions which can be canceled.
     
-   <BR><VAR>See also <A href=exemple/Example16.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+   <BR><VAR>See also <A href="exemple/Example16.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     boolean GetAvailableUndos();
 /*!
     Returns True if at this moment there are any actions which can be redone.
 
-   <BR><VAR>See also <A href=exemple/Example3.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+   <BR><VAR>See also <A href="exemple/Example3.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     boolean GetAvailableRedos();
-/*!
-    This method is called when adding an object into study.
-    It sets the callback for addition of the given %SObject.
-    \param theCallback New assigned callback.
-    \return The previous callback.
-*/
-    Callback SetOnAddSObject(in Callback theCallback);
-/*!
-    This method is called when adding an object into study.
-    It sets the callback for removal of the given %SObject.
-
-    \return The previous callback.
-    \param theCallback New assigned callback.
-*/
-    Callback SetOnRemoveSObject(in Callback theCallback);
-
 /*!
     Puts name attribute with the given string value to the given %SObject
 
@@ -670,7 +714,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 
      \param study_name String parameter defining the name of the study
 
-<BR><VAR>See also <A href=exemple/Example17.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     Study NewStudy(in string study_name);
@@ -681,7 +725,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
      \param aStudyUrl The path to the study
     \warning This method doesn't activate the corba objects. Only a component can do it.
 
-<BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 */
     Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception);
 
@@ -696,16 +740,16 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
 
     \param theMultiFile If this parameter is True the study will be saved in several files.
 
-<BR><VAR>See also <A href=exemple/Example19.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
-    void  Save(in  Study aStudy, in boolean theMultiFile);
+    boolean  Save(in  Study aStudy, in boolean theMultiFile);
 /*! \brief Saving a study in a ASCII file (or files).
 
     Saves a study in an ASCII format file (or files).
     \param theMultiFile If this parameter is True the study will be saved in several files.
 */
-    void  SaveASCII(in  Study aStudy, in boolean theMultiFile);
+    boolean  SaveASCII(in  Study aStudy, in boolean theMultiFile);
 /*! \brief Saving the study in a specified HDF file (or files).
 
     Saves the study in a specified file (or files).
@@ -713,9 +757,9 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
     \param aStudy The study which will be saved
     \param theMultiFile If this parameter is True the study will be saved in several files.
 
- <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+ <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 */
-    void  SaveAs(in URL   aUrl, // if the file already exists
+    boolean  SaveAs(in URL   aUrl, // if the file already exists
                in Study aStudy,
                in boolean theMultiFile); // overwrite (as option)
 /*! \brief Saving the study in a specified ASCII file (or files).
@@ -726,7 +770,7 @@ Searches for a definite %SObject with a definite GUID and returns True if it fin
     \param aStudy The study which will be saved
     \param theMultiFile If this parameter is True the study will be saved in several files.
 */
-    void  SaveAsASCII(in URL   aUrl, // if the file already exists
+    boolean  SaveAsASCII(in URL   aUrl, // if the file already exists
                      in Study aStudy,
                      in boolean theMultiFile); // overwrite (as option)
 
@@ -778,6 +822,29 @@ Gets the list of open studies
     an object into a study, which is protected for modifications.
 */
     SObject Paste(in SObject theObject) raises (SALOMEDS::StudyBuilder::LockProtection);
+
+/*! \brief Object conversion.
+
+    Converts an object into IOR.
+    \return    IOR
+*/
+    string ConvertObjectToIOR(in Object theObject);
+/*! \brief Object conversion.
+           
+    Converts IOR into an object.
+    \return    An object
+*/
+    Object ConvertIORToObject(in string theIOR); 
+
+/*!
+    Private method, returns an implementation of this StudyManager.
+   \param theHostname is a hostname of the caller
+   \param thePID is a process ID of the caller
+   \param isLocal is set True if the StudyManager is launched locally with the caller
+*/
+    long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal); 
+
+
   };
 
 
@@ -795,7 +862,7 @@ Gets the list of open studies
 */
   //==========================================================================
 
-  interface SObject
+  interface SObject : SALOME::GenericObj
   {
 /*! Name of the %SObject
 */
@@ -837,7 +904,7 @@ Gets the list of open studies
    \param aTypeOfAttribute String value defining the type of the required attribute of the given %SObject.
    \return True if it finds an attribute of a definite type of the given %SObject as well as the discovered attribute.
 
-<BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 */
     boolean FindAttribute(out GenericAttribute anAttribute,
                                  in  string         aTypeOfAttribute);
@@ -851,20 +918,20 @@ Gets the list of open studies
 
     \return The list of all attributes of the given %SObject.
 
-<BR><VAR>See also <A href=exemple/Example17.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     ListOfAttributes     GetAllAttributes();
 /*! Gets the study of a given %SObject.
 
-    /return The study containing the 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.
+    \return The CORBA object of the %SObject.
 */
     Object GetObject();
 
@@ -885,6 +952,14 @@ Gets the list of open studies
     Returns empty string if there is no IOR attribute.
 */
     string GetIOR();
+
+/*!
+    Private method, returns an implementation of this SObject.
+   \param theHostname is a hostname of the caller
+   \param thePID is a process ID of the caller
+   \param isLocal is set True if the SObject is launched locally with the caller
+*/
+    long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
   };
 
 
@@ -894,7 +969,7 @@ Gets the list of open studies
    %Generic attribute is a base interface for all attributes which can be assigned to the SObjects created in the study.
 */
   //==========================================================================
-  interface GenericAttribute
+  interface GenericAttribute : SALOME::GenericObj
   {
 /*! \brief Exception locking all changes
 
@@ -909,13 +984,19 @@ Gets the list of open studies
 */
     void CheckLocked() raises (LockProtection);
 
-    string Store();
-
-    void Restore(in string theData);
-
     string Type();
 
+    string GetClassType();     
+       
     SObject GetSObject();
+
+/*!
+    Private method, returns an implementation of this GenericAttribute.
+   \param theHostname is a hostname of the caller
+   \param thePID is a process ID of the caller
+   \param isLocal is set True if the GenericAttribute is launched locally with the caller
+*/
+    long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
   };
 
 
@@ -951,7 +1032,7 @@ Gets the list of open studies
   The search is started from the first %SComponent in the list.
 */
   //==========================================================================
-  interface SComponentIterator
+  interface SComponentIterator : SALOME::GenericObj
   {
 /*!
 Activates the %SComponentIterator.
@@ -969,7 +1050,7 @@ Moves the iterator to the next %SComponent in the list.
 /*!
     Returns the %SComponent corresponding to the current %SComponent found by the iterator.
 
- <BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+ <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
 */
     SComponent Value();
@@ -982,7 +1063,7 @@ Moves the iterator to the next %SComponent in the list.
     levels.
 */
   //==========================================================================
-  interface ChildIterator
+  interface ChildIterator : SALOME::GenericObj
   {
 /*!
 
@@ -1017,7 +1098,7 @@ Activates the %ChildIterator for all child levels.
 
    This interface contains a set of methods used for iteration over the objects in the use case.
 */
-  interface UseCaseIterator
+  interface UseCaseIterator : SALOME::GenericObj
   {
 /*!
 Activates the %UseCaseIterator.
@@ -1046,7 +1127,7 @@ Activates the %UseCaseIterator.
    Use case in the study represents a user-managed subtree, containing all or some of the objects which exist in the study.
    The %UseCaseBuilder interface contains a set of methods used for management of the use case in the study.
 */
-  interface UseCaseBuilder
+  interface UseCaseBuilder : SALOME::GenericObj
   {
 /*!
    Adds to the use case an object as a child of the current object of the use case.
@@ -1108,25 +1189,6 @@ Activates the %UseCaseIterator.
     UseCaseIterator GetUseCaseIterator(in SObject theObject);
   };
   //==========================================================================
-  //==========================================================================
-/*! \brief The callback interface
-
-  The %StudyBuilder can be created with the method <VAR>NewBuilder</VAR>. While invocation of this method a new object of the class <VAR>Callback</VAR> is created
-  and this object is assigned to the newly created Builder as callback which should be called when adding and removing of the ojects.
-*/
-  interface Callback
-  {
-/*!
-     Invokes the corresponding method <VAR>Append</VAR> of the %UseCaseBuilder.
-*/
-     void OnAddSObject(in SObject theObject);
-/*!
-     Invokes the corresponding method <VAR>Remove</VAR> of the %UseCaseBuilder.
-*/
-     void OnRemoveSObject(in SObject theObject);
-  };
-
-  //==========================================================================
 /*! \brief %Driver interface
 
 This class represents a common tool for all components integrated into SALOME application, that allows them to communicate with the study. It contains a set of methods which
@@ -1151,7 +1213,7 @@ can be called by any component and which provide the following functionality:
        \param isMultiFile  If the value of this boolean parameter is True, the data will be saved in several files.
        \return A byte stream TMPFile that contains all saved data
 
-<BR><VAR>See also <A href=exemple/Example19.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
      */
 
@@ -1166,7 +1228,7 @@ can be called by any component and which provide the following functionality:
        \param isMultiFile  If the value of this boolean parameter is True, the data will be saved in several files.
        \return A byte stream TMPFile that will contain all saved data
 
-<BR><VAR>See also <A href=exemple/Example19.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
 
      */
     TMPFile SaveASCII(in SComponent theComponent, in string theURL, in boolean isMultiFile);