return !isError;
}
-bool Model_Document::save(const char* theFileName)
+bool Model_Document::save(const char* theFileName, std::list<std::string>& theResults)
{
// create a directory in the root document if it is not yet exist
if (this == Model_PluginManager::get()->rootDocument().get()) {
}
myTransactionsAfterSave = 0;
if (isDone) { // save also sub-documents if any
+ theResults.push_back(TCollection_AsciiString(aPath).ToCString());
std::set<std::string>::iterator aSubIter = mySubs.begin();
for (; aSubIter != mySubs.end() && isDone; aSubIter++)
- isDone = subDocument(*aSubIter)->save(theFileName);
+ isDone = subDocument(*aSubIter)->save(theFileName, theResults);
}
return isDone;
}
//! Saves the OCAF document to the file.
//! \param theFileName full name of the file to store
+ //! \param theResults the result full file names that were stored by "save"
//! \returns true if file was stored successfully
- MODEL_EXPORT virtual bool save(const char* theFileName);
+ MODEL_EXPORT virtual bool save(const char* theFileName, std::list<std::string>& theResults);
//! Removes document data
MODEL_EXPORT virtual void close();
#include <string>
#include <boost/shared_ptr.hpp>
#include <vector>
+#include <list>
class ModelAPI_Feature;
class ModelAPI_Object;
//! Saves the OCAF document to the file.
//! \param theFileName full name of the file to store
+ //! \param theResults the result full file names that were stored by "save"
//! \returns true if file was stored successfully
- virtual bool save(const char* theFileName) = 0;
+ virtual bool save(const char* theFileName, std::list<std::string>& theResults) = 0;
//! Removes document data
virtual void close() = 0;
QApplication::restoreOverrideCursor();
PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
DocumentPtr aDoc = aMgr->rootDocument();
- aDoc->save(theName.toLatin1().constData());
+ std::list<std::string> aFileNames;
+ aDoc->save(theName.toLatin1().constData(), aFileNames);
QApplication::restoreOverrideCursor();
}