X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=idl%2FSALOMEDS.idl;h=ea9c11942bc9300b1002f971573526b87bb152ae;hb=b0bf17f0081f052dd221d73b465d9123b139f5c3;hp=ed5f15d546e57fb63f2bf25f6b1f349977b61fc3;hpb=b9114b43aa01d06f55dcf3f0a62df984e0cfc556;p=modules%2Fkernel.git diff --git a/idl/SALOMEDS.idl b/idl/SALOMEDS.idl index ed5f15d54..ea9c11942 100644 --- a/idl/SALOMEDS.idl +++ b/idl/SALOMEDS.idl @@ -2,20 +2,20 @@ // 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. -// -// 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 +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// 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 // // // @@ -23,8 +23,8 @@ // Author : Yves FRICAUD // $Header$ -/*! \mainpage - \image html Application-About.png +/*! \mainpage + \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 @@ -62,20 +63,20 @@ module SALOMEDS 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 +Since %SALOME is a multi-study application, it allows to open a lot of studies during each working session. */ typedef sequence ListOfOpenStudies; /*! List of file names */ typedef sequence ListOfFileNames; -/*! List of modification dates of the study +/*! List of modification dates of a study */ typedef sequence ListOfDates ; /*! An unbounded sequence of strings */ typedef sequence ListOfStrings ; -/*! A byte stream which is used for binary data transfer between components +/*! A byte stream which is used for binary data transfer between different components */ typedef sequence TMPFile; @@ -96,15 +97,15 @@ during each working session. interface ChildIterator; interface Driver; interface AttributeStudyProperties; + interface AttributeParameter; interface UseCaseIterator; interface UseCaseBuilder; - interface Callback; -/*! List of attributes +/*! List of attributes of %SObjects */ typedef sequence ListOfAttributes; -/*! Exception indicating that this feature hasn't been implemented. +/*! Exception indicating that this feature hasn't been implemented in %SALOME PRO application. */ exception NotImplemented {}; @@ -127,6 +128,7 @@ during each working session. interface Study { + exception StudyInvalidContext {}; exception StudyInvalidComponent {}; /*! Invalid directory of the %study exception @@ -171,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. -
See also an example of this method usage in batchmode of %SALOME application. +
See also an example of this method usage in batchmode of %SALOME application. */ SComponent FindComponent (in string aComponentName); /*! @@ -180,25 +182,47 @@ during each working session. SComponent FindComponentID(in ID aComponentID); /*! Allows to find a %SObject by the Name Attribute of this %SObject -
See also an example of this method usage in batchmode of %SALOME application. + + \param anObjectName String parameter defining the name of the object + \return The obtained %SObject + +
See also an example of this method usage in batchmode of %SALOME application. */ 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 + */ 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 + +*/ + 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 + */ SObject FindObjectIOR (in ID aObjectIOR); /*! - Returns a list of %SObjects belonging to this %Component. The Name Attribute - of these %SObjects should correspond to anObjectName. + Finds in the study all %SObjects produced by a given %Component. + \param anObjectName The Name Attribute of the searched %SObjects should correspond to anObjectName. + \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 thePath The path to the required %SObject. + \return The obtained %SObject. + */ SObject FindObjectByPath(in string thePath); /*! @@ -208,13 +232,16 @@ during each working session. /*! Sets the context of the %Study. -
See also an example of this method usage in batchmode of %SALOME application. + \param thePath String parameter defining the context of the study. + +
See also an example of this method usage in batchmode of %SALOME application. */ void SetContext(in string thePath); /*! - Gets the context of the %Study -
See also an example of this method usage in batchmode of %SALOME application. + Gets the context of the %Study. + +
See also an example of this method usage in batchmode of %SALOME application. */ string GetContext(); @@ -238,20 +265,25 @@ during each working session. \note If the parameter theContext is empty, then the current context will be used. */ ListOfStrings GetComponentNames(in string theContext); -/*! \brief Creation of a new iterator of child levels - - Creates a new iterator of child levels of the %SObject +/*! + 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. */ ChildIterator NewChildIterator(in SObject aSO); -/*! \brief Creation of a new iterator of the %SComponent +/*! + + Creates a new iterator of the %SComponents. - Creates a new iterator of the %SComponent. + \return A new iterator of the %SComponents. */ SComponentIterator NewComponentIterator(); -/*! \brief Creation of a %StudyBuilder - +/*! Creates a new %StudyBuilder to add or modify an object in the study. -
See also an example of this method usage in batchmode of %SALOME application. + + \return A new %StudyBuilder. + +
See also an example of this method usage in batchmode of %SALOME application. */ StudyBuilder NewBuilder() ; @@ -264,7 +296,8 @@ during each working session. /*! \brief Getting properties of the study Returns the attriubte, which contains the properties of this study. -
See also an example of this method usage in batchmode of %SALOME application. + +
See also an example of this method usage in batchmode of %SALOME application. */ AttributeStudyProperties GetProperties(); @@ -324,6 +357,75 @@ during each working session. Enables(if isEnabled = True)/disables automatic addition of new %SObjects to the use case. */ void EnableUseCaseAutoFilling(in boolean isEnabled); + +/*! + Functions for internal usage only +*/ + void AddPostponed(in string theIOR); + + void AddCreatedPostponed(in string theIOR); + + 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(); + + }; //========================================================================== @@ -351,52 +453,70 @@ during each working session. Creates a new %SComponent \param ComponentDataType Data type of the %SComponent which will be created. -
See also an example of this method usage in batchmode of %SALOME application. +
See also an example of this method usage in batchmode of %SALOME application. */ - SComponent NewComponent(in string ComponentDataType); + SComponent NewComponent(in string ComponentDataType) raises(LockProtection); /*! \brief Definition of the instance to the %SComponent Defines the instance to the %SComponent. */ - void DefineComponentInstance (in SComponent aComponent,in Object ComponentIOR); -/*! \brief Deletion of the %SComponent + void DefineComponentInstance (in SComponent aComponent,in Object ComponentIOR) raises(LockProtection); + +/*! \brief Deletion of a %SComponent - Removes the %SComponent. + Removes a %SComponent. */ - void RemoveComponent(in SComponent aComponent); + void RemoveComponent(in SComponent aComponent) raises(LockProtection); /*! \brief Creation of a new %SObject - Creates a new %SObject. -
See also an example of this method usage in batchmode of %SALOME application. + Creates a new %SObject under a definite father %SObject. + + \param theFatherObject The father %SObject under which this one should be created. + \return New %SObject + +
See also an example of this method usage in batchmode of %SALOME application. */ - SObject NewObject (in SObject theFatherObject); + + SObject NewObject (in SObject theFatherObject) raises(LockProtection); + /*! \brief Creation of a new %SObject with a definite %tag Creates a new %SObject with a definite %tag. + + \param atag Long value corresponding to the tag of the new %SObject. + \return New %SObject + */ - SObject NewObjectToTag (in SObject theFatherObject, in long atag); + 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. */ - void RemoveObject (in SObject anObject); + 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. */ - void RemoveObjectWithChildren(in SObject anObject); + void RemoveObjectWithChildren(in SObject anObject) raises(LockProtection); /*! Loads a %SComponent. -
See also an example of this method usage in batchmode of %SALOME application. + +
See also an example of this method usage in batchmode of %SALOME application. */ void LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception); /*! Loads a %SObject. + + \param sco %SObject to be loaded. */ void Load (in SObject sco); @@ -406,13 +526,13 @@ during each working session. \param anObject The %SObject corresponding to the attribute which is looked for. \param aTypeOfAttribute Type of the attribute. -
See also an example of this method usage in batchmode of %SALOME application. +
See also an example of this method usage in batchmode of %SALOME application. */ GenericAttribute FindOrCreateAttribute(in SObject anObject, - in string aTypeOfAttribute); + in string aTypeOfAttribute) raises(LockProtection); -/*! \brief Looking for an attribute assigned to %SObject +/*! \brief Looking for an attribute assigned to a %SObject 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. @@ -430,48 +550,68 @@ during each working session. \param anObject The %SObject corresponding to the attribute. \param aTypeOfAttribute Type of the attribute. -
See also an example of this method usage in batchmode of %SALOME application. +
See also an example of this method usage in batchmode of %SALOME application. */ void RemoveAttribute(in SObject anObject, - in string aTypeOfAttribute); -/*! \brief Addition of a reference - + 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 */ void Addreference(in SObject anObject, in SObject theReferencedObject) ; + +/*! + Removes a reference from %anObject to another object. + \param anObject The %SObject which contains a reference +*/ + + void RemoveReference(in SObject anObject) ; + /*! Adds a directory in the %Study. -
See also an example of this method usage in batchmode of %SALOME application. + \param theName String parameter defining the name of the directory. + +
See also an example of this method usage in batchmode of %SALOME application. */ - void AddDirectory(in string theName); + void AddDirectory(in string theName) raises(LockProtection); /*! \brief Identification of the %SObject's substructure. Identification of the %SObject's substructure by GUID. - It has the following format "00000000-0000-0000-0000-000000000000" + + + \param anObject The %SObject which will be identified + \param theGUID GUID has the following format "00000000-0000-0000-0000-000000000000" */ - void SetGUID(in SObject anObject, in string theGUID); + 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 %SObject has GUID. +\param anObject A definite %SObject which will be identified +\param theGUID GUID has the following format "00000000-0000-0000-0000-000000000000" */ boolean IsGUID(in SObject anObject, in string theGUID); /*! \brief Creation of a new command Creates a new command which can contain several different actions. -
See also an example of this method usage in batchmode of %SALOME application. + +
See also an example of this method usage in batchmode of %SALOME application. */ void NewCommand(); // command management /*! \brief Execution of the command Commits all actions declared within this command. -
See also an example of this method usage in batchmode of %SALOME application. + + \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications. + +
See also an example of this method usage in batchmode of %SALOME application. */ void CommitCommand() raises(LockProtection); // command management @@ -482,7 +622,8 @@ during each working session. /*! \brief Cancelation of the command Cancels all actions declared within the command. -
See also an example of this method usage in batchmode of %SALOME application. + +
See also an example of this method usage in batchmode of %SALOME application. */ void AbortCommand(); // command management /*! \brief Undolimit @@ -493,38 +634,60 @@ during each working session. /*! \brief Undo method Cancels all actions of the last command. -
See also an example of this method usage in batchmode of %SALOME application. + + \exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications. + +
See also an example of this method usage in batchmode of %SALOME application. */ void Undo() raises (LockProtection); /*! \brief Redo method Redoes all actions of the last command. -
See also an example of this method usage in batchmode of %SALOME application. + +\exception LockProtection This exception is raised, when trying to perform this command a study, which is protected for modifications. + +
See also an example of this method usage in batchmode of %SALOME application. */ void Redo() raises (LockProtection); /*! Returns True if at this moment there are any actions which can be canceled. -
See also an example of this method usage in batchmode of %SALOME application. + +
See also an example of this method usage in batchmode of %SALOME application. */ boolean GetAvailableUndos(); /*! Returns True if at this moment there are any actions which can be redone. -
See also an example of this method usage in batchmode of %SALOME application. + +
See also an example of this method usage in batchmode of %SALOME application. */ boolean GetAvailableRedos(); /*! - Sets the callback for addition of the given %SObject. Returns the previous callback. + 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. */ - Callback SetOnAddSObject(in Callback theCallback); + void SetName(in SObject theSO, in string theValue) raises (LockProtection); + /*! - Sets the callback for removal of the given %SObject. Returns the previous callback. + Puts comment attribute with the given string value to the given %SObject + + \param theSO Existing SObject to set comment attribute. + \param theValue The value to be set to the comment attribute. */ - Callback SetOnRemoveSObject(in Callback theCallback); + void SetComment(in SObject theSO, in string theValue) raises (LockProtection); + +/*! + Puts IOR attribute with the given string value to the given %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); }; //========================================================================== @@ -545,10 +708,13 @@ during each working session. */ void ping(); -/*! \brief Creation of a new %Study +/*! \brief Creation of a new study + + Creates a new study with a definite name. - Creates a new %Study with a definite name. -
See also an example of this method usage in batchmode of %SALOME application. + \param study_name String parameter defining the name of the study + +
See also an example of this method usage in batchmode of %SALOME application. */ Study NewStudy(in string study_name); @@ -556,67 +722,80 @@ during each working session. /*! \brief Open a study 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. -
See also an example of this method usage in batchmode of %SALOME application. + +
See also an example of this method usage in batchmode of %SALOME application. */ Study Open (in URL aStudyUrl) raises (SALOME::SALOME_Exception); /*! \brief Closing the study - Closes the study. + Closes a study. */ void Close(in Study aStudy); /*! \brief Saving the study in a HDF file (or files). - Saves the study. + Saves a study. + \param theMultiFile If this parameter is True the study will be saved in several files. -
See also an example of this method usage in batchmode of %SALOME application. + +
See also an example of this method usage in batchmode of %SALOME application. */ - void Save(in Study aStudy, in boolean theMultiFile); -/*! \brief Saving the study in a ASCII file (or files). + boolean Save(in Study aStudy, in boolean theMultiFile); +/*! \brief Saving a study in a ASCII file (or files). - Saves the study in a ASCII format. + 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). + \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. -
See also an example of this method usage in batchmode of %SALOME application. +
See also an example of this method usage in batchmode of %SALOME application. */ - 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). Saves the study in a specified ASCII file (or files). + + \param aUrl The path to the definite file in whcih the study will be saved + \param aStudy The study which will be saved \param theMultiFile If this parameter is True the study will be saved in several files. */ - 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) /*! \brief List of open studies. - Returns the list of open studies in the current session. +Gets the list of open studies + + \return A list of open studies in the current session. */ ListOfOpenStudies GetOpenStudies(); /*! \brief Getting a particular %Study picked by name Activates a particular %Study - amongst the session collection picking it by name. + among the session collection picking it by name. + \param aStudyName The name of the study */ Study GetStudyByName (in string aStudyName); /*! \brief Getting a particular %Study picked by ID Activates a particular %Study - amongst the session collection picking it by ID. + among the session collection picking it by ID. + \param aStudyID The ID of the study */ Study GetStudyByID (in short aStudyID); @@ -628,16 +807,44 @@ during each working session. 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 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 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. */ 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); + + }; @@ -647,6 +854,7 @@ during each working session. 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 +
Tag of an item in %SALOME application is an integer value uniquely defining an item in the tree-type data structure.
ID of an item is a description of item's position in the tree-type data structure. @@ -654,61 +862,104 @@ during each working session. */ //========================================================================== - interface SObject + interface SObject : SALOME::GenericObj { /*! Name of the %SObject */ attribute string Name; // equivalent to setName() & getName() -/*! \brief Getting an object %ID +/*! Gets an object %ID - Returns ID of the %SObject. + \return ID of the %SObject. */ ID GetID(); -/*! \brief Acquisition of the father %Component of the %SObject +/*! Acquisition of the father %Component of the %SObject - Returns the father %Component of the %SObject. + \return The father %Component of the %SObject. */ SComponent GetFatherComponent(); -/*! \brief Acquisition of the father %SObject of the %SObject +/*! Acquisition of the father %SObject of the %SObject - Returns the father %SObject of the given %SObject. + \return the father %SObject of the given %SObject. */ SObject GetFather(); -/*! \brief %Tag of %SObject +/*! Gets the %tag of a %SObject - Returns the %tag of the %SObject. + \return the %tag of a %SObject. */ short Tag(); -/*! \brief Looking for subobjects of an object. +/*! Gets the depth of a %SObject - Returns True if it finds a subobject of the %SObject with a definite tag. + \return the depth of a %SObject. +*/ + short Depth(); +/*! 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); -/*! \brief Looking for attributes of the %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. - Returns True if it finds an attribute of a definite type of the %SObject. -
See also an example of this method usage in batchmode of %SALOME application. +
See also an example of this method usage in batchmode of %SALOME application. */ boolean FindAttribute(out GenericAttribute anAttribute, in string aTypeOfAttribute); -/*! - Returns the object which this %SObject refers to. It also returns True if it finds +/*! 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 -/*! \brief Getting all attributes of the %SObject +/*! Gets all attributes of a given %SObject + + \return The list of all attributes of the given %SObject. - Returns the list of all attributes of the %SObject. -
See also an example of this method usage in batchmode of %SALOME application. +
See also an example of this method usage in batchmode of %SALOME application. */ ListOfAttributes GetAllAttributes(); -/*! \brief Returning the study +/*! Gets the study of a given %SObject. - Returns 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. +*/ + Object GetObject(); + +/*! + Returns the name attribute value of this SObject. + Returns empty string if there is no name attribute. +*/ + string GetName(); + +/*! + Returns the comment attribute value of this SObject. + Returns empty string if there is no comment attribute. +*/ + string GetComment(); + +/*! + Returns the IOR attribute value of this SObject. + 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); }; @@ -718,7 +969,7 @@ during each working session. %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 @@ -728,9 +979,24 @@ during each working session. /*! \brief Method CheckLocked Checks whether the %Study is protected for modifications. - \note
This exception is raised only outside the transaction. + + \note
This exception is raised only outside a transaction. */ void CheckLocked() raises (LockProtection); + + 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); }; @@ -745,13 +1011,14 @@ during each working session. //========================================================================== interface SComponent : SObject { -/*! \brief Data type of the %SComponent +/*! Gets the data type of the given %SComponent - Returns the data type of the %SComponent. + \return The data type of this %SComponent. */ string ComponentDataType(); -/*! - Returns IOR of the according component. +/*! Gets the IOR of the given component + + \return True (if there is an instance of the given component) and its IOR. */ boolean ComponentIOR (out ID theID); //returns True if there is an instance //In this case ID identifies this one @@ -765,26 +1032,25 @@ during each working session. The search is started from the first %SComponent in the list. */ //========================================================================== - interface SComponentIterator + interface SComponentIterator : SALOME::GenericObj { -/*! \brief Initialization of the Iterator - +/*! Activates the %SComponentIterator. */ void Init(); -/*! \brief Method More +/*! Method More - Returns True if there is one more %SComponent in the list. + \return True if there is one more %SComponent in the list. */ boolean More(); -/*! \brief Moving the iterator to the next %SComponent - +/*! Moves the iterator to the next %SComponent in the list. */ void Next(); /*! Returns the %SComponent corresponding to the current %SComponent found by the iterator. -
See also an example of this method usage in batchmode of %SALOME application. + +
See also an example of this method usage in batchmode of %SALOME application. */ SComponent Value(); @@ -797,21 +1063,23 @@ Moves the iterator to the next %SComponent in the list. levels. */ //========================================================================== - interface ChildIterator + interface ChildIterator : SALOME::GenericObj { -/*! \brief Initialization of the Iterator. +/*! Activates the %ChildIterator. */ void Init(); -/*! \brief Initialization of the Iterator for all child levels. +/*! + +Activates the %ChildIterator for all child levels. -Activates the %ChildIterator (if True) 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); -/*! \brief Method More +/*! Method More - Returns True if the %ChildIterator finds one more child level. + \return True if there is one more %ChildIterator in the list. */ boolean More(); /*! @@ -830,16 +1098,16 @@ Activates the %ChildIterator (if True) 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 { -/*! \brief Initialization of the Iterator. - -Activates the %UseCaseIterator. If allLevels is True the Iterator is activated for all subobjects. +/*! +Activates the %UseCaseIterator. +\param allLevels If the value of this parameter is True the Iterator is activated for all subobjects. */ void Init(in boolean allLevels); -/*! \brief Method More +/*! Method More - Returns True if the %UseCaseIterator finds one more object. + \return True if the %UseCaseIterator finds one more object. */ boolean More(); /*! @@ -859,14 +1127,20 @@ Activates the %UseCaseIterator. If allLevels is True the Iterator is 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 theObject as a child of the current object of the use case. + Adds to the use case an object as a child of the current object of the use case. + + \param theObject The added %SObject. + \return True if this %SObject has been added in the use case. */ boolean Append(in SObject theObject); /*! - Removes an object theObject from the use case. + Removes an object from the use case. + + \param theObject The deleted %SObject + \return True if this %SObject has been deleted from the use case. */ boolean Remove(in SObject theObject); /*! @@ -915,47 +1189,48 @@ Activates the %UseCaseIterator. If allLevels is True the Iterator is UseCaseIterator GetUseCaseIterator(in SObject theObject); }; //========================================================================== - //========================================================================== -/*! \brief The callback interface - - The %StudyBuilder can be created with the method NewBuilder. While invocation of this method a new object of the class Callback 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 Append of the %UseCaseBuilder. -*/ - void OnAddSObject(in SObject theObject); -/*! - Invokes the corresponding method Remove of the %UseCaseBuilder. -*/ - void OnRemoveSObject(in SObject theObject); - }; - - //========================================================================== /*! \brief %Driver interface - This interface contains a set of methods used for the management - of the object produced in the %study by a component. +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 +can be called by any component and which provide the following functionality: +
    +
  • publishing in the study of the objects created by a definite component +
  • 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. +
  • transforming of the transient references into persistant references (or vice versa) of the SObjects when saving (or loading) a study +
  • copy/paste common functionality. These methods can be called by any component in order to copy/paste its object created in the study +
+ */ //========================================================================== interface Driver { - /*! \brief Saving the data. + /*! \brief Saving the data produced by a definite component. This method is called by the StudyManager 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 -
See also an example of this method usage in batchmode of %SALOME application. +
See also an example of this method usage in batchmode of %SALOME application. */ TMPFile Save(in SComponent theComponent, in string theURL, in boolean isMultiFile); +/*! \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. + \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 + +
See also an example of this method usage in batchmode of %SALOME application. + + */ TMPFile SaveASCII(in SComponent theComponent, in string theURL, in boolean isMultiFile); /*! \brief Loading the data. @@ -963,32 +1238,53 @@ Activates the %UseCaseIterator. If allLevels is True the Iterator is This method is called by the StudyManager 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 + */ boolean Load(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile); + /*! \brief Loading the data from files in ASCII format. + + This method is called by the StudyManager 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 + + */ + boolean LoadASCII(in SComponent theComponent, in TMPFile theStream, in string theURL, in boolean isMultiFile); /*! \brief Closing of the study This method Close is called by the StudyManager when closing a study. - + \param aSComponent The according %SComponent */ void Close (in SComponent aSComponent); //void Close ( in string aIORSComponent); - /*! \brief The type of the data + /*! Gets the type of the data - Returns the type of data produced by the Component in the study. + \return The type of data produced by the Component in the study. */ string ComponentDataType(); // Driver Transient -> persistent called for each object in study /*! - Transforms IOR into PersistentID of the object. It is called for each + Transforms IOR of a given %SObject into PersistentID. It is called for each object in the %study. +\note
In %SALOME the objects which are present in an active study are identified by an IOR, when this +study is saved these references are transformed into persintent IDs. + + \param theSObject The given %SObject. + \param IORString The IOR of the given %SObject. + \param isMultiFile If this parameter is True the study containing the given %SObject is stored in several files. + \param isASCII If this parameter is True the study containing the given %SObject is stored in ASCII format. + + \return The persistent ID of the given %SObject + */ string IORToLocalPersistentID (in SObject theSObject, in string IORString, @@ -997,6 +1293,17 @@ Activates the %UseCaseIterator. If allLevels is True the Iterator is /*! Transforms PersistentID into IOR of the object. It is called for each object in the %study. + + \note
In %SALOME the objects which are present in an saved study (file) are identified by a persistent ID, when this +study is open, these references are transformed into persintent IORs. + + \param theSObject The given %SObject. + \param IORString The IOR of the given %SObject. + \param isMultiFile If this parameter is True the study containing the given %SObject is stored in several files. + \param isASCII If this parameter is True the study containing the given %SObject is stored in ASCII format. + + \return The IOR of the given %SObject + */ string LocalPersistentIDToIOR (in SObject theSObject, in string aLocalPersistentID, @@ -1005,9 +1312,10 @@ Activates the %UseCaseIterator. If allLevels is True the Iterator is raises (SALOME::SALOME_Exception); // Publishing in the study -/*! \brief Publishing in the study +/*! Publishing in the study - Returns True if the given %Component can publish the %object in the %study. + \return True if the given %Component can publish a definite object with a given IOR in the %study. + \param theIOR The IOR of a definite object */ boolean CanPublishInStudy(in Object theIOR) raises (SALOME::SALOME_Exception); /*! \brief Publishing in the study @@ -1019,6 +1327,8 @@ Activates the %UseCaseIterator. If allLevels is True the Iterator is \param theObject The object which is published \param theName The name of the published object. If this parameter is empty, the name is generated automatically by the component. + + \return The published %SObject. */ SObject PublishInStudy(in Study theStudy, in SObject theSObject, in Object theObject, in string theName); @@ -1026,6 +1336,8 @@ Activates the %UseCaseIterator. If allLevels is True the Iterator is /*! Returns True, if the given %SObject can be copied to the clipboard. + + \param theObject The given %SObject which should be copied. */ boolean CanCopy(in SObject theObject); /*!