Version: 7.8.0
SALOMEDSImpl_StudyManager Class Reference

#include <SALOMEDSImpl_StudyManager.hxx>

Public Member Functions

 SALOMEDSImpl_StudyManager ()
 standard constructor More...
 
virtual ~SALOMEDSImpl_StudyManager ()
 standard destructor More...
 
virtual SALOMEDSImpl_StudyNewStudy (const std::string &study_name)
 method to Create a New Study of name study_name More...
 
virtual SALOMEDSImpl_StudyOpen (const std::string &aStudyUrl)
 method to Open a Study from it's persistent reference More...
 
virtual void Close (SALOMEDSImpl_Study *aStudy)
 method to close a Study More...
 
virtual bool Save (SALOMEDSImpl_Study *aStudy, SALOMEDSImpl_DriverFactory *aFactory, bool theMultiFile)
 method to save a Study More...
 
virtual bool SaveASCII (SALOMEDSImpl_Study *aStudy, SALOMEDSImpl_DriverFactory *aFactory, bool theMultiFile)
 
virtual bool SaveAs (const std::string &aUrl, SALOMEDSImpl_Study *aStudy, SALOMEDSImpl_DriverFactory *aFactory, bool theMultiFile)
 method to save a Study to the persistent reference aUrl More...
 
virtual bool SaveAsASCII (const std::string &aUrl, SALOMEDSImpl_Study *aStudy, SALOMEDSImpl_DriverFactory *aFactory, bool theMultiFile)
 
virtual std::vector
< SALOMEDSImpl_Study * > 
GetOpenStudies ()
 method to Get name list of open studies in the session More...
 
virtual SALOMEDSImpl_StudyGetStudyByName (const std::string &aStudyName)
 method to get a Study from it's name More...
 
virtual SALOMEDSImpl_StudyGetStudyByID (int aStudyID)
 method to get a Study from it's ID More...
 
DF_DocumentGetDocumentOfStudy (SALOMEDSImpl_Study *theStudy)
 Function : GetDocumentOfStudy Purpose : More...
 
DF_DocumentGetClipboard ()
 
bool CopyLabel (SALOMEDSImpl_Study *theSourceStudy, SALOMEDSImpl_Driver *theEngine, const int theSourceStartDepth, const DF_Label &theSource, const DF_Label &theDestinationMain)
 Function : CopyLabel Purpose : More...
 
DF_Label PasteLabel (SALOMEDSImpl_Study *theDestinationStudy, SALOMEDSImpl_Driver *theEngine, const DF_Label &theSource, const DF_Label &theDestinationStart, const int theCopiedStudyID, 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_Study *aStudy, 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 std::string Impl_SubstituteSlash (const std::string &aUrl)
 Function : Impl_SubstituteSlash Purpose : More...
 
virtual bool Impl_SaveProperties (SALOMEDSImpl_Study *aStudy, HDFgroup *hdf_group)
 Function : _SaveProperties Purpose : save the study properties in HDF file. More...
 
std::string GetErrorCode ()
 
virtual bool IsError ()
 

Private Attributes

DF_Application_appli
 
int _IDcounter
 
DF_Document_clipboard
 
std::string _errorCode
 

Constructor & Destructor Documentation

SALOMEDSImpl_StudyManager::SALOMEDSImpl_StudyManager ( )

standard constructor

Function : SALOMEDSImpl_StudyManager Purpose : SALOMEDSImpl_StudyManager constructor.

References _appli, _clipboard, _errorCode, _IDcounter, and DF_Application::NewDocument().

SALOMEDSImpl_StudyManager::~SALOMEDSImpl_StudyManager ( )
virtual

standard destructor

Function : ~SALOMEDSImpl_StudyManager Purpose : SALOMEDSImpl_StudyManager destructor.

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

Member Function Documentation

void SALOMEDSImpl_StudyManager::Close ( SALOMEDSImpl_Study aStudy)
virtual

method to close a Study

Function : Close Purpose : Close a study.

If the study hasn't been saved, ask the user to confirm the close action without saving

References _appli, _errorCode, DF_Application::Close(), SALOMEDSImpl_Study::Close(), and SALOMEDSImpl_Study::GetDocument().

DF_Document* SALOMEDSImpl_StudyManager::GetClipboard ( )
DF_Document * SALOMEDSImpl_StudyManager::GetDocumentOfStudy ( SALOMEDSImpl_Study theStudy)

Function : GetDocumentOfStudy Purpose :

References SALOMEDSImpl_Study::_doc, and _errorCode.

Referenced by Copy(), and Paste().

std::string SALOMEDSImpl_StudyManager::GetErrorCode ( )
std::vector< SALOMEDSImpl_Study * > SALOMEDSImpl_StudyManager::GetOpenStudies ( )
virtual

method to Get name list of open studies in the session

Function : GetOpenStudies Purpose : Get name list of open studies in the session.

References _appli, _clipboard, _errorCode, DF_Application::GetDocument(), DF_Application::GetDocumentIDs(), SALOMEDSImpl_Study::GetStudy(), DF_Document::Main(), and DF_Application::NbDocuments().

Referenced by SALOMEDS_StudyManager::GetOpenStudies(), SALOMEDS_StudyManager_i::GetOpenStudies(), and GetStudyByID().

SALOMEDSImpl_Study * SALOMEDSImpl_StudyManager::GetStudyByName ( const std::string &  aStudyName)
virtual

method to get a Study from it's name

Function : GetStudyByName Purpose : Get a study from its name.

Referenced by SALOMEDS_StudyManager_i::GetStudyByName().

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

Function : _SaveAs Purpose : save the study in HDF file.

References _errorCode, HDFfile::CloseOnDisk(), HDFgroup::CloseOnDisk(), HDFdataset::CloseOnDisk(), SALOMEDSImpl_SComponent::ComponentDataType(), SALOMEDSImpl_SComponent::ComponentIOR(), HDFascii::ConvertFromHDFToASCII(), HDFfile::CreateOnDisk(), HDFgroup::CreateOnDisk(), HDFdataset::CreateOnDisk(), SALOMEDSImpl_TMPFile::Data(), SALOMEDSImpl_Study::FindObjectID(), SALOMEDSImpl_SObject::GetComment(), SALOMEDSImpl_Tool::GetDirFromPath(), SALOMEDSImpl_DriverFactory::GetDriverByIOR(), SALOMEDSImpl_DriverFactory::GetDriverByType(), SALOMEDSImpl_StudyBuilder::GetErrorCode(), SALOMEDSImpl_SObject::GetID(), SALOMEDSImpl_Tool::GetNameFromPath(), SALOMEDSImpl_Study::GetProperties(), SALOMEDSImpl_Tool::GetTmpDir(), HDF_STRING, Impl_SaveObject(), Impl_SaveProperties(), SALOMEDSImpl_SComponentIterator::Init(), SALOMEDSImpl_Study::IsSaved(), SALOMEDSImpl_StudyBuilder::LoadWith(), SALOMEDSImpl_SComponentIterator::More(), SALOMEDSImpl_Study::myNoteBookVars, SALOMEDSImpl_Study::Name(), SALOMEDSImpl_Study::NewBuilder(), SALOMEDSImpl_Study::NewComponentIterator(), SALOMEDSImpl_SComponentIterator::Next(), SALOMEDSImpl_Driver::Save(), SALOMEDSImpl_Driver::SaveASCII(), SaveAttributes(), SALOMEDSImpl_AttributeStudyProperties::SetComponentVersion(), Translate_IOR_to_persistentID(), SALOMEDS::unlock(), SALOMEDSImpl_Study::URL(), USE_CASE_LABEL_ID, SALOMEDSImpl_SComponentIterator::Value(), SALOMEDSImpl_Driver::Version(), and HDFdataset::WriteOnDisk().

Referenced by Save(), SaveAs(), SaveAsASCII(), and SaveASCII().

std::string SALOMEDSImpl_StudyManager::Impl_SubstituteSlash ( const std::string &  aUrl)
virtual

Function : Impl_SubstituteSlash Purpose :

References _errorCode.

virtual bool SALOMEDSImpl_StudyManager::IsError ( )
virtual
SALOMEDSImpl_Study * SALOMEDSImpl_StudyManager::NewStudy ( const std::string &  study_name)
virtual
bool SALOMEDSImpl_StudyManager::Save ( SALOMEDSImpl_Study aStudy,
SALOMEDSImpl_DriverFactory aFactory,
bool  theMultiFile 
)
virtual

method to save a Study

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

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

Referenced by SALOMEDS_StudyManager_i::Save().

bool SALOMEDSImpl_StudyManager::SaveAs ( const std::string &  aUrl,
SALOMEDSImpl_Study aStudy,
SALOMEDSImpl_DriverFactory aFactory,
bool  theMultiFile 
)
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_StudyManager_i::SaveAs().

bool SALOMEDSImpl_StudyManager::SaveAsASCII ( const std::string &  aUrl,
SALOMEDSImpl_Study aStudy,
SALOMEDSImpl_DriverFactory aFactory,
bool  theMultiFile 
)
virtual
bool SALOMEDSImpl_StudyManager::SaveASCII ( SALOMEDSImpl_Study aStudy,
SALOMEDSImpl_DriverFactory aFactory,
bool  theMultiFile 
)
virtual

Field Documentation

DF_Document* SALOMEDSImpl_StudyManager::_clipboard
private
int SALOMEDSImpl_StudyManager::_IDcounter
private