Back to index

salome-kernel  6.5.0
Classes | Public Types | Public Member Functions | Public Attributes
SALOMEDS::Study Interface Reference

Study Interface More...

import "SALOMEDS.idl";

Collaboration diagram for SALOMEDS::Study:
Collaboration graph
[legend]

List of all members.

Classes

exception  StudyCommentError
 Invalid study comment. More...
exception  StudyInvalidComponent
 Invalid study component. More...
exception  StudyInvalidContext
 Invalid study context. More...
exception  StudyInvalidDirectory
 Invalid directory of the study exception. More...
exception  StudyNameAlreadyUsed
 Exception pointing that this name of the study has already been used. More...
exception  StudyNameError
 Invalid name of the study exception. More...
exception  StudyObjectAlreadyExists
 study object already exists More...

Public Types

typedef sequence< SObjectListOfSObject
 Sequence containing SObjects.

Public Member Functions

PersistentReference GetPersistentReference ()
 Get the persistent reference to the Study.
SalomeReference GetTransientReference ()
 Get a transient reference to the Study.
boolean IsEmpty ()
 indicate whether the Study is empty
SComponent FindComponent (in string aComponentName)
 Find a SComponent by its name.
SComponent FindComponentID (in ID aComponentID)
 Find a SComponent by ID of the according SObject.
SObject FindObject (in string anObjectName)
 Find a SObject by the Name Attribute of this SObject.
SObject FindObjectID (in ID aObjectID)
 Find a SObject by its ID.
SObject CreateObjectID (in ID aObjectID)
 Create a SObject by its ID.
SObject FindObjectIOR (in ID aObjectIOR)
 Find a SObject by IOR of the object belonging to this SObject.
ListOfSObject FindObjectByName (in string anObjectName, in string aComponentName)
 Find in the study all SObjects produced by a given Component.
SObject FindObjectByPath (in string thePath)
 Find a SObject by the path to it.
string GetObjectPath (in Object theObject)
 Get the path to the SObject.
void SetContext (in string thePath)
 Set the context of the Study.
string GetContext ()
 Get the context of the Study.
ListOfStrings GetObjectNames (in string theContext)
 Get a list of names of objects corresponding to the context.
ListOfStrings GetDirectoryNames (in string theContext)
 Get a list of names of directories and subdirectories corresponding to the context.
ListOfStrings GetFileNames (in string theContext)
 Get a list of names of Files corresponding to the context.
ListOfStrings GetComponentNames (in string theContext)
 Get a list of names of Components corresponding to the context.
ChildIterator NewChildIterator (in SObject aSO)
 Create a new iterator of child levels of the given SObject.
SComponentIterator NewComponentIterator ()
 Create a new iterator of the SComponents.
StudyBuilder NewBuilder ()
 Create a new StudyBuilder to add or modify an object in the study.
void UpdateIORLabelMap (in string anIOR, in string anEntry)
 Labels dependency.
AttributeStudyProperties GetProperties ()
 Getting properties of the study.
boolean IsModified ()
 Indicate whether the study has been modified and not saved.
void Modified ()
 Mark the study as being modified and not saved.
ListOfSObject FindDependances (in SObject anObject)
 List of SObjects.
string GetLastModificationDate ()
 The date of the last saving of the study.
ListOfDates GetModificationsDate ()
 The list of modification dates of the study.
string ConvertObjectToIOR (in Object theObject)
 Object conversion.
Object ConvertIORToObject (in string theIOR)
 Object conversion.
UseCaseBuilder GetUseCaseBuilder ()
 Get a new UseCaseBuilder.
void Close ()
 Close the components in the study, remove itself from the StudyManager.
void EnableUseCaseAutoFilling (in boolean isEnabled)
 Enable (if isEnabled = True)/disable automatic addition of new SObjects to the use case.
void AddPostponed (in string theIOR)
 Functions for internal usage only.
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, in boolean isMultiFile)
AttributeParameter GetCommonParameters (in string theID, in long theSavePoint)
 Get an AttributeParameter used to store common parameters for given theSavePoint.
AttributeParameter GetModuleParameters (in string theID, in string theModuleName, in long theSavePoint)
 Get an AttributeParameter used to store parameters for given theModuleName.
string GetDefaultScript (in string theID, in string theModuleName)
 Get a default Python script to restore visual parameters for given theModuleName.
long long GetLocalImpl (in string theHostname, in long thePID, out boolean isLocal)
 Private method, returns an implementation of this Study.
void SetStudyLock (in string theLockerID)
 Mark this Study as being locked by the given locker.
boolean IsStudyLocked ()
 Indicate if the Study is locked.
void UnLockStudy (in string theLockerID)
 Mark this Study as being unlocked by the given locker.
ListOfStrings GetLockerID ()
 Get the list of IDs of the Study's lockers.
void SetReal (in string theVarName, in double theValue)
 Create real variable with Name theVarName and value theValue.
void SetInteger (in string theVarName, in long theValue)
 Create integer variable with Name theVarName and value theValue.
void SetBoolean (in string theVarName, in boolean theValue)
 Create boolean variable with Name theVarName and value theValue.
void SetString (in string theVarName, in string theValue)
 Create string variable with Name theVarName and value theValue.
void SetStringAsDouble (in string theVarName, in double theValue)
 Set current value as double for string variable.
double GetReal (in string theVarName)
 Get value of a real variable.
long GetInteger (in string theVarName)
 Get value of an integer variable.
boolean GetBoolean (in string theVarName)
 Get value of a boolean variable.
string GetString (in string theVarName)
 Get value of a string variable.
boolean IsReal (in string theVarName)
 Indicate if a variable is real.
boolean IsInteger (in string theVarName)
 Indicate if a variable is integer.
boolean IsBoolean (in string theVarName)
 Indicate if a variable is boolean.
boolean IsString (in string theVarName)
 Indicate if a variable is string.
boolean IsVariable (in string theVarName)
 Indicate if a variable exists in the study.
ListOfStrings GetVariableNames ()
 Get names of all variables from the study.
boolean RemoveVariable (in string theVarName)
 Remove a variable.
boolean RenameVariable (in string theVarName, in string theNewVarName)
 Rename a variable.
boolean IsVariableUsed (in string theVarName)
 Indicate whether variable is used.
ListOfListOfStrings ParseVariables (in string theVars)
 Parse variables used for object creation.
void attach (in SALOMEDS::Observer theObserver, in boolean modify)
 Attach an observer to the Study.

Public Attributes

attribute string Name
 The name of the Study.
attribute short StudyId
 The ID of the Study.
attribute boolean IsSaved
 Indicate whether the study has been saved.
attribute string URL
 Indicate the file where the study has been saved.

Detailed Description

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:

The Path 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 '/'.
The Context is the current directory of an object.

Definition at line 125 of file SALOMEDS.idl.


Class Documentation

exception SALOMEDS::Study::StudyCommentError

Invalid study comment.

Definition at line 141 of file SALOMEDS.idl.

exception SALOMEDS::Study::StudyInvalidComponent

Invalid study component.

Definition at line 131 of file SALOMEDS.idl.

exception SALOMEDS::Study::StudyInvalidContext

Invalid study context.

Definition at line 129 of file SALOMEDS.idl.

exception SALOMEDS::Study::StudyInvalidDirectory

Invalid directory of the study exception.

Definition at line 133 of file SALOMEDS.idl.

exception SALOMEDS::Study::StudyNameAlreadyUsed

Exception pointing that this name of the study has already been used.

Definition at line 135 of file SALOMEDS.idl.

exception SALOMEDS::Study::StudyNameError

Invalid name of the study exception.

Definition at line 139 of file SALOMEDS.idl.

exception SALOMEDS::Study::StudyObjectAlreadyExists

study object already exists

Definition at line 137 of file SALOMEDS.idl.


Member Typedef Documentation

Sequence containing SObjects.

Definition at line 154 of file SALOMEDS.idl.


Member Function Documentation

void SALOMEDS::Study::AddCreatedPostponed ( in string  theIOR)
void SALOMEDS::Study::AddPostponed ( in string  theIOR)

Functions for internal usage only.

void SALOMEDS::Study::attach ( in SALOMEDS::Observer  theObserver,
in boolean  modify 
)

Attach an observer to the Study.

Parameters:
theObserver

Close the components in the study, remove itself from the StudyManager.

Object SALOMEDS::Study::ConvertIORToObject ( in string  theIOR)

Object conversion.

Converts IOR into an object.

Returns:
An object
string SALOMEDS::Study::ConvertObjectToIOR ( in Object  theObject)

Object conversion.

Converts an object into IOR.

Returns:
IOR

Create a SObject by its ID.

Parameters:
aObjectIDThis parameter defines the ID of the required object
Returns:
The created SObject
boolean SALOMEDS::Study::DumpStudy ( in string  thePath,
in string  theBaseName,
in boolean  isPublished,
in boolean  isMultiFile 
)
void SALOMEDS::Study::EnableUseCaseAutoFilling ( in boolean  isEnabled)

Enable (if isEnabled = True)/disable automatic addition of new SObjects to the use case.

SComponent SALOMEDS::Study::FindComponent ( in string  aComponentName)

Find a SComponent by its name.

Parameters:
aComponentNameIt's a string value in the Comment Attribute of the Component, which is looked for, defining the data type of this Component.

See example1 for an example of this method usage in batchmode of SALOME application.

Find a SComponent by ID of the according SObject.

List of SObjects.

Returns the list of SObjects which refers to anObject.

SObject SALOMEDS::Study::FindObject ( in string  anObjectName)

Find a SObject by the Name Attribute of this SObject.

\param anObjectName String parameter defining the name of the object
\return The obtained %SObject

See example19 for an example of this method usage in batchmode of SALOME application.

ListOfSObject SALOMEDS::Study::FindObjectByName ( in string  anObjectName,
in string  aComponentName 
)

Find in the study all SObjects produced by a given Component.

Parameters:
anObjectNameThe Name Attribute of the searched SObjects should correspond to anObjectName.
aComponentNameThe name of the component, which objects are searched for.

Find a SObject by the path to it.

Parameters:
thePathThe path to the required SObject.
Returns:
The obtained SObject.

Find a SObject by its ID.

Parameters:
aObjectIDThis parameter defines the ID of the required object
Returns:
The obtained SObject

Find a SObject by IOR of the object belonging to this SObject.

Parameters:
anObjectNameThis parameter defines the IOR of the object
Returns:
The obtained SObject
boolean SALOMEDS::Study::GetBoolean ( in string  theVarName)

Get value of a boolean variable.

Parameters:
theVarNameis a name of the variable.
AttributeParameter SALOMEDS::Study::GetCommonParameters ( in string  theID,
in long  theSavePoint 
)

Get an AttributeParameter used to store common parameters for given theSavePoint.

Parameters:
theIDidentifies a common parameters set (Example: "Interface Applicative")
theSavePointis number of a set of parameters as there can be several sets

Get a list of names of Components corresponding to the context.

Note:
If the parameter theContext is empty, then the current context will be used.

Get the context of the Study.

See example23 for an example of this method usage in batchmode of SALOME application.

string SALOMEDS::Study::GetDefaultScript ( in string  theID,
in string  theModuleName 
)

Get a default Python script to restore visual parameters for given theModuleName.

Parameters:
theIDidentifies a common parameters set (Example: "Interface Applicative")
theModuleNameis a name of the module (Example: "Geometry")

Get a list of names of directories and subdirectories corresponding to the context.

Note:
If the parameter theContext is empty, then the current context will be used.
ListOfStrings SALOMEDS::Study::GetFileNames ( in string  theContext)

Get a list of names of Files corresponding to the context.

Note:
If the parameter theContext is empty, then the current context will be used.
long SALOMEDS::Study::GetInteger ( in string  theVarName)

Get value of an integer variable.

Parameters:
theVarNameis a name of the variable.

The date of the last saving of the study.

Returns the date of the last saving of study with format: "DD/MM/YYYY HH:MM"

long long SALOMEDS::Study::GetLocalImpl ( in string  theHostname,
in long  thePID,
out boolean  isLocal 
)

Private method, returns an implementation of this Study.

Parameters:
theHostnameis a hostname of the caller
thePIDis a process ID of the caller
isLocalis set True if the Study is launched locally with the caller

Get the list of IDs of the Study's lockers.

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.

AttributeParameter SALOMEDS::Study::GetModuleParameters ( in string  theID,
in string  theModuleName,
in long  theSavePoint 
)

Get an AttributeParameter used to store parameters for given theModuleName.

Parameters:
theIDidentifies a common parameters set (Example: "Interface Applicative")
theModuleNameis a name of the module (Example: "Geometry")
theSavePointis number of a set of parameters as there can be several sets

Get a list of names of objects corresponding to the context.

Note:
If the parameter theContext is empty, then the current context will be used.
string SALOMEDS::Study::GetObjectPath ( in Object  theObject)

Get the path to the SObject.

Get the persistent reference to the Study.

Getting properties of the study.

Returns the attribute, which contains the properties of this study.

See example20 for an example of this method usage in batchmode of SALOME application.

double SALOMEDS::Study::GetReal ( in string  theVarName)

Get value of a real variable.

Parameters:
theVarNameis a name of the variable.
string SALOMEDS::Study::GetString ( in string  theVarName)

Get value of a string variable.

Parameters:
theVarNameis a name of the variable.

Get a transient reference to the Study.

Get a new UseCaseBuilder.

Get names of all variables from the study.

boolean SALOMEDS::Study::IsBoolean ( in string  theVarName)

Indicate if a variable is boolean.

Return true if variable is boolean otherwise return false.

Parameters:
theVarNameis a name of the variable.

indicate whether the Study is empty

Returns:
True if the Study is empty
boolean SALOMEDS::Study::IsInteger ( in string  theVarName)

Indicate if a variable is integer.

Return true if variable is integer otherwise return false.

Parameters:
theVarNameis a name of the variable.

Indicate whether the study has been modified and not saved.

Returns True if the study has been modified and not saved.

boolean SALOMEDS::Study::IsReal ( in string  theVarName)

Indicate if a variable is real.

Return true if variable is real otherwise return false.

Parameters:
theVarNameis a name of the variable.

Here is the caller graph for this function:

boolean SALOMEDS::Study::IsString ( in string  theVarName)

Indicate if a variable is string.

Return true if variable is string otherwise return false.

Parameters:
theVarNameis a name of the variable.

Indicate if the Study is locked.

Returns True if the Study was marked locked.

boolean SALOMEDS::Study::IsVariable ( in string  theVarName)

Indicate if a variable exists in the study.

Return true if variable exists in the study, otherwise return false.

Parameters:
theVarNameis a name of the variable.
boolean SALOMEDS::Study::IsVariableUsed ( in string  theVarName)

Indicate whether variable is used.

Check that variable is used in the study.

Parameters:
theVarNameName of the variable.
Returns:
Variable usage.

Mark the study as being modified and not saved.

Create a new StudyBuilder to add or modify an object in the study.

Returns:
A new StudyBuilder.

See example20 for an example of this method usage in batchmode of SALOME application.

Create a new iterator of child levels of the given SObject.

Parameters:
aSOThe given SObject
Returns:
A new iterator of child levels of the given SObject.

Create a new iterator of the SComponents.

Returns:
A new iterator of the SComponents.

Parse variables used for object creation.

Parameters:
stringwith variables, separated by special symbol.
Returns:
Variables list.
void SALOMEDS::Study::RemovePostponed ( in long  theUndoLimit)
boolean SALOMEDS::Study::RemoveVariable ( in string  theVarName)

Remove a variable.

Remove variable with the specified name from the study with substitution of its value.

Parameters:
theVarNameName of the variable.
Returns:
Status of operation.
boolean SALOMEDS::Study::RenameVariable ( in string  theVarName,
in string  theNewVarName 
)

Rename a variable.

Rename variable with the specified name within the study.

Parameters:
theVarNameName of the variable.
theNewVarNameNew name for the variable.
Returns:
Status of operation.
void SALOMEDS::Study::SetBoolean ( in string  theVarName,
in boolean  theValue 
)

Create boolean variable with Name theVarName and value theValue.

(or set if variable value into theValue already exists)

Parameters:
theVarNameis a name of the variable
theVarNameis a value of the variable.
void SALOMEDS::Study::SetContext ( in string  thePath)

Set the context of the Study.

\param thePath String parameter defining the context of the study.

See example23 for an example of this method usage in batchmode of SALOME application.

void SALOMEDS::Study::SetInteger ( in string  theVarName,
in long  theValue 
)

Create integer variable with Name theVarName and value theValue.

(or set if variable value into theValue already exists)

Parameters:
theVarNameis a name of the variable
theVarNameis a value of the variable.
void SALOMEDS::Study::SetReal ( in string  theVarName,
in double  theValue 
)

Create real variable with Name theVarName and value theValue.

(or set if variable value into theValue already exists)

Parameters:
theVarNameis a name of the variable
theVarNameis a value of the variable.
void SALOMEDS::Study::SetString ( in string  theVarName,
in string  theValue 
)

Create string variable with Name theVarName and value theValue.

(or set if variable value into theValue already exists)

Parameters:
theVarNameis a name of the variable
theVarNameis a value of the variable.
void SALOMEDS::Study::SetStringAsDouble ( in string  theVarName,
in double  theValue 
)

Set current value as double for string variable.

void SALOMEDS::Study::SetStudyLock ( in string  theLockerID)

Mark this Study as being locked by the given locker.

The lock status can be checked by method IsStudyLocked

Parameters:
theLockerIDidentifies a locker of the study can be for ex. IOR of the engine that locks the study.
void SALOMEDS::Study::UndoPostponed ( in long  theWay)
void SALOMEDS::Study::UnLockStudy ( in string  theLockerID)

Mark this Study as being unlocked by the given locker.

The lock status can be checked by method IsStudyLocked

Parameters:
theLockerIDidentifies a locker of the study can be for ex. IOR of the engine that unlocks the study.
void SALOMEDS::Study::UpdateIORLabelMap ( in string  anIOR,
in string  anEntry 
)

Labels dependency.

Updates the map with IOR attribute. It's an inner method used for optimization.


Member Data Documentation

attribute boolean SALOMEDS::Study::IsSaved

Indicate whether the study has been saved.

Definition at line 288 of file SALOMEDS.idl.

attribute string SALOMEDS::Study::Name

The name of the Study.

This is equivalent to the methods setName() & getName()

Definition at line 147 of file SALOMEDS.idl.

attribute short SALOMEDS::Study::StudyId

The ID of the Study.

This is equivalent to the methods setID() & getID()

Definition at line 152 of file SALOMEDS.idl.

attribute string SALOMEDS::Study::URL

Indicate the file where the study has been saved.

Definition at line 301 of file SALOMEDS.idl.


The documentation for this interface was generated from the following file: