Version: 8.3.0
SALOMEDSImpl_StudyBuilder Class Reference

#include <SALOMEDSImpl_StudyBuilder.hxx>

Public Member Functions

 SALOMEDSImpl_StudyBuilder (const SALOMEDSImpl_Study *theOwner)
 Function : constructor Purpose : More...
 
 ~SALOMEDSImpl_StudyBuilder ()
 Function : destructor Purpose : More...
 
virtual SALOMEDSImpl_SComponent NewComponent (const std::string &ComponentDataType)
 Function : NewComponent Purpose : Create a new component (Scomponent) More...
 
virtual bool DefineComponentInstance (const SALOMEDSImpl_SComponent &, const std::string &ComponentIOR)
 Function : DefineComponentInstance Purpose : Add IOR attribute of a Scomponent. More...
 
virtual bool RemoveComponent (const SALOMEDSImpl_SComponent &aComponent)
 Function : RemoveComponent Purpose : Delete a Scomponent. More...
 
virtual SALOMEDSImpl_SObject NewObject (const SALOMEDSImpl_SObject &theFatherObject)
 Function : NewObject Purpose : Create a new SObject. More...
 
virtual SALOMEDSImpl_SObject NewObjectToTag (const SALOMEDSImpl_SObject &theFatherObject, const int theTag)
 Function : NewObjectToTag Purpose : More...
 
virtual bool AddDirectory (const std::string &thePath)
 The methods adds a new subdirectory, the path can be absolute or relative (then the current context is used) More...
 
virtual bool LoadWith (const SALOMEDSImpl_SComponent &sco, SALOMEDSImpl_Driver *Engine)
 Function : LoadWith Purpose : More...
 
virtual bool Load (const SALOMEDSImpl_SObject &sco)
 Function : Load Purpose : More...
 
virtual bool RemoveObject (const SALOMEDSImpl_SObject &anObject)
 Function : RemoveObject Purpose : More...
 
virtual bool RemoveObjectWithChildren (const SALOMEDSImpl_SObject &anObject)
 Function : RemoveObjectWithChildren Purpose : More...
 
virtual DF_AttributeFindOrCreateAttribute (const SALOMEDSImpl_SObject &anObject, const std::string &aTypeOfAttribute)
 Function : FindOrCreateAttribute Purpose : Add attribute of given type to SObject, if there is attribute of such type, returns existing one. More...
 
virtual bool FindAttribute (const SALOMEDSImpl_SObject &anObject, DF_Attribute *&anAttribute, const std::string &aTypeOfAttribute)
 Function : FindAttribute Purpose : Find attribute of given type assigned SObject, returns Standard_True if it is found. More...
 
virtual bool RemoveAttribute (const SALOMEDSImpl_SObject &anObject, const std::string &aTypeOfAttribute)
 Function : RemoveAttribute Purpose : Remove attribute of given type assigned SObject. More...
 
virtual bool Addreference (const SALOMEDSImpl_SObject &me, const SALOMEDSImpl_SObject &thereferencedObject)
 Function : Addreference Purpose : More...
 
virtual bool RemoveReference (const SALOMEDSImpl_SObject &me)
 Function : RemoveReference Purpose : More...
 
virtual bool SetGUID (const SALOMEDSImpl_SObject &anObject, const std::string &theGUID)
 Function : SetGUID Purpose : More...
 
virtual bool IsGUID (const SALOMEDSImpl_SObject &anObject, const std::string &theGUID)
 Function : IsGUID Purpose : More...
 
virtual void NewCommand ()
 Function : NewCommand Purpose : More...
 
virtual void CommitCommand ()
 Function : CommitCommand Purpose : More...
 
virtual bool HasOpenCommand ()
 Function : HasOpenCommand Purpose : More...
 
virtual void AbortCommand ()
 Function : AbortCommand Purpose : More...
 
virtual void Undo ()
 Function : Undo Purpose : More...
 
virtual void Redo ()
 Function : Redo Purpose : More...
 
bool GetAvailableUndos ()
 Function : GetAvailableUndos Purpose : More...
 
bool GetAvailableRedos ()
 Function : GetAvailableRedos Purpose : More...
 
bool IsSaved ()
 
bool IsModified ()
 
virtual int UndoLimit ()
 Function : UndoLimit Purpose : More...
 
virtual void UndoLimit (const int)
 Function : UndoLimit Purpose : More...
 
void CheckLocked ()
 Function : CheckLocked Purpose : More...
 
virtual SALOMEDSImpl_CallbackSetOnAddSObject (const SALOMEDSImpl_Callback *theCallback)
 Function : SetOnAddSObject Purpose : More...
 
virtual SALOMEDSImpl_CallbackSetOnRemoveSObject (const SALOMEDSImpl_Callback *theCallback)
 Function : SetOnNewSObject Purpose : More...
 
virtual bool SetName (const SALOMEDSImpl_SObject &theSO, const std::string &theValue)
 Function : SetName Purpose : More...
 
virtual bool SetComment (const SALOMEDSImpl_SObject &theSO, const std::string &theValue)
 Function : SetComment Purpose : More...
 
virtual bool SetIOR (const SALOMEDSImpl_SObject &theSO, const std::string &theValue)
 Function : SetIOR Purpose : More...
 
virtual std::string GetErrorCode ()
 
virtual bool IsError ()
 
virtual SALOMEDSImpl_StudyGetOwner ()
 

Private Attributes

DF_Document_doc
 
SALOMEDSImpl_Study_study
 
SALOMEDSImpl_Callback_callbackOnAdd
 
SALOMEDSImpl_Callback_callbackOnRemove
 
std::string _errorCode
 

Constructor & Destructor Documentation

SALOMEDSImpl_StudyBuilder::SALOMEDSImpl_StudyBuilder ( const SALOMEDSImpl_Study theOwner)

Function : constructor Purpose :

References _callbackOnAdd, _callbackOnRemove, _doc, _errorCode, _study, and SALOMEDSImpl_Study::GetDocument().

SALOMEDSImpl_StudyBuilder::~SALOMEDSImpl_StudyBuilder ( )

Function : destructor Purpose :

Member Function Documentation

void SALOMEDSImpl_StudyBuilder::AbortCommand ( )
virtual

Function : AbortCommand Purpose :

References _errorCode.

Referenced by SALOMEDS_StudyBuilder::AbortCommand(), and SALOMEDS_StudyBuilder_i::AbortCommand().

bool SALOMEDSImpl_StudyBuilder::AddDirectory ( const std::string &  thePath)
virtual

The methods adds a new subdirectory, the path can be absolute or relative (then the current context is used)

Function : AddDirectory Purpose : adds a new directory with a path = thePath.

References _doc, _errorCode, _study, CheckLocked(), DIRECTORYID, SALOMEDSImpl_Study::FindObjectByPath(), SALOMEDSImpl_Study::GetContext(), SALOMEDSImpl_SObject::GetLabel(), DF_Label::IsNull(), NewObject(), SALOMEDSImpl_AttributeName::Set(), SALOMEDSImpl_AttributeLocalID::Set(), DF_Document::SetModified(), and SALOMEDSImpl_Tool::splitString().

Referenced by SALOMEDS_StudyBuilder::AddDirectory(), and SALOMEDS_StudyBuilder_i::AddDirectory().

bool SALOMEDSImpl_StudyBuilder::DefineComponentInstance ( const SALOMEDSImpl_SComponent aComponent,
const std::string &  ComponentIOR 
)
virtual

Function : DefineComponentInstance Purpose : Add IOR attribute of a Scomponent.

References _errorCode, CheckLocked(), SALOMEDSImpl_SObject::GetLabel(), and SALOMEDSImpl_AttributeIOR::Set().

Referenced by SALOMEDS_StudyBuilder_i::DefineComponentInstance(), and LoadWith().

bool SALOMEDSImpl_StudyBuilder::FindAttribute ( const SALOMEDSImpl_SObject anObject,
DF_Attribute *&  anAttribute,
const std::string &  aTypeOfAttribute 
)
virtual
bool SALOMEDSImpl_StudyBuilder::GetAvailableRedos ( )

Function : GetAvailableRedos Purpose :

References _errorCode.

Referenced by SALOMEDS_StudyBuilder::GetAvailableRedos(), and SALOMEDS_StudyBuilder_i::GetAvailableRedos().

bool SALOMEDSImpl_StudyBuilder::GetAvailableUndos ( )

Function : GetAvailableUndos Purpose :

References _errorCode.

Referenced by SALOMEDS_StudyBuilder::GetAvailableUndos(), and SALOMEDS_StudyBuilder_i::GetAvailableUndos().

bool SALOMEDSImpl_StudyBuilder::HasOpenCommand ( )
virtual

Function : HasOpenCommand Purpose :

References _errorCode.

Referenced by CheckLocked(), SALOMEDS_StudyBuilder::HasOpenCommand(), and SALOMEDS_StudyBuilder_i::HasOpenCommand().

virtual bool SALOMEDSImpl_StudyBuilder::IsError ( )
virtual
bool SALOMEDSImpl_StudyBuilder::IsGUID ( const SALOMEDSImpl_SObject anObject,
const std::string &  theGUID 
)
virtual
bool SALOMEDSImpl_StudyBuilder::IsModified ( )
bool SALOMEDSImpl_StudyBuilder::IsSaved ( )
bool SALOMEDSImpl_StudyBuilder::Load ( const SALOMEDSImpl_SObject sco)
virtual

Function : Load Purpose :

References _errorCode.

Referenced by SALOMEDS_StudyBuilder::Load().

void SALOMEDSImpl_StudyBuilder::NewCommand ( )
virtual
bool SALOMEDSImpl_StudyBuilder::RemoveComponent ( const SALOMEDSImpl_SComponent aComponent)
virtual

Function : RemoveComponent Purpose : Delete a Scomponent.

References _errorCode, CheckLocked(), and RemoveObject().

Referenced by SALOMEDS_StudyBuilder::RemoveComponent(), and SALOMEDS_StudyBuilder_i::RemoveComponent().

bool SALOMEDSImpl_StudyBuilder::SetComment ( const SALOMEDSImpl_SObject theSO,
const std::string &  theValue 
)
virtual
bool SALOMEDSImpl_StudyBuilder::SetGUID ( const SALOMEDSImpl_SObject anObject,
const std::string &  theGUID 
)
virtual
bool SALOMEDSImpl_StudyBuilder::SetIOR ( const SALOMEDSImpl_SObject theSO,
const std::string &  theValue 
)
virtual
bool SALOMEDSImpl_StudyBuilder::SetName ( const SALOMEDSImpl_SObject theSO,
const std::string &  theValue 
)
virtual
SALOMEDSImpl_Callback * SALOMEDSImpl_StudyBuilder::SetOnAddSObject ( const SALOMEDSImpl_Callback theCallback)
virtual
SALOMEDSImpl_Callback * SALOMEDSImpl_StudyBuilder::SetOnRemoveSObject ( const SALOMEDSImpl_Callback theCallback)
virtual
int SALOMEDSImpl_StudyBuilder::UndoLimit ( )
virtual

Function : UndoLimit Purpose :

References _errorCode.

Referenced by SALOMEDS_StudyBuilder::UndoLimit(), and SALOMEDS_StudyBuilder_i::UndoLimit().

void SALOMEDSImpl_StudyBuilder::UndoLimit ( const int  n)
virtual

Function : UndoLimit Purpose :

References _errorCode, and CheckLocked().

Field Documentation

SALOMEDSImpl_Callback* SALOMEDSImpl_StudyBuilder::_callbackOnAdd
private
SALOMEDSImpl_Callback* SALOMEDSImpl_StudyBuilder::_callbackOnRemove
private