Salome HOME
#19007 [CEA][Windows] SALOME non regression tests on Windows: fix KERNEL_SALOME_COMMA...
[modules/kernel.git] / idl / SALOMEDS.idl
index 6fd42cd02cdb186e2896acca44a6107f8b8f0672..b6c4dcf2b47936ba97f254cac3ee8c60bc38fa4c 100644 (file)
@@ -1,30 +1,29 @@
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
+// You should have received a copy of the GNU Lesser General Public
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 //  File   : SALOMEDS.idl
 //  Author : Yves FRICAUD
-//  $Header$
-
-/*!
-  \file SALOMEDS.idl This file contains a set of interfaces used for creation, managment
+//
+/*!  \file SALOMEDS.idl  \brief This file contains a set of interfaces used for creation, management
   and modification of the %Study
 */
 
 #include "SALOME_Exception.idl"
 #include "SALOME_GenericObj.idl"
 
-/*!
-     This package contains the interfaces used for creation, managment
+/*! \brief
+     This package contains the interfaces used for creation, management
      and modification of the %Study
 */
 module SALOMEDS
 {
-/*! \typedef URL
-    Name of the file in which the %Study is saved.
-
+/*! \brief Name of the file in which the %Study is saved.
 */
-  typedef string URL;
+  typedef wstring URLPath;
 
-/*! Main identifier of an object in %SALOME application
+/*! \brief Main identifier of an object in %SALOME application
 */
   typedef string ID;
 
-/*! While saving the data, IOR is transformed into persistent reference
+/*! \brief While saving the data, IOR is transformed into persistent reference
 */
   typedef string PersistentReference;
 
-/*! IOR of the study in %SALOME application
+/*! \brief IOR of the study in %SALOME application
 */
   typedef string SalomeReference;
 
-/*! List of the names of studies which are currently open in this %SALOME session.
-Since %SALOME is a multi-study application, it allows to open a lot of studies
-during each working session.
-*/
-  typedef sequence<string> ListOfOpenStudies;
-/*! List of file names
-*/
+//! List of file names
   typedef sequence<string> ListOfFileNames;
-/*! List of modification dates of a study
-*/
+//! List of modification dates of a study
   typedef sequence<string> ListOfDates ;
-/*! An unbounded sequence of strings
-*/
+//! An unbounded sequence of strings
   typedef sequence<string> ListOfStrings ;
-/*! A byte stream which is used for binary data transfer between different components
-*/
+//! An unbounded sequence of sequence of strings
+  typedef sequence<ListOfStrings> ListOfListOfStrings ;
+//! A byte stream which is used for binary data transfer between different components
   typedef sequence<octet> TMPFile;
 
   // Reference to other objects is treated with function AddReference
@@ -85,7 +75,6 @@ during each working session.
 
   interface GenericAttribute;
   interface Study;
-  interface StudyManager;
   interface StudyBuilder;
   interface SObject;
   interface SComponent;
@@ -97,770 +86,774 @@ during each working session.
   interface UseCaseIterator;
   interface UseCaseBuilder;
 
-/*! List of attributes of %SObjects
-*/
+  interface Observer
+  {
+    oneway void notifyObserverID(in string theID, in long event);
+  };
+
+
+//! List of attributes of %SObjects
   typedef sequence<GenericAttribute> ListOfAttributes;
 
-/*! Exception indicating that this feature hasn't been implemented in %SALOME PRO application.
-*/
+//! Exception indicating that this feature hasn't been implemented in %SALOME application.
   exception NotImplemented {};
 
+  //==========================================================================
+/*! \brief %Study Builder Interface
 
-  //===========================================================================
- /*! \brief %Study Interface
-
-    The purpose of the %Study is to manage the data produced by various components of %SALOME platform.
-   Most of the %Study operations are handled by the StudyManager and the StudyBuilder.
-   What is left in the %Study interface are elementary inquiries.
-   (Incidentally, we recall that a CORBA attribute is implemented as a pair of get
-      and set methods.) A %Study is explored by a set of tools, mainly iterators
-    , which are described further. Nevertheless, the %Study
-     interface allows the search of an object by name or by ID.
-     \note
-     <BR><VAR>The Path </VAR>of an object in %SALOME application is much alike a standard path of a file.
-    In general it's a string of names of directories divided by a slash '/'.
-     <BR><VAR>The Context</VAR> is the current directory of an object.</P>
+  The purpose of the Builder is to add and/or remove objects and attributes.
+  A %StudyBuilder is linked to a %Study. A
+  command management is provided for the undo/redo functionalities.
+  \note
+  <BR><VAR>The Tag</VAR> of an item in %SALOME application is a symbolic description of
+  item's position in the tree-type structure of the browser. In general it has the following
+  form: <TT>0:2:1:1</TT>
 */
+  //==========================================================================
 
-  interface Study
+  interface StudyBuilder
   {
+/*! \brief %LockProtection Exception
 
-    exception StudyInvalidContext {};
-    exception StudyInvalidComponent {};
-/*! Invalid directory of the %study exception
-*/
-    exception StudyInvalidDirectory {};
-/*! Exception pointing that this name of the study has already been used.
-*/
-    exception StudyNameAlreadyUsed {};
-    exception StudyObjectAlreadyExists {};
-/*! Invalid name of the %study exception
+    This exception is raised while attempting to modify a locked %study.
 */
-    exception StudyNameError {};
-    exception StudyCommentError {};
-/*! \brief The name of the %Study
+    exception LockProtection {};
+/*! \brief Creation of a new %SComponent.
 
-   This is equivalent to the methods setName() & getName()
-*/
-    attribute string     Name; // equivalent to setName() & getName()
-/*! \brief The ID of the %Study
+   Creates a new %SComponent
+   \param ComponentDataType    Data type of the %SComponent which will be created.
 
-   This is equivalent to the methods setID() & getID()
-*/
-    attribute short      StudyId;
-/*! Sequence containing %SObjects
-*/
-    typedef sequence<SObject> ListOfSObject;
-/*!
-  Gets the persistent reference to the %Study.
-*/
-    PersistentReference  GetPersistentReference();
-/*!
-  Gets a transient reference to the %Study.
-*/
-    SalomeReference      GetTransientReference();
+<em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
 
-/*!
-    Returns True if the %Study is empty
 */
-    boolean IsEmpty();
-/*!
-    Allows to find a %SComponent by its name.
-   \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.
+    SComponent NewComponent(in string ComponentDataType) raises(LockProtection);
 
-<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);
-/*!
-    Allows to find a %SComponent by ID of the according %SObject
-*/
-    SComponent FindComponentID(in ID aComponentID);
-/*!
-    Allows to find a %SObject by the Name Attribute of this %SObject
+/*! \brief Definition of the instance to the %SComponent
 
-    \param anObjectName String parameter defining the name of the object
-    \return The obtained %SObject
+    Defines the instance to the %SComponent.
+*/
+    void       DefineComponentInstance (in SComponent aComponent,in Object ComponentIOR) raises(LockProtection);
 
-<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+/*! \brief Deletion of a %SComponent
 
+  Removes a %SComponent.
 */
-    SObject       FindObject      (in string anObjectName);
-/*!
-    Allows to find a %SObject by its ID
-    \param aObjectID This parameter defines the ID of the required object
-    \return The obtained %SObject
+    void       RemoveComponent(in SComponent aComponent) raises(LockProtection);
 
-*/
-    SObject       FindObjectID    (in ID aObjectID);
-/*!
-    Allows to create a %SObject by its ID
-    \param aObjectID This parameter defines the ID of the required object
-    \return The created %SObject
+/*! \brief Creation of a new %SObject
 
-*/
-    SObject       CreateObjectID    (in ID aObjectID);
-/*!
-    Allows to find a %SObject by IOR of the object belonging to this %SObject.
-    \param anObjectName This parameter defines the IOR of the object
-    \return The obtained %SObject
+   Creates a new %SObject under a definite father %SObject.
 
-*/
-    SObject       FindObjectIOR   (in ID aObjectIOR);
-/*!
-    Finds in the study all %SObjects produced by a given %Component.
-    \param anObjectName The Name Attribute of the searched %SObjects should correspond to <VAR>anObjectName</VAR>.
-    \param aComponentName The name of the component, which objects are searched for.
-*/
-    ListOfSObject FindObjectByName(in string anObjectName, in string aComponentName);
-/*!
-    Allows to find a %SObject by the path to it.
+   \param theFatherObject The father %SObject under which this one should be created.
+   \return New %SObject
 
-    \param thePath The path to the required %SObject.
-    \return The obtained %SObject.
+<em>See \ref example18 for an example of this method usage in batchmode of %SALOME application.</em>
 
 */
-    SObject FindObjectByPath(in string thePath);
-/*!
-    Returns the path to the %SObject.
-*/
-    string  GetObjectPath(in Object theObject);
 
-/*!
-    Sets the context of the %Study.
-    \param thePath String parameter defining the context of the study.
+    SObject NewObject      (in SObject theFatherObject) raises(LockProtection);
 
-<BR><VAR>See also <A href="exemple/Example23.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+/*! \brief Creation of a new %SObject with a definite %tag
 
-*/
-    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>
+   Creates a new %SObject with a definite %tag.
+
+   \param atag Long value corresponding to the tag of the new %SObject.
+   \return New %SObject
 
 */
-    string GetContext();
-/*!
-   Returns 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);
-/*!
-   Returns 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);
-/*!
-   Returns 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);
-/*!
-   Returns 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.
+    SObject NewObjectToTag (in SObject theFatherObject, in long atag) raises(LockProtection);
+/*! \brief Deletion of the %SObject
+
+  Removes a %SObject from the %StudyBuilder.
+
+  \param anObject The %SObject to be deleted.
 */
-    ListOfStrings GetComponentNames(in string theContext);
-/*!
-    Creates a new iterator of child levels of the given %SObject.
-    \param aSO The given %SObject
-    \return A new iterator of child levels of the given %SObject.
+    void    RemoveObject   (in SObject anObject) raises(LockProtection);
+/*! \brief Deletion of the %SObject with all his child objects.
+
+  Removes the %SObject with all his child objects.
+
+  \param anObject The %SObject to be deleted with all child objects.
 */
-    ChildIterator      NewChildIterator(in SObject aSO);
+    void    RemoveObjectWithChildren(in SObject anObject) raises(LockProtection);
+
 /*!
+   Loads a %SComponent.
 
-    Creates a new iterator of the %SComponents.
+<em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
 
-    \return A new iterator of the %SComponents.
 */
-    SComponentIterator NewComponentIterator();
+    void  LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception);
 /*!
-   Creates a new %StudyBuilder to add or modify an object in the study.
+   Loads a %SObject.
 
-   \return A new %StudyBuilder.
+   \param sco %SObject to be loaded.
+*/
+    void  Load (in SObject sco);
 
-<BR><VAR>See also <A href="exemple/Example20.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+/*! \brief Looking for or creating an attribute assigned to the %SObject
 
-*/
-    StudyBuilder NewBuilder() ;
-/*! \brief Labels dependency
+    Allows to find or create an attribute of a specific type which is assigned to the object.
+    \param anObject        The %SObject corresponding to the attribute which is looked for.
+    \param aTypeOfAttribute     Type of the attribute.
 
-    Updates the map with IOR attribute. It's an inner method used for optimization.
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
 */
-    void UpdateIORLabelMap(in string anIOR, in string anEntry);
 
-/*! \brief Getting properties of the study
+    GenericAttribute FindOrCreateAttribute(in  SObject        anObject,
+                                         in  string         aTypeOfAttribute) raises(LockProtection);
 
-   Returns the attriubte, which contains the properties of this study.
+/*! \brief Looking for an attribute assigned to a %SObject
 
-<BR><VAR>See also <A href="exemple/Example20.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+    Allows to find an attribute of a specific type which is assigned to the object.
+    \param anObject        The %SObject corresponding to the attribute which is looked for.
+    \param aTypeOfAttribute     Type of the attribute.
+    \param anAttribute       Where the attribute is placed if it's found.
+    \return True if it finds an attribute.
+ */
 
+    boolean FindAttribute(in  SObject        anObject,
+                                 out GenericAttribute anAttribute,
+                                 in  string         aTypeOfAttribute);
+/*! \brief Deleting the attribute assigned to the %SObject
+
+    Removes the attribute of a specific type which is assigned to the object.
+    \param anObject        The %SObject corresponding to the attribute.
+    \param aTypeOfAttribute     Type of the attribute.
+
+<em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
 */
-    AttributeStudyProperties GetProperties();
-/*!
-   Determines whether the %study has been saved
-*/
-    attribute boolean IsSaved;
+    void RemoveAttribute(in  SObject        anObject,
+                         in  string         aTypeOfAttribute) raises(LockProtection);
 /*!
-  Returns True if the %study has been modified and not saved.
+    Adds a reference between %anObject and %theReferencedObject.
+    \param anObject The %SObject which will get a reference
+    \param theReferencedObject The %SObject having a reference
 */
-    boolean IsModified();
 
-/*!
-  Marks the %study as being modified and not saved.
-*/
-    void Modified();
+    void Addreference(in SObject anObject,
+                      in SObject theReferencedObject) ;
 
 /*!
-   Determines the file where the %study has been saved
+    Removes a reference from %anObject to another object.
+    \param anObject The %SObject which contains a reference
 */
-    attribute string  URL;
 
-/*! \brief List of %SObjects
+    void RemoveReference(in SObject anObject) ;
 
-    Returns the list of %SObjects which refers to %anObject.
-*/
-    ListOfSObject FindDependances(in SObject anObject);
+/*! \brief Identification of the %SObject's substructure.
 
-/*! \brief The date of the last saving of the study
+      Identification of the %SObject's substructure by GUID.
 
-    Returns the date of the last saving of study with format: "DD/MM/YYYY HH:MM"
-*/
-    string GetLastModificationDate();
-/*! \brief The list of modification dates of the study
 
-    Returns the list of modification dates (without creation date) with format "DD/MM/YYYY HH:MM".
-      Note : the first modification begins the list.
+      \param anObject The %SObject which will be identified
+      \param theGUID GUID has the following format "00000000-0000-0000-0000-000000000000"
 */
-    ListOfDates GetModificationsDate();
-/*! \brief Object conversion.
+    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.
 
-    Converts an object into IOR.
-    \return    IOR
+\param anObject A definite %SObject which will be identified
+\param theGUID GUID has the following format "00000000-0000-0000-0000-000000000000"
 */
-    string ConvertObjectToIOR(in Object theObject);
-/*! \brief Object conversion.
+     boolean IsGUID(in SObject anObject, in string theGUID);
 
-    Converts IOR into an object.
-    \return    An object
-*/
-    Object ConvertIORToObject(in string theIOR);
-/*!
-    Gets a new %UseCaseBuilder.
-*/
-    UseCaseBuilder  GetUseCaseBuilder();
+/*! \brief Creation of a new command
 
-/*!
-    Closes the components in the study, removes itself from the %StudyManager.
-*/
-    void Close();
+   Creates a new command which can contain several different actions.
 
-/*!
-    Enables(if isEnabled = True)/disables automatic addition of new %SObjects to the use case.
-*/
-    void EnableUseCaseAutoFilling(in boolean isEnabled);
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
 
-/*!
-    Functions for internal usage only
 */
-    void AddPostponed(in string theIOR);
-
-    void AddCreatedPostponed(in string theIOR);
+    void NewCommand(); // command management
+/*! \brief Execution of the command
 
-    void RemovePostponed(in long theUndoLimit);
+   Commits all actions declared within this command.
 
-    void UndoPostponed(in long theWay);
+   \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
 
-    boolean DumpStudy(in string thePath, in string theBaseName, in boolean isPublished);
+<em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
 
-/*!
-    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);
-
+    void CommitCommand() raises(LockProtection); // command management
 /*!
-    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
+    Returns True if at this moment there is a command under execution.
 */
-    AttributeParameter GetModuleParameters(in string theID, in string theModuleName, in long theSavePoint);
+    boolean HasOpenCommand();
+/*! \brief Cancellation of the command
 
+    Cancels all actions declared within the command.
 
-/*!
-    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")
+<em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
 */
-    string GetDefaultScript(in string theID, in string theModuleName);
+    void AbortCommand(); // command management
+/*! \brief Undolimit
 
-/*!
-    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
+    The number of actions which can be undone
 */
-    long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
-
+    attribute long  UndoLimit;
+/*! \brief Undo method
 
-/*!
-    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);
+    Cancels all actions of the last command.
 
-/*!
-    Returns True if the Study was marked locked. 
-*/
-    boolean IsStudyLocked();
+    \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
 
-/*!
-    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);
+<em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
 
-/*!
-    Returns the list iof IDs of the Study's lockers. 
 */
-    ListOfStrings GetLockerID();
+    void Undo() raises (LockProtection);
+/*! \brief Redo method
 
+    Redoes all actions of the last command.
 
-  };
+\exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
 
-  //==========================================================================
-/*! \brief %Study Builder Interface
+<em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
 
-  The purpose of the Builder is to add and/or remove objects and attributes.
-  A %StudyBuilder is linked to a %Study. A
-  command management is provided for the undo/redo functionalities.
-  \note
-  <BR><VAR>The Tag</VAR> of an item in %SALOME application is a symbolic description of
-  item's position in the tree-type structure of the browser. In general it has the following
-  form: <TT>0:2:1:1</TT>
 */
-  //==========================================================================
+    void Redo() raises (LockProtection);
+/*!
+    Returns True if at this moment there are any actions which can be canceled.
 
-  interface StudyBuilder
-  {
-/*! \brief %LockProtection Exception
+<em>See \ref example16 for an example of this method usage in batchmode of %SALOME application.</em>
 
-    This exception is raised while attempting to modify a locked %study.
 */
-    exception LockProtection {};
-/*! \brief Creation of a new %SComponent.
-
-   Creates a new %SComponent
-   \param ComponentDataType    Data type of the %SComponent which will be created.
+    boolean GetAvailableUndos();
+/*!
+    Returns True if at this moment there are any actions which can be redone.
 
-<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+<em>See \ref example3 for an example of this method usage in batchmode of %SALOME application.</em>
 
 */
-    SComponent NewComponent(in string ComponentDataType) raises(LockProtection);
-/*! \brief Definition of the instance to the %SComponent
+    boolean GetAvailableRedos();
+/*!
+    Puts name attribute with the given string value to the given %SObject
 
-    Defines the instance to the %SComponent.
+    \param theSO Existing SObject to set name attribute.
+    \param theValue The value to be set to the name attribute.
 */
-    void       DefineComponentInstance (in SComponent aComponent,in Object ComponentIOR) raises(LockProtection);
-        
-/*! \brief Deletion of a %SComponent
+    void SetName(in SObject theSO, in string theValue) raises (LockProtection);
 
-  Removes a %SComponent.
-*/
-    void       RemoveComponent(in SComponent aComponent) raises(LockProtection);
+/*!
+    Puts comment attribute with the given string value to the given %SObject
 
-/*! \brief Creation of a new %SObject
+    \param theSO Existing SObject to set comment attribute.
+    \param theValue The value to be set to the comment attribute.
+*/
+    void SetComment(in SObject theSO, in string theValue) raises (LockProtection);
 
-   Creates a new %SObject under a definite father %SObject.
+/*!
+    Puts IOR attribute with the given string value to the given %SObject
 
-   \param theFatherObject The father %SObject under which this one should be created.
-   \return New %SObject
+    \param theSO Existing SObject to set IOR attribute.
+    \param theValue The value to be set to the IOR attribute.
+*/
+    void SetIOR(in SObject theSO, in string theValue) raises (LockProtection);
+  };
 
-<BR><VAR>See also <A href="exemple/Example18.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+  //===========================================================================
+ /*! \brief %Study Interface
 
+    The purpose of the %Study is to manage the data produced by various components of %SALOME platform.
+   Most of the %Study operations are handled by the StudyBuilder.
+   What is left in the %Study interface are elementary inquiries.
+   (Incidentally, we recall that a CORBA attribute is implemented as a pair of get
+      and set methods.) A %Study is explored by a set of tools, mainly iterators
+    , which are described further. Nevertheless, the %Study
+     interface allows the search of an object by name or by ID.
+     \note
+     <BR><VAR>The Path </VAR>of an object in %SALOME application is much alike a standard path of a file.
+    In general it's a string of names of directories divided by a slash '/'.
+     <BR><VAR>The Context</VAR> is the current directory of an object.</P>
 */
 
-    SObject NewObject      (in SObject theFatherObject) raises(LockProtection);
-
-/*! \brief Creation of a new %SObject with a definite %tag
+  interface Study
+  {
 
-   Creates a new %SObject with a definite %tag.
+//! Invalid study reference
+    exception StudyInvalidReference {};
+//! Invalid study component
+    exception StudyInvalidComponent {};
+//! Invalid directory of the %study exception
+    exception StudyInvalidDirectory {};
+//! Exception pointing that this name of the study has already been used.
+    exception StudyNameAlreadyUsed {};
+//! study object already exists
+    exception StudyObjectAlreadyExists {};
+//! Invalid name of the %study exception
+    exception StudyNameError {};
+//! Invalid study comment
+    exception StudyCommentError {};
 
-   \param atag Long value corresponding to the tag of the new %SObject.
-   \return New %SObject
+/*!
+    Determines whether the server has already been loaded or not.
+*/
+    void ping();
+    void Shutdown();
+/*!
+    Returns the PID of the server
+*/
+    long getPID();
 
+/*!
+    Shutdown the Study process.
 */
-    SObject NewObjectToTag (in SObject theFatherObject, in long atag) raises(LockProtection);
-/*! \brief Deletion of the %SObject
+    oneway void ShutdownWithExit();
 
-  Removes a %SObject from the %StudyBuilder.
+/*! \brief The name of the %Study
 
-  \param anObject The %SObject to be deleted.
+   This is equivalent to the methods setName() & getName()
 */
-    void    RemoveObject   (in SObject anObject) raises(LockProtection);
-/*! \brief Deletion of the %SObject with all his child objects.
+    attribute wstring Name; // equivalent to getName()
 
-  Removes the %SObject with all his child objects.
-
-  \param anObject The %SObject to be deleted with all child objects.
+/*! \brief  Indicate the file where the %study has been saved
 */
-    void    RemoveObjectWithChildren(in SObject anObject) raises(LockProtection);
 
-/*!
-   Loads a %SComponent.
+//! Sequence containing %SObjects
+    typedef sequence<SObject> ListOfSObject;
+//!  Get the persistent reference to the %Study.
+    PersistentReference  GetPersistentReference() raises(StudyInvalidReference);
 
-<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+/*! \brief indicate whether the %Study is empty
 
+    \return True if the %Study is empty
 */
-    void  LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception);
-/*!
-   Loads a %SObject.
+    boolean IsEmpty() raises(StudyInvalidReference);
+/*! \brief  Find a %SComponent by its name.
 
-   \param sco %SObject to be loaded.
-*/
-    void  Load (in SObject sco);
+   \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.
 
-/*! \brief Looking for or creating an attribute assigned to the %SObject
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
 
-    Allows to find or create an attribute of a specific type which is assigned to the object.
-    \param anObject        The %SObject corresponding to the attribute which is looked for.
-    \param aTypeOfAttribute     Type of the attribute.
+*/
+    SComponent FindComponent  (in string aComponentName) raises(StudyInvalidReference);
 
-  <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+/*! \brief  Find a %SComponent by ID of the according %SObject
 */
+    SComponent FindComponentID(in ID aComponentID) raises(StudyInvalidReference);
+/*! \brief  Find a %SObject by the Name Attribute of this %SObject
 
-    GenericAttribute FindOrCreateAttribute(in  SObject        anObject,
-                                        in  string         aTypeOfAttribute) raises(LockProtection);
+    \param anObjectName String parameter defining the name of the object
+    \return The obtained %SObject
 
-/*! \brief Looking for an attribute assigned to a %SObject
+<em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
+*/
+    SObject       FindObject      (in string anObjectName) raises(StudyInvalidReference);
+/*! \brief  Find a %SObject by its ID
 
-    Allows to find an attribute of a specific type which is assigned to the object.
-    \param anObject        The %SObject corresponding to the attribute which is looked for.
-    \param aTypeOfAttribute     Type of the attribute.
-    \param anAttribute       Where the attribute is placed if it's found.
-    \return True if it finds an attribute.
- */
+    \param aObjectID This parameter defines the ID of the required object
+    \return The obtained %SObject
+*/
+    SObject       FindObjectID    (in ID aObjectID) raises(StudyInvalidReference);
+/*! \brief Create a %SObject by its ID
 
-    boolean FindAttribute(in  SObject        anObject,
-                                out GenericAttribute anAttribute,
-                                in  string         aTypeOfAttribute);
-/*! \brief Deleting the attribute assigned to the %SObject
+    \param aObjectID This parameter defines the ID of the required object
+    \return The created %SObject
+*/
+    SObject       CreateObjectID    (in ID aObjectID) raises(StudyInvalidReference);
+/*!  \brief Find a %SObject by IOR of the object belonging to this %SObject.
 
-    Removes the attribute of a specific type which is assigned to the object.
-    \param anObject        The %SObject corresponding to the attribute.
-    \param aTypeOfAttribute     Type of the attribute.
+    \param anObjectName This parameter defines the IOR of the object
+    \return The obtained %SObject
+*/
+    SObject       FindObjectIOR   (in ID aObjectIOR) raises(StudyInvalidReference);
+/*! \brief  Find in the study all %SObjects produced by a given %Component.
+
+    \param anObjectName The Name Attribute of the searched %SObjects should correspond to <VAR>anObjectName</VAR>.
+    \param aComponentName The name of the component, which objects are searched for.
+*/
+    ListOfSObject FindObjectByName(in string anObjectName, in string aComponentName) raises(StudyInvalidReference);
+/*! \brief  Find a %SObject by the path to it.
 
-<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+    \param thePath The path to the required %SObject.
+    \return The obtained %SObject.
 */
-    void RemoveAttribute(in  SObject        anObject,
-                        in  string         aTypeOfAttribute) raises(LockProtection);
-/*!
-    Adds a reference between %anObject and %theReferencedObject.
-    \param anObject The %SObject which will get a reference
-    \param theReferencedObject The %SObject having a reference
+    SObject FindObjectByPath(in string thePath) raises(StudyInvalidReference);
+/*! \brief Get the path to the %SObject.
 */
+    string GetObjectPath(in Object theObject) raises(StudyInvalidReference);
 
-    void Addreference(in SObject anObject,
-                     in SObject theReferencedObject) ;
+/*!  \brief Create a new iterator of child levels of the given %SObject.
 
-/*!
-    Removes a reference from %anObject to another object.
-    \param anObject The %SObject which contains a reference
+    \param aSO The given %SObject
+    \return A new iterator of child levels of the given %SObject.
 */
+    ChildIterator NewChildIterator(in SObject aSO) raises(StudyInvalidReference);
 
-    void RemoveReference(in SObject anObject) ;
+/*!  \brief Create a new iterator of the %SComponents.
 
-/*!
-   Adds a directory in the %Study.
-   \param theName String parameter defining the name of the directory.
+    \return A new iterator of the %SComponents.
+*/
+    SComponentIterator NewComponentIterator() raises(StudyInvalidReference);
 
-<BR><VAR>See also <A href="exemple/Example23.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+/*! \brief  Create a new %StudyBuilder to add or modify an object in the study.
 
+   \return A new %StudyBuilder.
+
+<em>See \ref example20 for an example of this method usage in batchmode of %SALOME application.</em>
 */
-    void AddDirectory(in string theName) raises(LockProtection);
+    StudyBuilder NewBuilder() raises(StudyInvalidReference);
+/*! \brief Labels dependency
 
-/*! \brief Identification of the %SObject's substructure.
+    Updates the map with IOR attribute. It's an inner method used for optimization.
+*/
+    void UpdateIORLabelMap(in string anIOR, in string anEntry) raises(StudyInvalidReference);
 
-      Identification of the %SObject's substructure by GUID.
+/*! \brief Getting properties of the study
 
+   Returns the attribute, which contains the properties of this study.
 
-      \param anObject The %SObject which will be identified
-      \param theGUID GUID has the following format "00000000-0000-0000-0000-000000000000"
+<em>See \ref example20 for an example of this method usage in batchmode of %SALOME application.</em>
+
+*/
+    AttributeStudyProperties GetProperties() raises(StudyInvalidReference);
+/*! \brief  Indicate whether the %study has been saved
 */
+    attribute boolean IsSaved;
+/*! \brief  Indicate whether the %study has been modified and not saved.
 
-     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.
+  Returns True if the %study has been modified and not saved.
+*/
+    boolean IsModified() raises(StudyInvalidReference);
 
-\param anObject A definite %SObject which will be identified
-\param theGUID GUID has the following format "00000000-0000-0000-0000-000000000000"
+/*! \brief  Mark the %study as being modified and not saved.
 */
-     boolean IsGUID(in SObject anObject, in string theGUID);
+    void Modified() raises(StudyInvalidReference);
 
-/*! \brief Creation of a new command
+/*! \brief  Indicate the file where the %study has been saved
+*/
+    attribute wstring URL;
 
-   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>
+/*! \brief List of %SObjects
 
+    Returns the list of %SObjects which refers to %anObject.
 */
-    void NewCommand(); // command management
-/*! \brief Execution of the command
+    ListOfSObject FindDependances(in SObject anObject) raises(StudyInvalidReference);
 
-   Commits all actions declared within this command.
+/*! \brief The date of the last saving of the study
 
-   \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
+    Returns the date of the last saving of study with format: "DD/MM/YYYY HH:MM"
+*/
+    string GetLastModificationDate() raises(StudyInvalidReference);
+/*! \brief The list of modification dates of the study
 
-<BR><VAR>See also <A href="exemple/Example16.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+    Returns the list of modification dates (without creation date) with format "DD/MM/YYYY HH:MM".
+      Note : the first modification begins the list.
+*/
+    ListOfDates GetModificationsDate() raises(StudyInvalidReference);
+/*! \brief Object conversion.
 
+    Converts an object into IOR.
+    \return    IOR
 */
-    void CommitCommand() raises(LockProtection); // command management
-/*!
-    Returns True if at this moment there is a command under execution.
+    string ConvertObjectToIOR(in Object theObject);
+/*! \brief Object conversion.
+
+    Converts IOR into an object.
+    \return    An object
 */
-    boolean HasOpenCommand();
-/*! \brief Cancelation of the command
+    Object ConvertIORToObject(in string theIOR);
 
-    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>
+/*! \brief Get a new %UseCaseBuilder.
 */
-    void AbortCommand(); // command management
-/*! \brief Undolimit
+    UseCaseBuilder  GetUseCaseBuilder() raises(StudyInvalidReference);
 
-    The number of actions which can be undone
+/*! \brief Clear a study object
 */
-    attribute long  UndoLimit;
-/*! \brief Undo method
+    void Clear() raises(StudyInvalidReference);
 
-    Cancels all actions of the last command.
+/*! \brief Initialization a study object
+*/
+    void Init() raises(StudyInvalidReference);
 
-    \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
+/*! \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);
 
-<BR><VAR>See also <A href="exemple/Example16.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+/*! \brief Check if study can be opened
 
+    Tries to open and read given url.
+    \param aStudyUrl The path to the study
 */
-    void Undo() raises (LockProtection);
-/*! \brief Redo method
+    boolean CanOpen (in URLPath aStudyUrl);
 
-    Redoes all actions of the last command.
+/*! \brief Saving the study in a file (or files).
 
-\exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications.
+    Saves a study.
+    \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 Save(in boolean theMultiFile, in boolean theASCII) raises(StudyInvalidReference);
+
+/*! \brief Saving the study in a specified file (or files).
 
- <BR><VAR>See also <A href="exemple/Example16.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+    Saves the study in a specified file (or files).
+    \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 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>
 */
-    void Redo() raises (LockProtection);
+    boolean  SaveAs(in URLPath aUrl, // if the file already exists
+                    in boolean theMultiFile, // overwrite (as option)
+                    in boolean theASCII)
+                    raises(StudyInvalidReference);
 /*!
-    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>
-
+    Returns True, if the given %SObject can be copied to the clipboard.
 */
-    boolean GetAvailableUndos();
+    boolean CanCopy(in SObject theObject) raises(StudyInvalidReference);
 /*!
-    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>
-
+    Returns True, if the given %SObject is copied to the clipboard.
+    \param theObject The %SObject which will be copied
 */
-    boolean GetAvailableRedos();
+    boolean Copy(in SObject theObject) raises(StudyInvalidReference);
 /*!
-    Puts name attribute with the given string value to the given %SObject
-
-    \param theSO Existing SObject to set name attribute.
-    \param theValue The value to be set to the name attribute.
+    Returns True, if the object from the clipboard can be pasted to the given %SObject.
+    \param theObject The %SObject stored in the clipboard.
 */
-    void SetName(in SObject theSO, in string theValue) raises (LockProtection);
-
+    boolean CanPaste(in SObject theObject) raises(StudyInvalidReference);
 /*!
-    Puts comment attribute with the given string value to the given %SObject
+    Returns the %SObject in which the object from the clipboard was pasted to.
+    \param theObject The %SObject which will be pasted
+    \exception SALOMEDS::StudyBuilder::LockProtection This exception is raised, when trying to paste
+    an object into a study, which is protected for modifications.
+*/
+    SObject Paste(in SObject theObject) raises (SALOMEDS::StudyBuilder::LockProtection);
 
-    \param theSO Existing SObject to set comment attribute.
-    \param theValue The value to be set to the comment attribute.
+/*! \brief  Enable (if isEnabled = True)/disable automatic addition of new %SObjects to the use case.
 */
-    void SetComment(in SObject theSO, in string theValue) raises (LockProtection);
+    void EnableUseCaseAutoFilling(in boolean isEnabled) raises(StudyInvalidReference);
 
 /*!
-    Puts IOR attribute with the given string value to the given %SObject
+    Functions for internal usage only
+*/
+    void AddPostponed(in string theIOR) raises(StudyInvalidReference);
 
-    \param theSO Existing SObject to set IOR attribute.
-    \param theValue The value to be set to the IOR attribute.
+    void AddCreatedPostponed(in string theIOR) raises(StudyInvalidReference);
+
+    void RemovePostponed(in long theUndoLimit) raises(StudyInvalidReference);
+
+    void UndoPostponed(in long theWay) raises(StudyInvalidReference);
+
+    boolean DumpStudy(in string thePath,
+                      in string theBaseName,
+                      in boolean isPublished,
+                      in boolean isMultiFile) raises(StudyInvalidReference);
+
+/*! \brief  Returns the folder of the python script which is currently dumped.
 */
-    void SetIOR(in SObject theSO, in string theValue) raises (LockProtection);
-  };
+    string GetDumpPath();
 
-  //==========================================================================
-/*! \brief %Study Manager interface
+/*! \brief  Get an AttributeParameter used to store common parameters for given %theSavePoint.
 
-    The purpose of the Manager is to manipulate the %Studies. You will find in this
-    interface the methods to create, open,
-    close, and save a %Study. Since a %SALOME session is multi-document, you will
-    also find the methods allowing to navigate
-    through the collection of studies present in a session.
+    \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) raises(StudyInvalidReference);
 
-  interface StudyManager
-  {
-/*!
-    Determines whether the server has already been loaded or not.
+/*! \brief  Get 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
 */
-    void ping();
+    AttributeParameter GetModuleParameters(in string theID, in string theModuleName, in long theSavePoint) raises(StudyInvalidReference);
 
-    void Shutdown();
 
-/*!
-    Returns the PID of the server
+/*! \brief Get a default Python script to restore visual parameters for given %theModuleName.
+
+    \param theModuleName is a name of the module (Example: "Geometry")
+    \param indent is a string to use for script indentation
 */
-    long getPID();
+    string GetDefaultScript(in string theModuleName, in string indent) raises(StudyInvalidReference);
 
 /*!
-    Shutdown the StudyManager process.
-*/    
-    oneway void ShutdownWithExit();
+    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 long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
 
-/*! \brief Creation of a new study
 
-     Creates a new study with a definite name.
+/*! \brief  Mark this Study as being locked by the given locker.
 
-     \param study_name String parameter defining the name of the study
+    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) raises(StudyInvalidReference);
 
-<BR><VAR>See also <A href="exemple/Example17.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+/*! \brief Indicate if the Study is locked
 
+   Returns True if the Study was marked locked.
 */
-    Study NewStudy(in string study_name);
+    boolean IsStudyLocked() raises(StudyInvalidReference);
 
-/*! \brief Open a study
+/*! \brief  Mark this Study as being unlocked by the given locker.
 
-     Reads and activates the structure of the study %Objects.
-     \param aStudyUrl The path to the study
-    \warning This method doesn't activate the corba objects. Only a component can do it.
+     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) raises(StudyInvalidReference);
 
-<BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+/*! \brief  Get the list of IDs of the Study's lockers.
 */
-    Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception);
+    ListOfStrings GetLockerID() raises(StudyInvalidReference);
 
-/*! \brief Closing the study
+/*! \brief  Create real variable with Name theVarName and value theValue
 
-    Closes a study.
+    (or set if variable value into theValue already exists)
+    \param theVarName is a name of the variable
+    \param theVarName is a value of the variable.
 */
-    void  Close(in Study aStudy);
-/*! \brief Saving the study in a HDF file (or files).
+    void SetReal( in string theVarName, in double theValue ) raises(StudyInvalidReference);
 
-    Saves a study.
+/*! \brief  Create integer variable with Name theVarName and value theValue
 
-    \param theMultiFile If this parameter is True the study will be saved in several files.
+    (or set if variable value into theValue already exists)
+    \param theVarName is a name of the variable
+    \param theVarName is a value of the variable.
+*/
+    void SetInteger( in string theVarName, in long theValue ) raises(StudyInvalidReference);
+/*! \brief  Create boolean variable with Name theVarName and value theValue
+
+    (or set if variable value into theValue already exists)
+    \param theVarName is a name of the variable
+    \param theVarName is a value of the variable.
+*/
+    void SetBoolean( in string theVarName, in boolean theValue ) raises(StudyInvalidReference);
 
-<BR><VAR>See also <A href="exemple/Example19.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+/*! \brief  Create string variable with Name theVarName and value theValue
 
+    (or set if variable value into theValue already exists)
+    \param theVarName is a name of the variable
+    \param theVarName is a value of the variable.
 */
-    boolean  Save(in  Study aStudy, in boolean theMultiFile);
-/*! \brief Saving a study in a ASCII file (or files).
+    void SetString( in string theVarName, in string theValue ) raises(StudyInvalidReference);
 
-    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.
+/*! \brief  Set current value as double for string variable
 */
-    boolean  SaveASCII(in  Study aStudy, in boolean theMultiFile);
-/*! \brief Saving the study in a specified HDF file (or files).
+    void SetStringAsDouble( in string theVarName, in double theValue ) raises(StudyInvalidReference);
 
-    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 theMultiFile If this parameter is True the study will be saved in several files.
+/*! \brief Get value of a real variable
 
- <BR><VAR>See also <A href="exemple/Example1.html"> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
+    \param theVarName is a name of the variable.
 */
-    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).
+    double GetReal( in string theVarName ) raises(StudyInvalidReference);
 
-    Saves the study in a specified ASCII file (or files).
+/*! \brief Get value of an integer variable
 
-    \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.
+    \param theVarName is a name of the variable.
 */
-    boolean  SaveAsASCII(in URL   aUrl, // if the file already exists
-                     in Study aStudy,
-                     in boolean theMultiFile); // overwrite (as option)
+    long GetInteger( in string theVarName ) raises(StudyInvalidReference);
 
+/*! \brief Get value of a boolean variable
 
-/*! \brief List of open studies.
+    \param theVarName is a name of the variable.
+*/
+    boolean GetBoolean( in string theVarName ) raises(StudyInvalidReference);
 
-Gets the list of open studies
+/*! \brief Get value of a string variable
 
-    \return A list of open studies in the current session.
+    \param theVarName is a name of the variable.
 */
-    ListOfOpenStudies GetOpenStudies();
+    string GetString( in string theVarName ) raises(StudyInvalidReference);
+
 
-/*! \brief Getting a particular %Study picked by name
+/*! \brief Indicate if a variable is real
 
-    Activates a particular %Study
-    among the session collection picking it by name.
-    \param aStudyName The name of the study
+    Return true if variable is real otherwise return false.
+    \param theVarName is a name of the variable.
 */
-    Study GetStudyByName  (in string aStudyName);
+    boolean IsReal( in string theVarName ) raises(StudyInvalidReference);
 
-/*! \brief Getting a particular %Study picked by ID
+/*! \brief Indicate if a variable is integer
 
-    Activates a particular %Study
-    among the session collection picking it by ID.
-    \param aStudyID The ID of the study
+    Return true if variable is integer otherwise return false.
+    \param theVarName is a name of the variable.
 */
-    Study GetStudyByID  (in short aStudyID);
+    boolean IsInteger( in string theVarName ) raises(StudyInvalidReference);
 
-    // copy/paste methods
+/*! \brief Indicate if a variable is boolean
 
-/*!
-    Returns True, if the given %SObject can be copied to the clipboard.
+    Return true if variable is boolean otherwise return false.
+    \param theVarName is a name of the variable.
 */
-    boolean CanCopy(in SObject theObject);
-/*!
-    Returns True, if the given %SObject is copied to the clipboard.
-    \param theObject The %SObject which will be copied
+    boolean IsBoolean( in string theVarName ) raises(StudyInvalidReference);
+
+/*! \brief Indicate if a variable is string
+
+    Return true if variable is string otherwise return false.
+    \param theVarName is a name of the variable.
 */
-    boolean Copy(in SObject theObject);
-/*!
-    Returns True, if the object from the clipboard can be pasted to the given %SObject.
-    \param theObject The %SObject stored in the clipboard.
+    boolean IsString( in string theVarName ) raises(StudyInvalidReference);
+
+/*! \brief Indicate if a variable exists in the study
+
+    Return true if variable exists in the study,
+    otherwise return false.
+    \param theVarName is a name of the variable.
 */
-    boolean CanPaste(in SObject theObject);
-/*!
-    Returns the %SObject in which the object from the clipboard was pasted to.
-    \param theObject The %SObject which will be pasted
-    \exception SALOMEDS::StudyBuilder::LockProtection This exception is raised, when trying to paste
-    an object into a study, which is protected for modifications.
+    boolean IsVariable( in string theVarName ) raises(StudyInvalidReference);
+
+/*! \brief Get names of all variables from the study.
 */
-    SObject Paste(in SObject theObject) raises (SALOMEDS::StudyBuilder::LockProtection);
+    ListOfStrings GetVariableNames() raises(StudyInvalidReference);
 
-/*! \brief Object conversion.
+/*! \brief Remove a variable
 
-    Converts an object into IOR.
-    \return    IOR
+   Remove variable with the specified name from the study with substitution of its value.
+
+   \param theVarName Name of the variable.
+   \return Status of operation.
 */
-    string ConvertObjectToIOR(in Object theObject);
-/*! \brief Object conversion.
-           
-    Converts IOR into an object.
-    \return    An object
+    boolean RemoveVariable( in string theVarName ) raises(StudyInvalidReference);
+
+/*! \brief Rename a variable
+
+   Rename variable with the specified name within the study.
+
+   \param theVarName Name of the variable.
+   \param theNewVarName New name for the variable.
+   \return Status of operation.
 */
-    Object ConvertIORToObject(in string theIOR); 
+    boolean RenameVariable( in string theVarName, in string theNewVarName ) raises(StudyInvalidReference);
 
-/*!
-    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
+/*! \brief Indicate whether variable is used
+
+   Check that variable is used in the study.
+
+   \param theVarName Name of the variable.
+   \return Variable usage.
 */
-    long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal); 
+    boolean IsVariableUsed( in string theVarName ) raises(StudyInvalidReference);
 
+/*! \brief Parse variables used for object creation
 
-  };
+   \param string with variables, separated by special symbol.
+   \return Variables list.
+*/
+    ListOfListOfStrings ParseVariables( in string theVars ) raises(StudyInvalidReference);
+
+/*!
+     Attach an observer to the Study
+
+    \param theObserver observer being attached
+    \param modify when \c true, observer receives any object's modification events;
+           otherwise observer receives object's creation events only
+*/
+     void attach(in SALOMEDS::Observer theObserver, in boolean modify);
+/*!
+     Detach an observer from the Study
 
+    \param theObserver observer to be detached
+*/
+     void detach(in SALOMEDS::Observer theObserver);
+  };
 
   //==========================================================================
 /*! \brief %SObject interface
@@ -868,7 +861,7 @@ Gets the list of open studies
    The objects in the %study are built by the %StudyBuilder. The %SObject interface
    provides methods for elementary inquiries, like getting an object %ID or its attribuites.
  \note
+
    <BR><VAR>Tag</VAR> of an item in %SALOME application is an integer value uniquely defining an item
    in the tree-type data structure.
    <BR><VAR>ID</VAR> of an item is a description of item's position in the tree-type data structure.
@@ -881,70 +874,72 @@ Gets the list of open studies
 /*! Name of the %SObject
 */
     attribute string Name; // equivalent to setName() & getName()
-/*! Gets an object %ID
 
+/*! Returns true if the %SObject does not belong to any %Study
+*/
+    boolean IsNull();
+
+/*! Gets an object %ID
    \return ID of the %SObject.
 */
     ID GetID();
-/*!  Acquisition of the father %Component of the %SObject
 
+/*!  Acquisition of the father %Component of the %SObject
   \return The father %Component of the %SObject.
 */
     SComponent GetFatherComponent();
-/*! Acquisition of the father %SObject of the %SObject
 
+/*! Acquisition of the father %SObject of the %SObject
    \return the father %SObject of the given %SObject.
 */
     SObject    GetFather();
-/*! Gets the %tag of a %SObject
 
+/*! Gets the %tag of a %SObject
     \return the %tag of a %SObject.
 */
     short      Tag();
-/*! Gets the depth of a %SObject
 
+/*! Returns a tag of the last child %SObject (if any) of this %SObject.
+    Returns zero if this %SObject has no children.
+*/
+    short      GetLastChildTag();
+
+/*! Gets the depth of a %SObject
     \return the depth of a %SObject.
 */
     short      Depth();
-/*! Looks for subobjects of a given %SObject.
 
+/*! Looks for subobjects of a given %SObject.
     \param atag Tag of the given %SObject
     \return True if it finds a subobject of the %SObject with a definite tag as well as the required subobject.
 */
-
     boolean FindSubObject (in long atag, out SObject obj);
-/*! Looks for attributes of a given %SObject
 
+/*! Looks for attributes of a given %SObject
    \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>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
 */
     boolean FindAttribute(out GenericAttribute anAttribute,
-                                 in  string         aTypeOfAttribute);
-/*! Looks for a %SObject which the given %SObject refers to.
+                                  in  string         aTypeOfAttribute);
 
+/*! Looks for a %SObject which the given %SObject refers to.
     \return The object which the given %SObject refers to as well as True if it finds
     this object.
 */
     boolean ReferencedObject(out SObject obj); // A REVOIR
-/*! Gets all attributes of a given %SObject
 
+/*! Gets all attributes of a given %SObject
     \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>
+<em>See \ref example17 for an example of this method usage in batchmode of %SALOME application.</em>
 
 */
     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.
 */
     Object GetObject();
@@ -967,6 +962,13 @@ Gets the list of open studies
 */
     string GetIOR();
 
+/*!
+    Set an attribute value (of type string)
+   \param name the name of the attribute
+   \param value the value of the attribute
+*/
+    void SetAttrString(in string name, in string value);
+
 /*!
     Private method, returns an implementation of this SObject.
    \param theHostname is a hostname of the caller
@@ -998,14 +1000,17 @@ Gets the list of open studies
 */
     void CheckLocked() raises (LockProtection);
 
+    //! Get Type
     string Type();
 
-    string GetClassType();     
-       
+    //! Get the class type
+    string GetClassType();
+
+    //! Get SObject
     SObject GetSObject();
 
+  //!  Private method, returns an implementation of this GenericAttribute.
 /*!
-    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
@@ -1025,12 +1030,12 @@ Gets the list of open studies
   //==========================================================================
   interface SComponent : SObject
   {
-/*! Gets the data type of the given %SComponent
+/*! \brief Gets the data type of the given %SComponent
 
     \return The data type of this %SComponent.
 */
     string  ComponentDataType();
-/*! Gets the IOR of the given component
+/*! \brief Gets the IOR of the given component
 
   \return True (if there is an instance of the given component) and its IOR.
 */
@@ -1049,22 +1054,22 @@ Gets the list of open studies
   interface SComponentIterator : SALOME::GenericObj
   {
 /*!
-Activates the %SComponentIterator.
+\brief Activates the %SComponentIterator.
 */
     void Init();
-/*!  Method More
+/*!  \brief Method More
 
    \return True if there is one more %SComponent in the list.
 */
     boolean More();
 /*!
-Moves the iterator to the next %SComponent in the list.
+\brief Moves the iterator to the next %SComponent in the list.
 */
     void Next();
 /*!
-    Returns the %SComponent corresponding to the current %SComponent found by the iterator.
+    \brief 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>
+<em>See \ref example1 for an example of this method usage in batchmode of %SALOME application.</em>
 
 */
     SComponent Value();
@@ -1081,27 +1086,27 @@ Moves the iterator to the next %SComponent in the list.
   {
 /*!
 
-Activates the %ChildIterator.
+\brief Activates the %ChildIterator.
 */
     void Init();
 /*!
 
-Activates the %ChildIterator for all child levels.
+\brief Activates the %ChildIterator for all child levels.
 
 \param allLevels If this boolean parameter is True, the %ChildIterator will be activated for all child levels.
 */
     void InitEx(in boolean allLevels);
-/*! Method More
+/*! \brief Method More
 
    \return True if there is one more %ChildIterator in the list.
 */
     boolean More();
 /*!
-    Passes the iterator to the next level.
+    \brief Passes the iterator to the next level.
 */
     void Next();
 /*!
-    Returns the %SObject corresponding to the current object found by the iterator.
+    \brief Returns the %SObject corresponding to the current object found by the iterator.
 */
     SObject Value();
   };
@@ -1161,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);
+/*!
+    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>.
 */
@@ -1177,6 +1186,14 @@ Activates the %UseCaseIterator.
    Returns True if the given object <VAR>theObject</VAR> of the use case has child objects.
 */
     boolean HasChildren(in SObject theObject);
+/*!
+   Returns True if children of the given object <VAR>theObject</VAR> of the use case tree were sorted successfully.
+*/
+    boolean SortChildren(in SObject theObject, in boolean theAscendingOrder);
+/*!
+   Gets father object of the given object <VAR>theObject</VAR> in the use cases tree.
+*/
+    SObject GetFather(in SObject theObject);
 /*!
    Sets the name of the use case.
 */
@@ -1189,6 +1206,10 @@ Activates the %UseCaseIterator.
    Returns True if the given object <VAR>theObject</VAR> represents a use case.
 */
     boolean IsUseCase(in SObject theObject);
+/*!
+   Returns True if the given object <VAR>theObject</VAR> is included in the use cases tree on any level.
+*/
+    boolean IsUseCaseNode(in SObject theObject);
 /*!
     Gets the current object of the use case.
 */
@@ -1209,8 +1230,8 @@ This class represents a common tool for all components integrated into SALOME ap
 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 by the StudyManager 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> 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 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>
 
@@ -1221,13 +1242,13 @@ can be called by any component and which provide the following functionality:
 
     /*! \brief Saving the data produced by a definite component.
 
-        This method is called by the StudyManager when saving a study.
+        This method is called when saving a study.
        \param theComponent    %SComponent corresponding to this Component
        \param theURL  The path to the file in which the data will be saved.
        \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>
+<em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
 
      */
 
@@ -1236,20 +1257,20 @@ can be called by any component and which provide the following functionality:
 
 /*! \brief Saving the data in ASCII format produced by a definite component.
 
-        This method is called by the StudyManager when saving a study in ASCII format.
+        This method is called when saving a study in ASCII format.
        \param theComponent    %SComponent corresponding to this Component
        \param theURL  The path to the file in which the data will be saved.
        \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>
+<em>See \ref example19 for an example of this method usage in batchmode of %SALOME application.</em>
 
      */
     TMPFile SaveASCII(in SComponent theComponent, in string theURL, in boolean isMultiFile);
 
     /*! \brief Loading the data.
 
-       This method is called by the StudyManager when opening a study.
+       This method is called when opening a study.
        \param theComponent      %SComponent corresponding to this Component
        \param theStream   The file which contains all data saved by the component on Save method
        \param isMultiFile  If the value of this boolean parameter is True, the data will be loaded from several files
@@ -1260,7 +1281,7 @@ can be called by any component and which provide the following functionality:
 
     /*! \brief Loading the data from files in ASCII format.
 
-       This method is called by the StudyManager when opening a study.
+       This method is called when opening a study.
        \param theComponent      %SComponent corresponding to this Component
        \param theStream   The file which contains all data saved by the component on Save method
        \param isMultiFile  If the value of this boolean parameter is True, the data will be loaded from several files
@@ -1271,7 +1292,7 @@ can be called by any component and which provide the following functionality:
 
     /*! \brief Closing of the study
 
-      This method Close is called by the StudyManager when closing a study.
+      This method Close is called when closing a study.
     \param aSComponent The according %SComponent
      */
 
@@ -1301,9 +1322,9 @@ study is saved these references are transformed into persintent IDs.
 
 */
     string IORToLocalPersistentID (in SObject theSObject,
-                                  in string IORString,
-                                  in boolean isMultiFile,
-                                  in boolean isASCII);
+                                   in string IORString,
+                                   in boolean isMultiFile,
+                                   in boolean isASCII);
 /*!
   Transforms PersistentID into IOR of the object. It is called for each
    object in the %study.
@@ -1320,9 +1341,9 @@ study is open, these references are transformed into persintent IORs.
 
 */
     string LocalPersistentIDToIOR (in SObject theSObject,
-                                  in string aLocalPersistentID,
-                                  in boolean isMultiFile,
-                                  in boolean isASCII)
+                                   in string aLocalPersistentID,
+                                   in boolean isMultiFile,
+                                   in boolean isASCII)
       raises (SALOME::SALOME_Exception);
 
     // Publishing in the study
@@ -1335,7 +1356,6 @@ study is open, these references are transformed into persintent IORs.
 /*! \brief Publishing in the study
 
    Publishes the given object in the %study, using the algorithm of this component.
-    \param theStudy     The %study in which the object is published
     \param theSObject     If this parameter is null the object is published for the first time. Otherwise
     this parameter should contain a reference to the object published earlier
     \param theObject      The object which is published
@@ -1344,7 +1364,7 @@ study is open, these references are transformed into persintent IORs.
 
     \return The published %SObject.
 */
-    SObject PublishInStudy(in Study theStudy, in SObject theSObject, in Object theObject, in string theName);
+    SObject PublishInStudy(in SObject theSObject, in Object theObject, in string theName);
 
     // copy/paste methods