Version: 9.12.0
SALOMEDSImpl_Study Class Reference

#include <SALOMEDSImpl_Study.hxx>

Public Member Functions

 SALOMEDSImpl_Study ()
 standard constructor More...
 
virtual ~SALOMEDSImpl_Study ()
 standard destructor More...
 
virtual void Init ()
 Function : Init Purpose : Initialize study components. More...
 
virtual void Clear ()
 Function : Clear Purpose : Clear study components. More...
 
virtual bool Open (const std::string &aStudyUrl)
 method to Open a Study from it's persistent reference More...
 
virtual bool Save (SALOMEDSImpl_DriverFactory *aFactory, bool theMultiFile, bool theASCII)
 method to save a Study More...
 
virtual bool SaveAs (const std::string &aUrl, SALOMEDSImpl_DriverFactory *aFactory, bool theMultiFile, bool theASCII)
 method to save a Study to the persistent reference aUrl More...
 
bool CopyLabel (SALOMEDSImpl_Driver *theEngine, const int theSourceStartDepth, const DF_Label &theSource, const DF_Label &theDestinationMain)
 Function : CopyLabel Purpose : More...
 
DF_Label PasteLabel (SALOMEDSImpl_Driver *theEngine, const DF_Label &theSource, const DF_Label &theDestinationStart, const bool isFirstElement)
 Function : PasteLabel Purpose : More...
 
virtual bool CanCopy (const SALOMEDSImpl_SObject &theObject, SALOMEDSImpl_Driver *Engine)
 Function : CanCopy Purpose : More...
 
virtual bool Copy (const SALOMEDSImpl_SObject &theObject, SALOMEDSImpl_Driver *Engine)
 Function : Copy Purpose : More...
 
virtual bool CanPaste (const SALOMEDSImpl_SObject &theObject, SALOMEDSImpl_Driver *Engine)
 Function : CanPaste Purpose : More...
 
virtual SALOMEDSImpl_SObject Paste (const SALOMEDSImpl_SObject &theObject, SALOMEDSImpl_Driver *Engine)
 Function : Paste Purpose : More...
 
virtual bool Impl_SaveAs (const std::string &aUrl, SALOMEDSImpl_DriverFactory *aFactory, bool theMultiFile, bool theASCII)
 Function : _SaveAs Purpose : save the study in HDF file. More...
 
virtual bool Impl_SaveObject (const SALOMEDSImpl_SObject &SC, HDFgroup *hdf_group_datatype)
 Function : Impl_SaveObject Purpose : More...
 
virtual bool Impl_SaveProperties (HDFgroup *hdf_group)
 Function : _SaveProperties Purpose : save the study properties in HDF file. More...
 
virtual std::string GetPersistentReference ()
 method to Get persistent reference of study (idem URL()) More...
 
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_SObjectFindObjectByName (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 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 void DeleteIORLabelMapItem (const std::string &anIOR)
 
virtual void UpdateIORLabelMap (const std::string &anIOR, const std::string &aLabel)
 
virtual std::vector< SALOMEDSImpl_SObjectFindDependances (const SALOMEDSImpl_SObject &anObject)
 
virtual SALOMEDSImpl_AttributeStudyPropertiesGetProperties ()
 
virtual std::string GetLastModificationDate ()
 
virtual std::vector< std::string > GetModificationsDate ()
 
virtual SALOMEDSImpl_UseCaseBuilderGetUseCaseBuilder ()
 Function : GetUseCaseBuilder Purpose : Returns a UseCase builder. 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 DumpStudy (const std::string &thePath, const std::string &theBaseName, bool isPublished, bool isMultiFile, SALOMEDSImpl_DriverFactory *theFactory)
 Function : DumpStudy Purpose : More...
 
std::string GetDumpPath ()
 
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_StudyGetStudyImpl (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 ()
 Function : _GetNoteBookAccess Purpose : More...
 

Private Attributes

std::string _name
 
DF_Application_appli
 
DF_Document_doc
 
DF_Document_clipboard
 
bool _Saved
 
std::string _URL
 
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::string _dumpPath
 
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_GenericAttribute
 
class SALOMEDSImpl_GenericVariable
 

Constructor & Destructor Documentation

◆ SALOMEDSImpl_Study()

SALOMEDSImpl_Study::SALOMEDSImpl_Study ( )

standard constructor

Function : SALOMEDSImpl_Study Purpose : SALOMEDSImpl_Study constructor.

References _appli, _clipboard, Init(), and DF_Application::NewDocument().

◆ ~SALOMEDSImpl_Study()

SALOMEDSImpl_Study::~SALOMEDSImpl_Study ( )
virtual

standard destructor

Function : ~SALOMEDSImpl_Study Purpose : SALOMEDSImpl_Study destructor.

References _appli, _clipboard, Clear(), and DF_Application::Close().

Member Function Documentation

◆ _FindObject()

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

◆ _FindObjectIOR()

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

◆ _GetNoteBookAccess()

std::string SALOMEDSImpl_Study::_GetNoteBookAccess ( )
private

Function : _GetNoteBookAccess Purpose :

References _GetNoteBookAccessor(), and KERNEL_PY.salome_notebook::notebook.

Referenced by DumpStudy().

◆ _GetNoteBookAccessor()

std::string SALOMEDSImpl_Study::_GetNoteBookAccessor ( )
private

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

Referenced by _GetNoteBookAccess(), and _GetStudyVariablesScript().

◆ _GetStudyVariablesScript()

std::string SALOMEDSImpl_Study::_GetStudyVariablesScript ( )
private

Function : _GetStudyVariablesScript Purpose :

References _GetNoteBookAccessor(), dump(), myNoteBookVars, and TestSalomeSDSHelper0::varName.

Referenced by DumpStudy().

◆ addSO_Notification()

bool SALOMEDSImpl_Study::addSO_Notification ( const SALOMEDSImpl_SObject theSObject)
virtual

◆ AddVariable()

void SALOMEDSImpl_Study::AddVariable ( SALOMEDSImpl_GenericVariable theVariable)

Function : AddVariable Purpose :

References myNoteBookVars.

Referenced by ReadNoteBookVariables().

◆ CanCopy()

◆ CanPaste()

◆ Clear()

void SALOMEDSImpl_Study::Clear ( )
virtual

Function : Clear Purpose : Clear study components.

References _appli, _builder, _cb, _doc, _mapOfSCO, _mapOfSO, _useCaseBuilder, DF_Application::Close(), and URL().

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

◆ Copy()

◆ CopyLabel()

◆ CreateObjectID()

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().

◆ DeleteIORLabelMapItem()

void SALOMEDSImpl_Study::DeleteIORLabelMapItem ( const std::string &  anIOR)
virtual

◆ dump()

void SALOMEDSImpl_Study::dump ( const std::string &  theFileName)

◆ DumpStudy()

◆ EnableUseCaseAutoFilling()

void SALOMEDSImpl_Study::EnableUseCaseAutoFilling ( bool  isEnabled)

◆ FindComponent()

SALOMEDSImpl_SComponent SALOMEDSImpl_Study::FindComponent ( const std::string &  aComponentName)
virtual

◆ FindComponentID()

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().

◆ FindDependances()

◆ FindObject()

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().

◆ FindObjectByName()

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().

◆ FindObjectByPath()

SALOMEDSImpl_SObject SALOMEDSImpl_Study::FindObjectByPath ( const std::string &  thePath)
virtual

method to Find an Object by its path

Function : FindObjectByPath Purpose : Find an Object by its path = thePath.

< TODO: conversion from size_t to int

< TODO: conversion from size_t to int

References _doc, _errorCode, DF_Label::FindAttribute(), SALOMEDSImpl_AttributeName::GetID(), GetSObject(), DF_ChildIterator::Init(), DF_Document::Main(), DF_ChildIterator::More(), DF_ChildIterator::Next(), SALOMEDSImpl_Tool::splitString(), DF_ChildIterator::Value(), and SALOMEDSImpl_AttributeName::Value().

Referenced by SALOMEDS_Study_i::FindObjectByPath().

◆ FindObjectID()

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

method to Find an Object with ID = anObjectID

Function : FindObjectID Purpose : Find an Object with ID = anObjectID.

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

Referenced by CopyLabel(), dump(), SALOMEDS_Study_i::FindObjectID(), SALOMEDSImpl_IParameters::getDefaultScript(), SALOMEDS_Study_i::GetObjectPath(), Impl_SaveAs(), and PasteLabel().

◆ FindObjectIOR()

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().

◆ FindVariableAttribute() [1/2]

bool SALOMEDSImpl_Study::FindVariableAttribute ( const std::string &  theName)

◆ FindVariableAttribute() [2/2]

bool SALOMEDSImpl_Study::FindVariableAttribute ( SALOMEDSImpl_StudyBuilder theStudyBuilder,
SALOMEDSImpl_SObject  theSObject,
const std::string &  theName 
)

Function : FindVariableAttribute Purpose :

< TODO: conversion from size_t to int

< TODO: conversion from size_t to int

References SALOMEDSImpl_StudyBuilder::FindAttribute(), SALOMEDSImpl_ChildIterator::More(), NewChildIterator(), SALOMEDSImpl_ChildIterator::Next(), ParseVariables(), and SALOMEDSImpl_ChildIterator::Value().

Referenced by FindVariableAttribute(), and IsVariableUsed().

◆ GetAttribute()

DF_Attribute * SALOMEDSImpl_Study::GetAttribute ( const std::string &  theEntry,
const std::string &  theType 
)
virtual

Function : GetAttribute Purpose :

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

◆ GetCallback()

SALOMEDSImpl_Callback* SALOMEDSImpl_Study::GetCallback ( )

◆ GetCommonParameters()

◆ GetDocument()

◆ GetDumpPath()

std::string SALOMEDSImpl_Study::GetDumpPath ( )

References _dumpPath.

Referenced by SALOMEDS_Study_i::GetDumpPath().

◆ GetDumpStudyComment()

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

Referenced by DumpStudy().

◆ GetErrorCode()

virtual std::string SALOMEDSImpl_Study::GetErrorCode ( )
virtual

◆ GetIORs()

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

Function : GetIORs Purpose :

References myIORLabels.

Referenced by SALOMEDS_Study_i::RemovePostponed().

◆ GetLastModificationDate()

std::string SALOMEDSImpl_Study::GetLastModificationDate ( )
virtual

◆ GetLockerID()

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

Function : GetLockerID Purpose :

References _lockers.

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

◆ GetModificationsDate()

std::vector< std::string > SALOMEDSImpl_Study::GetModificationsDate ( )
virtual

◆ GetModuleParameters()

◆ GetObjectPath()

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 SALOMEDS_Study_i::GetObjectPath(), GetObjectPathByIOR(), and main().

◆ GetObjectPathByIOR()

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

Function : GetObjectPathByIOR Purpose :

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

◆ GetPersistentReference()

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().

◆ GetProperties()

◆ GetSComponent() [1/2]

SALOMEDSImpl_SComponent SALOMEDSImpl_Study::GetSComponent ( const DF_Label theLabel)
virtual

Function : GetSComponent Purpose :

◆ GetSComponent() [2/2]

◆ GetSObject() [1/2]

SALOMEDSImpl_SObject SALOMEDSImpl_Study::GetSObject ( const DF_Label theEntryLabel)
virtual

Function : GetSObject Purpose :

◆ GetSObject() [2/2]

◆ GetStringVariableValue()

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

Function : GetString Purpose :

References GetVariable().

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

◆ GetStudyImpl()

◆ GetUseCaseBuilder()

SALOMEDSImpl_UseCaseBuilder * SALOMEDSImpl_Study::GetUseCaseBuilder ( )
virtual

Function : GetUseCaseBuilder Purpose : Returns a UseCase builder.

References _errorCode, and _useCaseBuilder.

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

◆ GetVariable()

SALOMEDSImpl_GenericVariable * SALOMEDSImpl_Study::GetVariable ( const std::string &  theName) const

◆ GetVariableNames()

std::vector< std::string > SALOMEDSImpl_Study::GetVariableNames ( ) const

Function : GetVariableNames Purpose :

References myNoteBookVars.

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

◆ GetVariableValue()

double SALOMEDSImpl_Study::GetVariableValue ( const std::string &  theVarName)

◆ Impl_SaveAs()

bool SALOMEDSImpl_Study::Impl_SaveAs ( const std::string &  aUrl,
SALOMEDSImpl_DriverFactory aFactory,
bool  theMultiFile,
bool  theASCII 
)
virtual

◆ Impl_SaveObject()

◆ Impl_SaveProperties()

bool SALOMEDSImpl_Study::Impl_SaveProperties ( HDFgroup hdf_group)
virtual

Function : _SaveProperties Purpose : save the study properties in HDF file.

< TODO: conversion from size_t to int

< TODO: conversion from size_t to int

< TODO: conversion from size_t to int

< TODO: conversion from size_t to int

< TODO: conversion from size_t to int

< TODO: conversion from size_t to int

< TODO: conversion from size_t to int

< TODO: conversion from size_t to int

< TODO: conversion from size_t to int

References _errorCode, TestSalomeSDS1::a, HDFdataset::CloseOnDisk(), HDFdataset::CreateOnDisk(), SALOMEDSImpl_AttributeStudyProperties::GetComment(), SALOMEDSImpl_AttributeStudyProperties::GetComponentsVersions(), SALOMEDSImpl_AttributeStudyProperties::GetCreationMode(), SALOMEDSImpl_AttributeStudyProperties::GetModifications(), GetProperties(), SALOMEDSImpl_Tool::GetSystemDate(), SALOMEDSImpl_AttributeStudyProperties::GetUnits(), SALOMEDSImpl_Tool::GetUserName(), HDF_STRING, SALOMEDSImpl_AttributeStudyProperties::IsLocked(), SALOMEDSImpl_AttributeStudyProperties::SetModification(), SALOMEDSImpl_AttributeStudyProperties::SetModified(), SALOMEDS::unlock(), and HDFdataset::WriteOnDisk().

Referenced by Impl_SaveAs().

◆ Init()

◆ IORUpdated()

◆ IsEmpty()

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().

◆ IsError()

virtual bool SALOMEDSImpl_Study::IsError ( )
virtual

◆ IsLocked()

bool SALOMEDSImpl_Study::IsLocked ( )
virtual

◆ IsModified()

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().

◆ IsSaved() [1/2]

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 Impl_SaveAs(), SALOMEDS_Study::IsSaved(), and SALOMEDS_Study_i::IsSaved().

◆ IsSaved() [2/2]

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().

◆ IsStudyLocked()

bool SALOMEDSImpl_Study::IsStudyLocked ( )

Function : IsStudyLocked Purpose :

References _lockers.

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

◆ IsTypeOf()

◆ IsVariable()

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

Function : IsVariable Purpose :

References GetVariable().

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

◆ IsVariableUsed()

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

Function : IsVariableUsed Purpose :

References FindVariableAttribute().

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

◆ Modify()

◆ modifySO_Notification()

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().

◆ Name() [1/2]

std::string SALOMEDSImpl_Study::Name ( )
virtual

method to get study name

Function : Name Purpose : get study name.

References _errorCode, _name, and Kernel_Utils::GetBaseName().

Referenced by Impl_SaveAs(), SALOMEDS_Study::Name(), and SALOMEDS_Study_i::Name().

◆ Name() [2/2]

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

method to set study name

Function : Name Purpose : set study name.

References _errorCode, _name, and pythfilter::name.

◆ NewBuilder()

◆ NewChildIterator()

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 _PTR(), dump(), dumpSO(), FindObjectByName(), FindVariableAttribute(), SALOMEDSImpl_IParameters::getLastSavePoint(), GetModuleParameters(), main(), and ReplaceVariableAttribute().

◆ NewComponentIterator()

SALOMEDSImpl_SComponentIterator SALOMEDSImpl_Study::NewComponentIterator ( )
virtual

method to Create a SComponentIterator

Function : NewComponentIterator Purpose : Create a SComponentIterator.

References _doc, and _errorCode.

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

◆ Open()

◆ ParseVariables()

std::vector< std::vector< std::string > > SALOMEDSImpl_Study::ParseVariables ( const std::string &  theVariables) const

◆ Paste()

◆ PasteLabel()

◆ RegisterGenObj()

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().

◆ removeSO_Notification()

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().

◆ RemoveVariable()

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

◆ RenameVariable()

bool SALOMEDSImpl_Study::RenameVariable ( const std::string &  theVarName,
const std::string &  theNewVarName 
)

◆ ReplaceVariableAttribute() [1/2]

void SALOMEDSImpl_Study::ReplaceVariableAttribute ( const std::string &  theSource,
const std::string &  theDest 
)

◆ ReplaceVariableAttribute() [2/2]

void SALOMEDSImpl_Study::ReplaceVariableAttribute ( SALOMEDSImpl_StudyBuilder theStudyBuilder,
SALOMEDSImpl_SObject  theSObject,
const std::string &  theSource,
const std::string &  theDest 
)

Function : ReplaceVariableAttribute Purpose :

< TODO: conversion from size_t to int

< TODO: conversion from size_t to int

References SALOMEDSImpl_StudyBuilder::FindAttribute(), SALOMEDSImpl_ChildIterator::More(), NewChildIterator(), SALOMEDSImpl_ChildIterator::Next(), ParseVariables(), and SALOMEDSImpl_ChildIterator::Value().

Referenced by RemoveVariable(), RenameVariable(), and ReplaceVariableAttribute().

◆ Save()

bool SALOMEDSImpl_Study::Save ( SALOMEDSImpl_DriverFactory aFactory,
bool  theMultiFile,
bool  theASCII 
)
virtual

method to save a Study

Function : Save Purpose : Save a Study to it's persistent reference.

References _errorCode, Impl_SaveAs(), and URL().

Referenced by SALOMEDS_Study_i::Save(), and SALOME_DriverPy.SALOME_DriverPy_i::SaveASCII().

◆ SaveAs()

bool SALOMEDSImpl_Study::SaveAs ( const std::string &  aUrl,
SALOMEDSImpl_DriverFactory aFactory,
bool  theMultiFile,
bool  theASCII 
)
virtual

method to save a Study to the persistent reference aUrl

Function : SaveAs Purpose : Save a study to the persistent reference aUrl.

References _errorCode, and Impl_SaveAs().

Referenced by SALOMEDS_Study_i::SaveAs().

◆ SComponent()

SALOMEDSImpl_SComponent SALOMEDSImpl_Study::SComponent ( const DF_Label theLabel)
static

◆ setGenObjRegister()

void SALOMEDSImpl_Study::setGenObjRegister ( SALOMEDSImpl_AbstractCallback theRegister)

Stores theRegister.

References _doc, and getGenObjRegister().

Referenced by SALOMEDS_Study_i::Init().

◆ setNotifier()

void SALOMEDSImpl_Study::setNotifier ( SALOMEDSImpl_AbstractCallback notifier)
virtual

Function : setNotifier Purpose : register a notifier.

References _notifier.

Referenced by SALOMEDS_Study_i::Clear(), and SALOMEDS_Study_i::Init().

◆ SetStringVariable()

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

◆ SetStringVariableAsDouble()

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

Function : SetStringVariableAsDouble Purpose :

References GetVariable().

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

◆ SetStudyLock()

void SALOMEDSImpl_Study::SetStudyLock ( const char *  theLockerID)

Function : SetStudyLock Purpose :

References _lockers.

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

◆ SetVariable()

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

◆ SObject()

◆ UnLockStudy()

void SALOMEDSImpl_Study::UnLockStudy ( const char *  theLockerID)

Function : UnLockStudy Purpose :

< TODO: conversion from size_t to int

References _lockers.

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

◆ UnRegisterGenObj()

void SALOMEDSImpl_Study::UnRegisterGenObj ( const std::string &  theIOR,
DF_Label  label 
)
static

◆ UpdateIORLabelMap()

void SALOMEDSImpl_Study::UpdateIORLabelMap ( const std::string &  anIOR,
const std::string &  aLabel 
)
virtual

◆ URL() [1/2]

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 Clear(), GetPersistentReference(), Impl_SaveAs(), Open(), Save(), SALOMEDS_Study::URL(), and SALOMEDS_Study_i::URL().

◆ URL() [2/2]

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, _name, and _URL.

Friends And Related Function Documentation

◆ SALOMEDSImpl_GenericAttribute

friend class SALOMEDSImpl_GenericAttribute
friend

◆ SALOMEDSImpl_GenericVariable

friend class SALOMEDSImpl_GenericVariable
friend

Field Documentation

◆ _appli

DF_Application* SALOMEDSImpl_Study::_appli
private

◆ _autoFill

bool SALOMEDSImpl_Study::_autoFill
private

◆ _builder

SALOMEDSImpl_StudyBuilder* SALOMEDSImpl_Study::_builder
private

◆ _cb

SALOMEDSImpl_Callback* SALOMEDSImpl_Study::_cb
private

◆ _clipboard

DF_Document* SALOMEDSImpl_Study::_clipboard
private

◆ _doc

◆ _dumpPath

std::string SALOMEDSImpl_Study::_dumpPath
private

Referenced by DumpStudy(), and GetDumpPath().

◆ _errorCode

◆ _genObjRegister

SALOMEDSImpl_AbstractCallback* SALOMEDSImpl_Study::_genObjRegister
private

Referenced by Init().

◆ _lockers

std::vector<std::string> SALOMEDSImpl_Study::_lockers
private

◆ _mapOfSCO

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

Referenced by Clear(), and GetSComponent().

◆ _mapOfSO

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

Referenced by Clear(), and GetSObject().

◆ _name

std::string SALOMEDSImpl_Study::_name
private

Referenced by Init(), Name(), and URL().

◆ _notifier

◆ _Saved

bool SALOMEDSImpl_Study::_Saved
private

Referenced by Init(), and IsSaved().

◆ _URL

std::string SALOMEDSImpl_Study::_URL
private

Referenced by Init(), and URL().

◆ _useCaseBuilder

SALOMEDSImpl_UseCaseBuilder* SALOMEDSImpl_Study::_useCaseBuilder
private

Referenced by Clear(), GetUseCaseBuilder(), and Init().

◆ myIORLabels

std::map<std::string, DF_Label> SALOMEDSImpl_Study::myIORLabels
private

◆ myNoteBookVars