Version: 9.12.0
SALOMEDS::StudyBuilder Interface Reference

Study Builder Interface More...

import"SALOMEDS.idl";

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)
 Loads a SComponent. More...
 
void Load (in SObject sco)
 Loads a SObject. More...
 
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)
 Adds a reference between anObject and theReferencedObject. More...
 
void RemoveReference (in SObject anObject)
 Removes a reference from anObject to another object. More...
 
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)
 Searches for a definite SObject with a definite GUID and returns True if it finds it. More...
 
void NewCommand ()
 Creation of a new command. More...
 
void CommitCommand () raises (LockProtection)
 Execution of the command. More...
 
boolean HasOpenCommand ()
 Returns True if at this moment there is a command under execution. More...
 
void AbortCommand ()
 Cancellation 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)
 Puts name attribute with the given string value to the given SObject. More...
 
void SetComment (in SObject theSO, in string theValue) raises (LockProtection)
 Puts comment attribute with the given string value to the given SObject. More...
 
void SetIOR (in SObject theSO, in string theValue) raises (LockProtection)
 Puts IOR attribute with the given string value to the given SObject. More...
 

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

◆ AbortCommand()

void SALOMEDS::StudyBuilder::AbortCommand ( )

Cancellation of the command.

Cancels all actions declared within the command.

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

◆ Addreference()

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

◆ CommitCommand()

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.

◆ DefineComponentInstance()

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.

◆ FindAttribute()

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.

◆ FindOrCreateAttribute()

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.

◆ GetAvailableRedos()

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.

◆ GetAvailableUndos()

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.

◆ HasOpenCommand()

boolean SALOMEDS::StudyBuilder::HasOpenCommand ( )

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

◆ IsGUID()

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"

◆ Load()

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

Loads a SObject.

Parameters
scoSObject to be loaded.

Referenced by SALOME_DriverPy.SALOME_DriverPy_i::LoadASCII().

◆ LoadWith()

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.

◆ NewCommand()

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.

◆ NewComponent()

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.

◆ NewObject()

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.

◆ NewObjectToTag()

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

◆ Redo()

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.

◆ RemoveAttribute()

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.

◆ RemoveComponent()

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

Deletion of a SComponent.

Removes a SComponent.

◆ RemoveObject()

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.

◆ RemoveObjectWithChildren()

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.

◆ RemoveReference()

void SALOMEDS::StudyBuilder::RemoveReference ( in SObject  anObject)

Removes a reference from anObject to another object.

Parameters
anObjectThe SObject which contains a reference

◆ SetComment()

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.

◆ SetGUID()

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"

◆ SetIOR()

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.

◆ SetName()

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.

◆ Undo()

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

Undo method.

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

Field Documentation

◆ UndoLimit

attribute long SALOMEDS::StudyBuilder::UndoLimit

Undolimit.

The number of actions which can be undone