-// Copyright (C) 2014-2021 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2022 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <ModelAPI_Feature.h>
#include <ModelAPI_Plugin.h>
#include <Model_Data.h>
-#include <Model_Document.h>
#include <Model_Objects.h>
#include <Model_Application.h>
#include <Model_Events.h>
bool Model_Session::load(const char* theFileName)
{
+ myIsLoading = true;
bool aRes = ROOT_DOC->load(theFileName, "root", ROOT_DOC);
+ myIsLoading = false;
return aRes;
}
return ROOT_DOC->redoList();
}
+void Model_Session::clearUndoRedo()
+{
+ return ROOT_DOC->clearUndoRedo();
+}
+
+bool Model_Session::checkLicense(const std::string& thePluginName)
+{
+ return getPlugin(thePluginName);
+}
+
ModelAPI_Plugin* Model_Session::getPlugin(const std::string& thePluginName)
{
if (myPluginObjs.find(thePluginName) == myPluginObjs.end()) {
{
myPluginsInfoLoaded = false;
myCheckTransactions = true;
+ myIsLoading = false;
ModelAPI_Session::setSession(std::shared_ptr<ModelAPI_Session>(this));
// register the configuration reading listener
Events_Loop* aLoop = Events_Loop::loop();
}
}
}
+
+#ifdef TINSPECTOR
+Handle(TDocStd_Application) Model_Session::application()
+{
+ return Model_Application::getApplication();
+}
+#endif
\ No newline at end of file