<BR><VAR>See also <A href=exemple/Example19.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
*/
- void Save(in Study aStudy, in boolean theMultiFile);
+ boolean Save(in Study aStudy, in boolean theMultiFile);
/*! \brief Saving a study in a ASCII file (or files).
Saves a study in an ASCII format file (or files).
\param theMultiFile If this parameter is True the study will be saved in several files.
*/
- void SaveASCII(in Study aStudy, in boolean theMultiFile);
+ boolean SaveASCII(in Study aStudy, in boolean theMultiFile);
/*! \brief Saving the study in a specified HDF file (or files).
Saves the study in a specified file (or files).
<BR><VAR>See also <A href=exemple/Example1.html> an example </A> of this method usage in batchmode of %SALOME application.</VAR>
*/
- void SaveAs(in URL aUrl, // if the file already exists
+ boolean SaveAs(in URL aUrl, // if the file already exists
in Study aStudy,
in boolean theMultiFile); // overwrite (as option)
/*! \brief Saving the study in a specified ASCII file (or files).
\param aStudy The study which will be saved
\param theMultiFile If this parameter is True the study will be saved in several files.
*/
- void SaveAsASCII(in URL aUrl, // if the file already exists
+ boolean SaveAsASCII(in URL aUrl, // if the file already exists
in Study aStudy,
in boolean theMultiFile); // overwrite (as option)
_corba_impl->Close(aStudy);
}
-void SALOMEDS_StudyManager::Save(const _PTR(Study)& theStudy, bool theMultiFile)
+bool SALOMEDS_StudyManager::Save(const _PTR(Study)& theStudy, bool theMultiFile)
{
//SRN: Pure CORBA save as the save operation require CORBA in any case
SALOMEDS::Study_var aStudy = _corba_impl->GetStudyByID(theStudy->StudyId());
- _corba_impl->Save(aStudy, theMultiFile);
+ return _corba_impl->Save(aStudy, theMultiFile);
}
-void SALOMEDS_StudyManager::SaveASCII(const _PTR(Study)& theStudy, bool theMultiFile)
+bool SALOMEDS_StudyManager::SaveASCII(const _PTR(Study)& theStudy, bool theMultiFile)
{
//SRN: Pure CORBA save as the save operation require CORBA in any case
SALOMEDS::Study_var aStudy = _corba_impl->GetStudyByID(theStudy->StudyId());
- _corba_impl->SaveASCII(aStudy, theMultiFile);
+ return _corba_impl->SaveASCII(aStudy, theMultiFile);
}
-void SALOMEDS_StudyManager::SaveAs(const std::string& theUrl, const _PTR(Study)& theStudy, bool theMultiFile)
+bool SALOMEDS_StudyManager::SaveAs(const std::string& theUrl, const _PTR(Study)& theStudy, bool theMultiFile)
{
//SRN: Pure CORBA save as the save operation require CORBA in any case
SALOMEDS::Study_var aStudy = _corba_impl->GetStudyByID(theStudy->StudyId());
- _corba_impl->SaveAs((char*)theUrl.c_str(), aStudy, theMultiFile);
+ return _corba_impl->SaveAs((char*)theUrl.c_str(), aStudy, theMultiFile);
}
-void SALOMEDS_StudyManager::SaveAsASCII(const std::string& theUrl, const _PTR(Study)& theStudy, bool theMultiFile)
+bool SALOMEDS_StudyManager::SaveAsASCII(const std::string& theUrl, const _PTR(Study)& theStudy, bool theMultiFile)
{
//SRN: Pure CORBA save as the save operation require CORBA in any case
SALOMEDS::Study_var aStudy = _corba_impl->GetStudyByID(theStudy->StudyId());
- _corba_impl->SaveAsASCII((char*)theUrl.c_str(), aStudy, theMultiFile);
+ return _corba_impl->SaveAsASCII((char*)theUrl.c_str(), aStudy, theMultiFile);
}
std::vector<std::string> SALOMEDS_StudyManager::GetOpenStudies()
virtual _PTR(Study) NewStudy(const std::string& study_name);
virtual _PTR(Study) Open(const std::string& theStudyUrl);
virtual void Close(const _PTR(Study)& theStudy);
- virtual void Save(const _PTR(Study)& theStudy, bool theMultiFile);
- virtual void SaveASCII(const _PTR(Study)& theStudy, bool theMultiFile);
- virtual void SaveAs(const std::string& theUrl, const _PTR(Study)& theStudy, bool theMultiFile);
- virtual void SaveAsASCII(const std::string& theUrl, const _PTR(Study)& theStudy, bool theMultiFile);
+ virtual bool Save(const _PTR(Study)& theStudy, bool theMultiFile);
+ virtual bool SaveASCII(const _PTR(Study)& theStudy, bool theMultiFile);
+ virtual bool SaveAs(const std::string& theUrl, const _PTR(Study)& theStudy, bool theMultiFile);
+ virtual bool SaveAsASCII(const std::string& theUrl, const _PTR(Study)& theStudy, bool theMultiFile);
virtual std::vector<std::string> GetOpenStudies();
virtual _PTR(Study) GetStudyByName(const std::string& theStudyName) ;
virtual _PTR(Study) GetStudyByID(int theStudyID) ;
* Purpose : Save a Study to it's persistent reference
*/
//============================================================================
-void SALOMEDS_StudyManager_i::Save(SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile)
+CORBA::Boolean SALOMEDS_StudyManager_i::Save(SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile)
{
SALOMEDS::Locker lock;
if(aStudy->_is_nil()) {
MESSAGE("Save error: Study is null");
- return;
+ return false;
}
Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
- _impl->Save(aStudyImpl, _factory, theMultiFile);
+ return _impl->Save(aStudyImpl, _factory, theMultiFile);
}
-void SALOMEDS_StudyManager_i::SaveASCII(SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile)
+CORBA::Boolean SALOMEDS_StudyManager_i::SaveASCII(SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile)
{
SALOMEDS::Locker lock;
if(aStudy->_is_nil()) {
MESSAGE("SaveASCII error: Study is null");
- return;
+ return false;
}
Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
- _impl->SaveASCII(aStudyImpl, _factory, theMultiFile);
+ return _impl->SaveASCII(aStudyImpl, _factory, theMultiFile);
}
//=============================================================================
* Purpose : Save a study to the persistent reference aUrl
*/
//============================================================================
-void SALOMEDS_StudyManager_i::SaveAs(const char* aUrl, SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile)
+CORBA::Boolean SALOMEDS_StudyManager_i::SaveAs(const char* aUrl, SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile)
{
SALOMEDS::Locker lock;
if(aStudy->_is_nil()) {
MESSAGE("SaveASCII error: Study is null");
- return;
+ return false;
}
Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
- _impl->SaveAs(TCollection_AsciiString((char*)aUrl), aStudyImpl, _factory, theMultiFile);
+ return _impl->SaveAs(TCollection_AsciiString((char*)aUrl), aStudyImpl, _factory, theMultiFile);
}
-void SALOMEDS_StudyManager_i::SaveAsASCII(const char* aUrl, SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile)
+CORBA::Boolean SALOMEDS_StudyManager_i::SaveAsASCII(const char* aUrl, SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile)
{
SALOMEDS::Locker lock;
if(aStudy->_is_nil()) {
MESSAGE("SaveASCII error: Study is null");
- return;
+ return false;
}
Handle(SALOMEDSImpl_Study) aStudyImpl = _impl->GetStudyByID(aStudy->StudyId());
- _impl->SaveAsASCII(TCollection_AsciiString((char*)aUrl), aStudyImpl, _factory, theMultiFile);
+ return _impl->SaveAsASCII(TCollection_AsciiString((char*)aUrl), aStudyImpl, _factory, theMultiFile);
}
//============================================================================
/*!
\param Study_ptr arguments
*/
- virtual void Save( SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile);
+ virtual CORBA::Boolean Save( SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile);
- virtual void SaveASCII( SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile);
+ virtual CORBA::Boolean SaveASCII( SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile);
//! method to save a Study to the persistent reference aUrl
/*!
\param char* arguments, the new URL of the study
\param Study_ptr arguments
*/
- virtual void SaveAs(const char* aUrl, SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile);
- virtual void SaveAsASCII(const char* aUrl, SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile);
+ virtual CORBA::Boolean SaveAs(const char* aUrl, SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile);
+ virtual CORBA::Boolean SaveAsASCII(const char* aUrl, SALOMEDS::Study_ptr aStudy, CORBA::Boolean theMultiFile);
//! method to Get name list of open studies in the session
/*!
virtual _PTR(Study) NewStudy(const std::string& study_name) = 0;
virtual _PTR(Study) Open(const std::string& theStudyUrl) = 0;
virtual void Close(const _PTR(Study)& theStudy) = 0;
- virtual void Save(const _PTR(Study)& theStudy, bool theMultiFile) = 0;
- virtual void SaveASCII(const _PTR(Study)& theStudy, bool theMultiFile) = 0;
- virtual void SaveAs(const std::string& theUrl, const _PTR(Study)& theStudy, bool theMultiFile) = 0;
- virtual void SaveAsASCII(const std::string& theUrl, const _PTR(Study)& theStudy, bool theMultiFile) = 0;
+ virtual bool Save(const _PTR(Study)& theStudy, bool theMultiFile) = 0;
+ virtual bool SaveASCII(const _PTR(Study)& theStudy, bool theMultiFile) = 0;
+ virtual bool SaveAs(const std::string& theUrl, const _PTR(Study)& theStudy, bool theMultiFile) = 0;
+ virtual bool SaveAsASCII(const std::string& theUrl, const _PTR(Study)& theStudy, bool theMultiFile) = 0;
virtual std::vector<std::string> GetOpenStudies() = 0;
virtual _PTR(Study) GetStudyByName(const std::string& theStudyName) = 0;
virtual _PTR(Study) GetStudyByID(int theStudyID) = 0;