Version: 8.3.0
SALOMEDSImpl_Study Class Reference

#include <SALOMEDSImpl_Study.hxx>

Public Member Functions

 SALOMEDSImpl_Study (const DF_Document *, const std::string &study_name)
 standard constructor More...
 
virtual ~SALOMEDSImpl_Study ()
 standard destructor More...
 
virtual std::string GetPersistentReference ()
 method to Get persistent reference of study (idem URL()) More...
 
virtual std::string GetTransientReference ()
 method to Get transient reference of study More...
 
virtual void SetTransientReference (const std::string &theIOR)
 
virtual bool IsEmpty ()
 method to detect if a study is empty More...
 
virtual SALOMEDSImpl_SComponent FindComponent (const std::string &aComponentName)
 method to Find a Component with ComponentDataType = aComponentName More...
 
virtual SALOMEDSImpl_SComponent FindComponentID (const std::string &aComponentID)
 method to Find a Component Find a Component from it's ID More...
 
virtual SALOMEDSImpl_SObject FindObject (const std::string &anObjectName)
 method to Find an Object with SALOMEDSImpl::Name = anObjectName More...
 
virtual std::vector
< SALOMEDSImpl_SObject
FindObjectByName (const std::string &anObjectName, const std::string &aComponentName)
 method to Find Object(s) with SALOMEDSImpl::Name=anObjectName in a component with ComponentDataType = aComponentName More...
 
virtual SALOMEDSImpl_SObject FindObjectID (const std::string &anObjectID)
 method to Find an Object with ID = anObjectID More...
 
virtual SALOMEDSImpl_SObject CreateObjectID (const std::string &anObjectID)
 method to Create an Object with ID = anObjectID More...
 
virtual SALOMEDSImpl_SObject FindObjectIOR (const std::string &anObjectIOR)
 method to Find an Object with ID = anObjectIOR More...
 
virtual SALOMEDSImpl_SObject FindObjectByPath (const std::string &thePath)
 method to Find an Object by its path More...
 
virtual std::string GetObjectPath (const SALOMEDSImpl_SObject &theObject)
 method to get a path of SObject More...
 
std::string GetObjectPathByIOR (const std::string &theIOR)
 Function : GetObjectPathByIOR Purpose : More...
 
virtual bool SetContext (const std::string &thePath)
 method to set a context: root ('/') is UserData component More...
 
virtual std::string GetContext ()
 method to get a context More...
 
virtual std::vector< std::string > GetObjectNames (const std::string &theContext)
 method to get all object names in the given context (or in the current context, if 'theContext' is empty) More...
 
virtual std::vector< std::string > GetDirectoryNames (const std::string &theContext)
 method to get all directory names in the given context (or in the current context, if 'theContext' is empty) More...
 
virtual std::vector< std::string > GetFileNames (const std::string &theContext)
 method to get all file names in the given context (or in the current context, if 'theContext' is empty) More...
 
virtual std::vector< std::string > GetComponentNames (const std::string &theContext)
 method to get all components names More...
 
virtual SALOMEDSImpl_ChildIterator NewChildIterator (const SALOMEDSImpl_SObject &aSO)
 method to Create a ChildIterator from an SObject More...
 
virtual
SALOMEDSImpl_SComponentIterator 
NewComponentIterator ()
 method to Create a SComponentIterator More...
 
virtual SALOMEDSImpl_StudyBuilderNewBuilder ()
 method to Create a StudyBuilder More...
 
virtual std::string Name ()
 method to get study name More...
 
virtual void Name (const std::string &name)
 method to set study name More...
 
virtual bool IsSaved ()
 method to get if study has been saved More...
 
virtual void IsSaved (bool save)
 method to set if study has been saved More...
 
virtual bool IsModified ()
 method to Detect if a Study has been modified since it has been saved More...
 
virtual std::string URL ()
 method to get URL of the study (idem GetPersistentReference) More...
 
virtual void URL (const std::string &url)
 method to set URL of the study More...
 
virtual bool IsLocked ()
 
virtual int StudyId ()
 
virtual void StudyId (int id)
 
virtual void DeleteIORLabelMapItem (const std::string &anIOR)
 
virtual void UpdateIORLabelMap (const std::string &anIOR, const std::string &aLabel)
 
virtual std::vector
< SALOMEDSImpl_SObject
FindDependances (const SALOMEDSImpl_SObject &anObject)
 
virtual
SALOMEDSImpl_AttributeStudyProperties
GetProperties ()
 
virtual std::string GetLastModificationDate ()
 
virtual std::vector< std::string > GetModificationsDate ()
 
virtual
SALOMEDSImpl_UseCaseBuilder
GetUseCaseBuilder ()
 Function : GetUseCaseBuilder Purpose : Returns a UseCase builder. More...
 
virtual void Close ()
 Function : Close Purpose : More...
 
void EnableUseCaseAutoFilling (bool isEnabled)
 Function : EnableUseCaseAutoFilling Purpose : More...
 
virtual std::string GetErrorCode ()
 
virtual bool IsError ()
 
virtual SALOMEDSImpl_SComponent GetSComponent (const std::string &theEntry)
 Function : GetSComponent Purpose : More...
 
virtual SALOMEDSImpl_SComponent GetSComponent (const DF_Label &theLabel)
 Function : GetSComponent Purpose : More...
 
virtual SALOMEDSImpl_SObject GetSObject (const std::string &theEntry)
 Function : GetSObject Purpose : More...
 
virtual SALOMEDSImpl_SObject GetSObject (const DF_Label &theEntryLabel)
 Function : GetSObject Purpose : More...
 
virtual DF_AttributeGetAttribute (const std::string &theEntry, const std::string &theType)
 Function : GetAttribute Purpose : More...
 
virtual bool HasCurrentContext ()
 
virtual bool DumpStudy (const std::string &thePath, const std::string &theBaseName, bool isPublished, bool isMultiFile, SALOMEDSImpl_DriverFactory *theFactory)
 Function : DumpStudy Purpose : More...
 
virtual DF_DocumentGetDocument ()
 
void dump (const std::string &theFileName)
 Function : dump Purpose : More...
 
void Modify ()
 
SALOMEDSImpl_AttributeParameterGetCommonParameters (const char *theID, int theSavePoint)
 Function : Purpose : More...
 
SALOMEDSImpl_AttributeParameterGetModuleParameters (const char *theID, const char *theModuleName, int theSavePoint)
 Function : Purpose : More...
 
void SetStudyLock (const char *theLockerID)
 Function : SetStudyLock Purpose : More...
 
bool IsStudyLocked ()
 Function : IsStudyLocked Purpose : More...
 
void UnLockStudy (const char *theLockerID)
 Function : UnLockStudy Purpose : More...
 
std::vector< std::string > GetLockerID ()
 Function : GetLockerID Purpose : More...
 
void SetVariable (const std::string &theVarName, const double theValue, const SALOMEDSImpl_GenericVariable::VariableTypes)
 Function : SetVariable Purpose : More...
 
void SetStringVariable (const std::string &theVarName, const std::string &theValue, const SALOMEDSImpl_GenericVariable::VariableTypes)
 Function : SetStringVariable Purpose : More...
 
void SetStringVariableAsDouble (const std::string &theVarName, const double theValue, const SALOMEDSImpl_GenericVariable::VariableTypes)
 Function : SetStringVariableAsDouble Purpose : More...
 
double GetVariableValue (const std::string &theVarName)
 Function : GetReal Purpose : More...
 
std::string GetStringVariableValue (const std::string &theVarName)
 Function : GetString Purpose : More...
 
bool IsTypeOf (const std::string &theVarName, SALOMEDSImpl_GenericVariable::VariableTypes theType) const
 Function : IsTypeOf Purpose : More...
 
bool IsVariable (const std::string &theVarName) const
 Function : IsVariable Purpose : More...
 
std::vector< std::string > GetVariableNames () const
 Function : GetVariableNames Purpose : More...
 
void AddVariable (SALOMEDSImpl_GenericVariable *theVariable)
 Function : AddVariable Purpose : More...
 
SALOMEDSImpl_GenericVariableGetVariable (const std::string &theName) const
 Function : AddVariable Purpose : More...
 
bool RemoveVariable (const std::string &theVarName)
 Function : RemoveVariable Purpose : More...
 
bool RenameVariable (const std::string &theVarName, const std::string &theNewVarName)
 Function : RenameVariable Purpose : More...
 
bool IsVariableUsed (const std::string &theVarName)
 Function : IsVariableUsed Purpose : More...
 
bool FindVariableAttribute (SALOMEDSImpl_StudyBuilder *theStudyBuilder, SALOMEDSImpl_SObject theSObject, const std::string &theName)
 Function : FindVariableAttribute Purpose : More...
 
bool FindVariableAttribute (const std::string &theName)
 Function : FindVariableAttribute Purpose : More...
 
void ReplaceVariableAttribute (SALOMEDSImpl_StudyBuilder *theStudyBuilder, SALOMEDSImpl_SObject theSObject, const std::string &theSource, const std::string &theDest)
 Function : ReplaceVariableAttribute Purpose : More...
 
void ReplaceVariableAttribute (const std::string &theSource, const std::string &theDest)
 Function : ReplaceVariableAttribute Purpose : More...
 
std::vector< std::vector
< std::string > > 
ParseVariables (const std::string &theVariables) const
 Function : ParseVariables Purpose : More...
 
SALOMEDSImpl_CallbackGetCallback ()
 
std::vector< std::string > GetIORs ()
 Function : GetIORs Purpose : More...
 
virtual bool addSO_Notification (const SALOMEDSImpl_SObject &theSObject)
 Function : addSO_Notification Purpose : This function tells all the observers that a SO has been added. More...
 
virtual bool removeSO_Notification (const SALOMEDSImpl_SObject &theSObject)
 Function : removeSO_Notification Purpose : This function tells all the observers that a SO has been removed. More...
 
virtual bool modifySO_Notification (const SALOMEDSImpl_SObject &theSObject, int reason)
 Function : modifySO_Notification Purpose : This function tells all the observers that a SO has been modified and pass the mofification reason. More...
 
virtual void setNotifier (SALOMEDSImpl_AbstractCallback *notifier)
 Function : setNotifier Purpose : register a notifier. More...
 
void setGenObjRegister (SALOMEDSImpl_AbstractCallback *theRegister)
 Stores theRegister. More...
 

Static Public Member Functions

static SALOMEDSImpl_StudyGetStudy (const DF_Label &theLabel)
 
static SALOMEDSImpl_SObject SObject (const DF_Label &theLabel)
 
static SALOMEDSImpl_SComponent SComponent (const DF_Label &theLabel)
 
static void IORUpdated (const SALOMEDSImpl_AttributeIOR *theAttribute)
 
static std::string GetDumpStudyComment (const char *theComponentName=0)
 
static void RegisterGenObj (const std::string &theIOR, DF_Label label)
 Indirectly invokes GenericObj_i::Register() More...
 
static void UnRegisterGenObj (const std::string &theIOR, DF_Label label)
 Indirectly invokes GenericObj_i::UnRegister() More...
 

Private Member Functions

SALOMEDSImpl_SObject _FindObject (const SALOMEDSImpl_SObject &SO, const std::string &anObjectName, bool &_find)
 Function : _FindObject Purpose : Find an Object with SALOMEDSImpl_Name = anObjectName. More...
 
SALOMEDSImpl_SObject _FindObjectIOR (const SALOMEDSImpl_SObject &SO, const std::string &anObjectIOR, bool &_find)
 Function : _FindObjectIOR Purpose : Find an Object with SALOMEDSImpl_IOR = anObjectIOR. More...
 
std::string _GetStudyVariablesScript ()
 Function : _GetStudyVariablesScript Purpose : More...
 
std::string _GetNoteBookAccessor ()
 Function : _GetNoteBookAccessor Purpose : Find an Object with SALOMEDSImpl_IOR = anObjectIOR. More...
 
std::string _GetNoteBookAccess (const std::string &theStudyVar)
 Function : _GetNoteBookAccess Purpose : More...
 

Private Attributes

std::string _name
 
DF_Document_doc
 
bool _Saved
 
std::string _URL
 
int _StudyId
 
DF_Label _current
 
bool _autoFill
 
std::string _errorCode
 
std::vector< std::string > _lockers
 
SALOMEDSImpl_Callback_cb
 
SALOMEDSImpl_StudyBuilder_builder
 
SALOMEDSImpl_UseCaseBuilder_useCaseBuilder
 
SALOMEDSImpl_AbstractCallback_notifier
 
SALOMEDSImpl_AbstractCallback_genObjRegister
 
std::map< std::string,
SALOMEDSImpl_SObject
_mapOfSO
 
std::map< std::string,
SALOMEDSImpl_SComponent
_mapOfSCO
 
std::map< std::string, DF_LabelmyIORLabels
 
std::vector
< SALOMEDSImpl_GenericVariable * > 
myNoteBookVars
 

Friends

class SALOMEDSImpl_StudyManager
 
class SALOMEDSImpl_GenericAttribute
 
class SALOMEDSImpl_GenericVariable
 

Constructor & Destructor Documentation

SALOMEDSImpl_Study::SALOMEDSImpl_Study ( const DF_Document doc,
const std::string &  study_name 
)
SALOMEDSImpl_Study::~SALOMEDSImpl_Study ( )
virtual

standard destructor

Function : ~SALOMEDSImpl_Study Purpose : SALOMEDSImpl_Study destructor.

References _builder, _cb, and _useCaseBuilder.

Member Function Documentation

SALOMEDSImpl_SObject SALOMEDSImpl_Study::_FindObject ( const SALOMEDSImpl_SObject SO,
const std::string &  anObjectName,
bool _find 
)
private

Function : _FindObject Purpose : Find an Object with SALOMEDSImpl_Name = anObjectName.

References SALOMEDSImpl_AttributeName::GetID(), SALOMEDSImpl_SObject::GetID(), SALOMEDSImpl_SObject::GetLabel(), GetSObject(), and SALOMEDSImpl_AttributeName::Value().

Referenced by FindObject(), and FindObjectByName().

SALOMEDSImpl_SObject SALOMEDSImpl_Study::_FindObjectIOR ( const SALOMEDSImpl_SObject SO,
const std::string &  anObjectIOR,
bool _find 
)
private

Function : _FindObjectIOR Purpose : Find an Object with SALOMEDSImpl_IOR = anObjectIOR.

References SALOMEDSImpl_AttributeIOR::GetID(), SALOMEDSImpl_SObject::GetLabel(), GetSObject(), and SALOMEDSImpl_AttributeIOR::Value().

std::string SALOMEDSImpl_Study::_GetNoteBookAccess ( const std::string &  theStudyVar)
private

Function : _GetNoteBookAccess Purpose :

References _GetNoteBookAccessor().

Referenced by DumpStudy().

std::string SALOMEDSImpl_Study::_GetNoteBookAccessor ( )
private

Function : _GetNoteBookAccessor Purpose : Find an Object with SALOMEDSImpl_IOR = anObjectIOR.

Referenced by _GetNoteBookAccess(), and _GetStudyVariablesScript().

std::string SALOMEDSImpl_Study::_GetStudyVariablesScript ( )
private

Function : _GetStudyVariablesScript Purpose :

References _GetNoteBookAccessor(), dump(), and myNoteBookVars.

Referenced by DumpStudy().

void SALOMEDSImpl_Study::AddVariable ( SALOMEDSImpl_GenericVariable theVariable)

Function : AddVariable Purpose :

References myNoteBookVars.

Referenced by ReadNoteBookVariables().

void SALOMEDSImpl_Study::Close ( )
virtual
SALOMEDSImpl_SObject SALOMEDSImpl_Study::CreateObjectID ( const std::string &  anObjectID)
virtual

method to Create an Object with ID = anObjectID

Function : CreateObjectID Purpose : Creates an Object with ID = anObjectID.

References _doc, _errorCode, GetSObject(), DF_Label::IsNull(), DF_Label::Label(), and DF_Document::Main().

Referenced by BuildTree(), SALOMEDS_Study_i::CreateObjectID(), and ReadAttributes().

void SALOMEDSImpl_Study::DeleteIORLabelMapItem ( const std::string &  anIOR)
virtual
void SALOMEDSImpl_Study::dump ( const std::string &  theFileName)
void SALOMEDSImpl_Study::EnableUseCaseAutoFilling ( bool  isEnabled)
SALOMEDSImpl_SComponent SALOMEDSImpl_Study::FindComponent ( const std::string &  aComponentName)
virtual
SALOMEDSImpl_SComponent SALOMEDSImpl_Study::FindComponentID ( const std::string &  aComponentID)
virtual

method to Find a Component Find a Component from it's ID

Function : FindComponentID Purpose : Find a Component from it's ID.

References _errorCode, SALOMEDSImpl_SObject::GetID(), SALOMEDSImpl_SComponentIterator::More(), NewComponentIterator(), SALOMEDSImpl_SComponentIterator::Next(), and SALOMEDSImpl_SComponentIterator::Value().

Referenced by SALOMEDS_Study_i::FindComponentID().

SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObject ( const std::string &  anObjectName)
virtual

method to Find an Object with SALOMEDSImpl::Name = anObjectName

Function : FindObject Purpose : Find an Object with SALOMEDSImpl_Name = anObjectName.

References _errorCode, _FindObject(), SALOMEDSImpl_SObject::GetName(), SALOMEDSImpl_SComponentIterator::More(), NewComponentIterator(), SALOMEDSImpl_SComponentIterator::Next(), and SALOMEDSImpl_SComponentIterator::Value().

Referenced by SALOMEDS_Study_i::FindObject().

std::vector< SALOMEDSImpl_SObject > SALOMEDSImpl_Study::FindObjectByName ( const std::string &  anObjectName,
const std::string &  aComponentName 
)
virtual

method to Find Object(s) with SALOMEDSImpl::Name=anObjectName in a component with ComponentDataType = aComponentName

Function : FindObjectByName Purpose : Find Objects with SALOMEDSImpl_Name = anObjectName in a Component : with ComponentDataType = aComponentName.

References _errorCode, _FindObject(), FindComponent(), SALOMEDSImpl_SObject::GetID(), SALOMEDSImpl_SObject::GetName(), SALOMEDSImpl_ChildIterator::More(), NewChildIterator(), SALOMEDSImpl_ChildIterator::Next(), and SALOMEDSImpl_ChildIterator::Value().

Referenced by SALOMEDS_Study_i::FindObjectByName().

SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectID ( const std::string &  anObjectID)
virtual
SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectIOR ( const std::string &  anObjectIOR)
virtual

method to Find an Object with ID = anObjectIOR

Function : FindObjectIOR Purpose : Find an Object with IOR = anObjectIOR.

References _errorCode, SALOMEDSImpl_AttributeIOR::GetID(), SALOMEDSImpl_SObject::GetLabel(), GetSObject(), DF_Label::IsAttribute(), and myIORLabels.

Referenced by SALOMEDS_Study_i::FindObjectIOR(), SALOMEDS_Study_i::GetObjectPath(), and GetObjectPathByIOR().

bool SALOMEDSImpl_Study::FindVariableAttribute ( SALOMEDSImpl_StudyBuilder theStudyBuilder,
SALOMEDSImpl_SObject  theSObject,
const std::string &  theName 
)
bool SALOMEDSImpl_Study::FindVariableAttribute ( const std::string &  theName)
DF_Attribute * SALOMEDSImpl_Study::GetAttribute ( const std::string &  theEntry,
const std::string &  theType 
)
virtual

Function : GetAttribute Purpose :

References SALOMEDSImpl_SObject::FindAttribute(), and GetSObject().

SALOMEDSImpl_Callback* SALOMEDSImpl_Study::GetCallback ( )
std::vector< std::string > SALOMEDSImpl_Study::GetComponentNames ( const std::string &  theContext)
virtual

method to get all components names

Function : GetComponentNames Purpose : method to get all components names.

References _doc, _errorCode, DF_Label::FindAttribute(), SALOMEDSImpl_AttributeName::GetID(), DF_Document::Main(), and SALOMEDSImpl_AttributeName::Value().

Referenced by SALOMEDS_Study::GetComponentNames(), and SALOMEDS_Study_i::GetComponentNames().

std::string SALOMEDSImpl_Study::GetContext ( )
virtual

method to get a context

Function : GetContext Purpose : Gets the current context.

References _current, _errorCode, GetObjectPath(), GetSObject(), and DF_Label::IsNull().

Referenced by SALOMEDSImpl_StudyBuilder::AddDirectory(), SALOMEDS_Study::GetContext(), SALOMEDS_Study_i::GetContext(), and SetContext().

std::vector< std::string > SALOMEDSImpl_Study::GetDirectoryNames ( const std::string &  theContext)
virtual

method to get all directory names in the given context (or in the current context, if 'theContext' is empty)

Function : GetDirectoryNames Purpose : method to get all directory names in the given context (or in the current context, if 'theContext' is empty)

References _current, _errorCode, DIRECTORYID, DF_Label::FindAttribute(), SALOMEDSImpl_AttributeName::GetID(), SALOMEDSImpl_AttributeLocalID::GetID(), DF_Label::IsNull(), DF_ChildIterator::More(), DF_ChildIterator::Next(), SetContext(), DF_ChildIterator::Value(), SALOMEDSImpl_AttributeLocalID::Value(), and SALOMEDSImpl_AttributeName::Value().

Referenced by SALOMEDS_Study::GetDirectoryNames(), and SALOMEDS_Study_i::GetDirectoryNames().

virtual DF_Document* SALOMEDSImpl_Study::GetDocument ( )
virtual
std::string SALOMEDSImpl_Study::GetDumpStudyComment ( const char theComponentName = 0)
static

Referenced by DumpStudy().

virtual std::string SALOMEDSImpl_Study::GetErrorCode ( )
virtual
std::vector< std::string > SALOMEDSImpl_Study::GetFileNames ( const std::string &  theContext)
virtual

method to get all file names in the given context (or in the current context, if 'theContext' is empty)

Function : GetFileNames Purpose : method to get all file names in the given context (or in the current context, if 'theContext' is empty)

References _current, _errorCode, FILEID, FILELOCALID, DF_Label::FindAttribute(), SALOMEDSImpl_AttributeLocalID::GetID(), SALOMEDSImpl_AttributePersistentRef::GetID(), DF_Label::IsNull(), DF_ChildIterator::More(), DF_ChildIterator::Next(), SetContext(), DF_ChildIterator::Value(), SALOMEDSImpl_AttributeLocalID::Value(), and SALOMEDSImpl_AttributePersistentRef::Value().

Referenced by SALOMEDS_Study::GetFileNames(), and SALOMEDS_Study_i::GetFileNames().

std::vector< std::string > SALOMEDSImpl_Study::GetIORs ( )

Function : GetIORs Purpose :

References myIORLabels.

Referenced by SALOMEDS_Study_i::RemovePostponed().

std::string SALOMEDSImpl_Study::GetLastModificationDate ( )
virtual
std::vector< std::string > SALOMEDSImpl_Study::GetLockerID ( )

Function : GetLockerID Purpose :

References _lockers.

Referenced by SALOMEDS_Study::GetLockerID(), SALOMEDS_Study_i::GetLockerID(), and main().

std::vector< std::string > SALOMEDSImpl_Study::GetModificationsDate ( )
virtual
std::vector< std::string > SALOMEDSImpl_Study::GetObjectNames ( const std::string &  theContext)
virtual

method to get all object names in the given context (or in the current context, if 'theContext' is empty)

Function : GetObjectNames Purpose : method to get all object names in the given context (or in the current context, if 'theContext' is empty)

References _current, _errorCode, DF_Label::FindAttribute(), SALOMEDSImpl_AttributeName::GetID(), DF_Label::IsNull(), DF_ChildIterator::More(), DF_ChildIterator::Next(), SetContext(), DF_ChildIterator::Value(), and SALOMEDSImpl_AttributeName::Value().

Referenced by SALOMEDS_Study::GetObjectNames(), and SALOMEDS_Study_i::GetObjectNames().

std::string SALOMEDSImpl_Study::GetObjectPath ( const SALOMEDSImpl_SObject theObject)
virtual

method to get a path of SObject

Function : GetObjectPath Purpose :

References _errorCode, SALOMEDSImpl_SObject::GetFather(), and SALOMEDSImpl_SObject::GetName().

Referenced by GetContext(), SALOMEDS_Study_i::GetObjectPath(), GetObjectPathByIOR(), and main().

std::string SALOMEDSImpl_Study::GetObjectPathByIOR ( const std::string &  theIOR)

Function : GetObjectPathByIOR Purpose :

References _errorCode, FindObjectIOR(), and GetObjectPath().

std::string SALOMEDSImpl_Study::GetPersistentReference ( )
virtual

method to Get persistent reference of study (idem URL())

Function : GetPersistentReference Purpose : Get persistent reference of study (idem URL())

References _errorCode, and URL().

Referenced by SALOMEDS_Study::GetPersistentReference(), and SALOMEDS_Study_i::GetPersistentReference().

SALOMEDSImpl_SComponent SALOMEDSImpl_Study::GetSComponent ( const DF_Label theLabel)
virtual

Function : GetSComponent Purpose :

SALOMEDSImpl_SObject SALOMEDSImpl_Study::GetSObject ( const DF_Label theEntryLabel)
virtual

Function : GetSObject Purpose :

std::string SALOMEDSImpl_Study::GetStringVariableValue ( const std::string &  theVarName)

Function : GetString Purpose :

References GetVariable().

Referenced by SALOMEDS_Study::GetString(), and SALOMEDS_Study_i::GetString().

std::string SALOMEDSImpl_Study::GetTransientReference ( )
virtual

method to Get transient reference of study

Function : GetTransientReference Purpose : Get IOR of the Study (registred in Document in doc->Root)

References _doc, _errorCode, DF_Label::FindAttribute(), SALOMEDSImpl_AttributeIOR::GetID(), DF_Document::Root(), and SALOMEDSImpl_AttributeIOR::Value().

Referenced by SALOMEDS_SObject_i::GetStudy(), SALOMEDS_Study::GetStudy(), SALOMEDS_Study::GetTransientReference(), and SALOMEDS_Study_i::GetTransientReference().

SALOMEDSImpl_UseCaseBuilder * SALOMEDSImpl_Study::GetUseCaseBuilder ( )
virtual

Function : GetUseCaseBuilder Purpose : Returns a UseCase builder.

References _errorCode, and _useCaseBuilder.

Referenced by SALOMEDS_Study_i::GetUseCaseBuilder(), and main().

SALOMEDSImpl_GenericVariable * SALOMEDSImpl_Study::GetVariable ( const std::string &  theName) const
std::vector< std::string > SALOMEDSImpl_Study::GetVariableNames ( ) const

Function : GetVariableNames Purpose :

References myNoteBookVars.

Referenced by SALOMEDS_Study::GetVariableNames(), and SALOMEDS_Study_i::GetVariableNames().

double SALOMEDSImpl_Study::GetVariableValue ( const std::string &  theVarName)
bool SALOMEDSImpl_Study::IsEmpty ( )
virtual

method to detect if a study is empty

Function : IsEmpty Purpose : Detect if study is empty.

References _doc, _errorCode, and DF_Document::IsEmpty().

Referenced by SALOMEDS_Study::IsEmpty(), and SALOMEDS_Study_i::IsEmpty().

virtual bool SALOMEDSImpl_Study::IsError ( )
virtual
bool SALOMEDSImpl_Study::IsModified ( )
virtual

method to Detect if a Study has been modified since it has been saved

Function : IsModified Purpose : Detect if a Study has been modified since it has been saved.

References _doc, _errorCode, and DF_Document::IsModified().

Referenced by SALOMEDS_Study::IsModified(), and SALOMEDS_Study_i::IsModified().

bool SALOMEDSImpl_Study::IsSaved ( )
virtual

method to get if study has been saved

Function : IsSaved Purpose : get if study has been saved.

References _errorCode, and _Saved.

Referenced by SALOMEDSImpl_StudyManager::Impl_SaveAs(), SALOMEDS_Study::IsSaved(), and SALOMEDS_Study_i::IsSaved().

void SALOMEDSImpl_Study::IsSaved ( bool  save)
virtual

method to set if study has been saved

Function : IsSaved Purpose : set if study has been saved.

References _doc, _errorCode, _Saved, and DF_Document::SetModified().

bool SALOMEDSImpl_Study::IsStudyLocked ( )

Function : IsStudyLocked Purpose :

References _lockers.

Referenced by SALOMEDS_Study::IsStudyLocked(), SALOMEDS_Study_i::IsStudyLocked(), and main().

bool SALOMEDSImpl_Study::IsVariable ( const std::string &  theVarName) const

Function : IsVariable Purpose :

References GetVariable().

Referenced by SALOMEDS_Study::IsVariable(), and SALOMEDS_Study_i::IsVariable().

bool SALOMEDSImpl_Study::IsVariableUsed ( const std::string &  theVarName)

Function : IsVariableUsed Purpose :

References FindVariableAttribute().

Referenced by SALOMEDS_Study::IsVariableUsed(), and SALOMEDS_Study_i::IsVariableUsed().

bool SALOMEDSImpl_Study::modifySO_Notification ( const SALOMEDSImpl_SObject theSObject,
int  reason 
)
virtual

Function : modifySO_Notification Purpose : This function tells all the observers that a SO has been modified and pass the mofification reason.

References _notifier, and SALOMEDSImpl_AbstractCallback::modifySO_Notification().

Referenced by SALOMEDSImpl_StudyBuilder::RemoveAttribute(), and SALOMEDSImpl_GenericAttribute::SetModifyFlag().

std::string SALOMEDSImpl_Study::Name ( )
virtual

method to get study name

Function : Name Purpose : get study name.

References _errorCode, and _name.

Referenced by SALOMEDSImpl_StudyManager::Impl_SaveAs(), SALOMEDS_Study::Name(), SALOMEDS_Study_i::Name(), SALOMEDS_StudyManager_i::Open(), and URL().

void SALOMEDSImpl_Study::Name ( const std::string &  name)
virtual

method to set study name

Function : Name Purpose : set study name.

References _errorCode, and _name.

SALOMEDSImpl_ChildIterator SALOMEDSImpl_Study::NewChildIterator ( const SALOMEDSImpl_SObject aSO)
virtual

method to Create a ChildIterator from an SObject

Function : NewChildIterator Purpose : Create a ChildIterator from an SObject.

References _errorCode.

Referenced by dump(), dumpSO(), FindObjectByName(), FindVariableAttribute(), SALOMEDSImpl_IParameters::getLastSavePoint(), GetModuleParameters(), main(), and ReplaceVariableAttribute().

SALOMEDSImpl_SComponentIterator SALOMEDSImpl_Study::NewComponentIterator ( )
virtual

method to Create a SComponentIterator

Function : NewComponentIterator Purpose : Create a SComponentIterator.

References _doc, and _errorCode.

Referenced by DumpStudy(), FindComponent(), FindComponentID(), FindObject(), FindVariableAttribute(), SALOMEDSImpl_StudyManager::Impl_SaveAs(), SALOMEDS_Study_i::NewComponentIterator(), SALOMEDSImpl_StudyManager::Open(), and ReplaceVariableAttribute().

std::vector< std::vector< std::string > > SALOMEDSImpl_Study::ParseVariables ( const std::string &  theVariables) const
void SALOMEDSImpl_Study::RegisterGenObj ( const std::string &  theIOR,
DF_Label  label 
)
static

Indirectly invokes GenericObj_i::Register()

References DF_Label::GetDocument(), and getGenObjRegister().

Referenced by SALOMEDSImpl_AttributeIOR::SetValue().

bool SALOMEDSImpl_Study::removeSO_Notification ( const SALOMEDSImpl_SObject theSObject)
virtual

Function : removeSO_Notification Purpose : This function tells all the observers that a SO has been removed.

References _notifier, and SALOMEDSImpl_AbstractCallback::removeSO_Notification().

Referenced by SALOMEDSImpl_StudyBuilder::RemoveObject(), and SALOMEDSImpl_StudyBuilder::RemoveObjectWithChildren().

bool SALOMEDSImpl_Study::RemoveVariable ( const std::string &  theVarName)
bool SALOMEDSImpl_Study::RenameVariable ( const std::string &  theVarName,
const std::string &  theNewVarName 
)
void SALOMEDSImpl_Study::ReplaceVariableAttribute ( SALOMEDSImpl_StudyBuilder theStudyBuilder,
SALOMEDSImpl_SObject  theSObject,
const std::string &  theSource,
const std::string &  theDest 
)
void SALOMEDSImpl_Study::ReplaceVariableAttribute ( const std::string &  theSource,
const std::string &  theDest 
)
SALOMEDSImpl_SComponent SALOMEDSImpl_Study::SComponent ( const DF_Label theLabel)
static
bool SALOMEDSImpl_Study::SetContext ( const std::string &  thePath)
virtual

method to set a context: root ('/') is UserData component

Function : SetContext Purpose : Sets the current context.

References _current, _errorCode, FindObjectByPath(), GetContext(), SALOMEDSImpl_SObject::GetLabel(), and DF_Label::IsNull().

Referenced by GetDirectoryNames(), GetFileNames(), GetObjectNames(), SALOMEDS_Study::SetContext(), and SALOMEDS_Study_i::SetContext().

void SALOMEDSImpl_Study::setGenObjRegister ( SALOMEDSImpl_AbstractCallback theRegister)

Stores theRegister.

References _doc, and getGenObjRegister().

Referenced by SALOMEDS_Study_i::SALOMEDS_Study_i().

void SALOMEDSImpl_Study::setNotifier ( SALOMEDSImpl_AbstractCallback notifier)
virtual

Function : setNotifier Purpose : register a notifier.

References _notifier.

Referenced by SALOMEDS_Study_i::SALOMEDS_Study_i(), and SALOMEDS_Study_i::~SALOMEDS_Study_i().

void SALOMEDSImpl_Study::SetStringVariable ( const std::string &  theVarName,
const std::string &  theValue,
const SALOMEDSImpl_GenericVariable::VariableTypes  theType 
)
void SALOMEDSImpl_Study::SetStringVariableAsDouble ( const std::string &  theVarName,
const double  theValue,
const SALOMEDSImpl_GenericVariable::VariableTypes  theType 
)

Function : SetStringVariableAsDouble Purpose :

References GetVariable().

Referenced by SALOMEDS_Study::SetStringAsDouble(), and SALOMEDS_Study_i::SetStringAsDouble().

void SALOMEDSImpl_Study::SetStudyLock ( const char theLockerID)

Function : SetStudyLock Purpose :

References _lockers.

Referenced by main(), and SALOMEDS_Study_i::SetStudyLock().

void SALOMEDSImpl_Study::SetVariable ( const std::string &  theVarName,
const double  theValue,
const SALOMEDSImpl_GenericVariable::VariableTypes  theType 
)
void SALOMEDSImpl_Study::StudyId ( int  id)
virtual

References _errorCode, and _StudyId.

void SALOMEDSImpl_Study::UnLockStudy ( const char theLockerID)

Function : UnLockStudy Purpose :

References _lockers.

Referenced by main(), SALOMEDS_Study::UnLockStudy(), and SALOMEDS_Study_i::UnLockStudy().

void SALOMEDSImpl_Study::UnRegisterGenObj ( const std::string &  theIOR,
DF_Label  label 
)
static
void SALOMEDSImpl_Study::UpdateIORLabelMap ( const std::string &  anIOR,
const std::string &  aLabel 
)
virtual
std::string SALOMEDSImpl_Study::URL ( )
virtual

method to get URL of the study (idem GetPersistentReference)

Function : URL Purpose : get URL of the study (persistent reference of the study)

References _errorCode, and _URL.

Referenced by GetPersistentReference(), SALOMEDSImpl_StudyManager::Impl_SaveAs(), SALOMEDSImpl_StudyManager::Open(), SALOMEDSImpl_StudyManager::Save(), SALOMEDSImpl_StudyManager::SaveASCII(), SALOMEDS_Study::URL(), and SALOMEDS_Study_i::URL().

void SALOMEDSImpl_Study::URL ( const std::string &  url)
virtual

method to set URL of the study

Function : URL Purpose : set URL of the study (persistent reference of the study)

References _errorCode, _URL, and Name().

Friends And Related Function Documentation

friend class SALOMEDSImpl_GenericAttribute
friend
friend class SALOMEDSImpl_GenericVariable
friend
friend class SALOMEDSImpl_StudyManager
friend

Field Documentation

bool SALOMEDSImpl_Study::_autoFill
private
DF_Label SALOMEDSImpl_Study::_current
private
SALOMEDSImpl_AbstractCallback* SALOMEDSImpl_Study::_genObjRegister
private

Referenced by SALOMEDSImpl_Study().

std::vector<std::string> SALOMEDSImpl_Study::_lockers
private
std::map<std::string, SALOMEDSImpl_SComponent> SALOMEDSImpl_Study::_mapOfSCO
private

Referenced by Close(), and GetSComponent().

std::map<std::string, SALOMEDSImpl_SObject> SALOMEDSImpl_Study::_mapOfSO
private

Referenced by Close(), and GetSObject().

std::string SALOMEDSImpl_Study::_name
private

Referenced by Name(), and SALOMEDSImpl_Study().

bool SALOMEDSImpl_Study::_Saved
private

Referenced by IsSaved(), and SALOMEDSImpl_Study().

int SALOMEDSImpl_Study::_StudyId
private

Referenced by SALOMEDSImpl_Study(), and StudyId().

std::string SALOMEDSImpl_Study::_URL
private

Referenced by SALOMEDSImpl_Study(), and URL().

SALOMEDSImpl_UseCaseBuilder* SALOMEDSImpl_Study::_useCaseBuilder
private
std::map<std::string, DF_Label> SALOMEDSImpl_Study::myIORLabels
private