Version: 8.3.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
SALOMEDS::StudyBuilder Interface Reference

Study Builder Interface More...

Data Structures

exception  LockProtection
 LockProtection Exception More...
 

Public Member Functions

SComponent NewComponent (in string ComponentDataType) raises (LockProtection)
 Creation of a new SComponent. More...
 
void DefineComponentInstance (in SComponent aComponent, in Object ComponentIOR) raises (LockProtection)
 Definition of the instance to the SComponent. More...
 
void RemoveComponent (in SComponent aComponent) raises (LockProtection)
 Deletion of a SComponent. More...
 
SObject NewObject (in SObject theFatherObject) raises (LockProtection)
 Creation of a new SObject. More...
 
SObject NewObjectToTag (in SObject theFatherObject, in long atag) raises (LockProtection)
 Creation of a new SObject with a definite tag. More...
 
void RemoveObject (in SObject anObject) raises (LockProtection)
 Deletion of the SObject. More...
 
void RemoveObjectWithChildren (in SObject anObject) raises (LockProtection)
 Deletion of the SObject with all his child objects. More...
 
void LoadWith (in SComponent sco, in Driver Engine) raises (SALOME::SALOME_Exception)
 
void Load (in SObject sco)
 
GenericAttribute FindOrCreateAttribute (in SObject anObject, in string aTypeOfAttribute) raises (LockProtection)
 Looking for or creating an attribute assigned to the SObject. More...
 
boolean FindAttribute (in SObject anObject, out GenericAttribute anAttribute, in string aTypeOfAttribute)
 Looking for an attribute assigned to a SObject. More...
 
void RemoveAttribute (in SObject anObject, in string aTypeOfAttribute) raises (LockProtection)
 Deleting the attribute assigned to the SObject. More...
 
void Addreference (in SObject anObject, in SObject theReferencedObject)
 
void RemoveReference (in SObject anObject)
 
void AddDirectory (in string theName) raises (LockProtection)
 
void SetGUID (in SObject anObject, in string theGUID) raises (LockProtection)
 Identification of the SObject's substructure. More...
 
boolean IsGUID (in SObject anObject, in string theGUID)
 
void NewCommand ()
 Creation of a new command. More...
 
void CommitCommand () raises (LockProtection)
 Execution of the command. More...
 
boolean HasOpenCommand ()
 
void AbortCommand ()
 Cancelation of the command. More...
 
void Undo () raises (LockProtection)
 Undo method. More...
 
void Redo () raises (LockProtection)
 Redo method. More...
 
boolean GetAvailableUndos ()
 
boolean GetAvailableRedos ()
 
void SetName (in SObject theSO, in string theValue) raises (LockProtection)
 
void SetComment (in SObject theSO, in string theValue) raises (LockProtection)
 
void SetIOR (in SObject theSO, in string theValue) raises (LockProtection)
 

Data Fields

attribute long UndoLimit
 Undolimit. More...
 

Detailed Description

Study Builder Interface

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

The Tag 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: 0:2:1:1

Member Function Documentation

SComponent SALOMEDS::StudyBuilder::NewComponent ( in string  ComponentDataType) raises (LockProtection)

Creation of a new SComponent.

Creates a new SComponent

Parameters
ComponentDataTypeData type of the SComponent which will be created.

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

void SALOMEDS::StudyBuilder::DefineComponentInstance ( in SComponent  aComponent,
in Object  ComponentIOR 
) raises (LockProtection)

Definition of the instance to the SComponent.

Defines the instance to the SComponent.

void SALOMEDS::StudyBuilder::RemoveComponent ( in SComponent  aComponent) raises (LockProtection)

Deletion of a SComponent.

Removes a SComponent.

SObject SALOMEDS::StudyBuilder::NewObject ( in SObject  theFatherObject) raises (LockProtection)

Creation of a new SObject.

Creates a new SObject under a definite father SObject.

Parameters
theFatherObjectThe father SObject under which this one should be created.
Returns
New SObject

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

SObject SALOMEDS::StudyBuilder::NewObjectToTag ( in SObject  theFatherObject,
in long  atag 
) raises (LockProtection)

Creation of a new SObject with a definite tag.

Creates a new SObject with a definite tag.

Parameters
atagLong value corresponding to the tag of the new SObject.
Returns
New SObject
void SALOMEDS::StudyBuilder::RemoveObject ( in SObject  anObject) raises (LockProtection)

Deletion of the SObject.

Removes a SObject from the StudyBuilder.

Parameters
anObjectThe SObject to be deleted.
void SALOMEDS::StudyBuilder::RemoveObjectWithChildren ( in SObject  anObject) raises (LockProtection)

Deletion of the SObject with all his child objects.

Removes the SObject with all his child objects.

Parameters
anObjectThe SObject to be deleted with all child objects.
void SALOMEDS::StudyBuilder::LoadWith ( in SComponent  sco,
in Driver  Engine 
) raises (SALOME::SALOME_Exception)

Loads a SComponent.

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

void SALOMEDS::StudyBuilder::Load ( in SObject  sco)

Loads a SObject.

Parameters
scoSObject to be loaded.
GenericAttribute SALOMEDS::StudyBuilder::FindOrCreateAttribute ( in SObject  anObject,
in string  aTypeOfAttribute 
) raises (LockProtection)

Looking for or creating an attribute assigned to the SObject.

Allows to find or create an attribute of a specific type which is assigned to the object.
Parameters
anObjectThe SObject corresponding to the attribute which is looked for.
aTypeOfAttributeType of the attribute.

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

boolean SALOMEDS::StudyBuilder::FindAttribute ( in SObject  anObject,
out GenericAttribute  anAttribute,
in string  aTypeOfAttribute 
)

Looking for an attribute assigned to a SObject.

Allows to find an attribute of a specific type which is assigned to the object.

Parameters
anObjectThe SObject corresponding to the attribute which is looked for.
aTypeOfAttributeType of the attribute.
anAttributeWhere the attribute is placed if it's found.
Returns
True if it finds an attribute.
void SALOMEDS::StudyBuilder::RemoveAttribute ( in SObject  anObject,
in string  aTypeOfAttribute 
) raises (LockProtection)

Deleting the attribute assigned to the SObject.

Removes the attribute of a specific type which is assigned to the object.
Parameters
anObjectThe SObject corresponding to the attribute.
aTypeOfAttributeType of the attribute.

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

void SALOMEDS::StudyBuilder::Addreference ( in SObject  anObject,
in SObject  theReferencedObject 
)

Adds a reference between anObject and theReferencedObject.

Parameters
anObjectThe SObject which will get a reference
theReferencedObjectThe SObject having a reference
void SALOMEDS::StudyBuilder::RemoveReference ( in SObject  anObject)

Removes a reference from anObject to another object.

Parameters
anObjectThe SObject which contains a reference
void SALOMEDS::StudyBuilder::AddDirectory ( in string  theName) raises (LockProtection)

Adds a directory in the Study.

Parameters
theNameString parameter defining the name of the directory.

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

void SALOMEDS::StudyBuilder::SetGUID ( in SObject  anObject,
in string  theGUID 
) raises (LockProtection)

Identification of the SObject's substructure.

 Identification of the %SObject's substructure by GUID.
Parameters
anObjectThe SObject which will be identified
theGUIDGUID has the following format "00000000-0000-0000-0000-000000000000"
boolean SALOMEDS::StudyBuilder::IsGUID ( in SObject  anObject,
in string  theGUID 
)

Searches for a definite SObject with a definite GUID and returns True if it finds it.

Parameters
anObjectA definite SObject which will be identified
theGUIDGUID has the following format "00000000-0000-0000-0000-000000000000"
void SALOMEDS::StudyBuilder::NewCommand ( )

Creation of a new command.

Creates a new command which can contain several different actions.

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

void SALOMEDS::StudyBuilder::CommitCommand ( ) raises (LockProtection)

Execution of the command.

Commits all actions declared within this command.

Exceptions
LockProtectionThis exception is raised, when trying to perform this command a study, which is protected for modifications.

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

boolean SALOMEDS::StudyBuilder::HasOpenCommand ( )

Returns True if at this moment there is a command under execution.

void SALOMEDS::StudyBuilder::AbortCommand ( )

Cancelation of the command.

Cancels all actions declared within the command.

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

void SALOMEDS::StudyBuilder::Undo ( ) raises (LockProtection)

Undo method.

Cancels 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.

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

void SALOMEDS::StudyBuilder::Redo ( ) raises (LockProtection)

Redo method.

Redoes all actions of the last command.
Exceptions
LockProtectionThis exception is raised, when trying to perform this command a study, which is protected for modifications.

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

boolean SALOMEDS::StudyBuilder::GetAvailableUndos ( )
Returns True if at this moment there are any actions which can be canceled.

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

boolean SALOMEDS::StudyBuilder::GetAvailableRedos ( )
Returns True if at this moment there are any actions which can be redone.

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

void SALOMEDS::StudyBuilder::SetName ( in SObject  theSO,
in string  theValue 
) raises (LockProtection)

Puts name attribute with the given string value to the given SObject

Parameters
theSOExisting SObject to set name attribute.
theValueThe value to be set to the name attribute.
void SALOMEDS::StudyBuilder::SetComment ( in SObject  theSO,
in string  theValue 
) raises (LockProtection)

Puts comment attribute with the given string value to the given SObject

Parameters
theSOExisting SObject to set comment attribute.
theValueThe value to be set to the comment attribute.
void SALOMEDS::StudyBuilder::SetIOR ( in SObject  theSO,
in string  theValue 
) raises (LockProtection)

Puts IOR attribute with the given string value to the given SObject

Parameters
theSOExisting SObject to set IOR attribute.
theValueThe value to be set to the IOR attribute.

Field Documentation

attribute long SALOMEDS::StudyBuilder::UndoLimit

Undolimit.

The number of actions which can be undone