-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021 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
// Author : Guillaume Boulant (EDF)
+#include <SALOME_KernelServices.hxx>
+
#include "MEDFactoryClient.hxx"
-#include "SALOME_KernelServices.hxx"
namespace MEDFactoryClient {
MEDCALC::MEDFactory_ptr getFactory() {
static MEDCALC::MEDFactory_ptr engine;
if(CORBA::is_nil(engine)){
- Engines::EngineComponent_var component =
- KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer","MEDFactory" );
- engine = MEDCALC::MEDFactory::_narrow(component);
+ Engines::EngineComponent_var component =
+ KERNEL::getLifeCycleCORBA()->FindOrLoad_Component( "FactoryServer","MEDFactory" );
+ engine = MEDCALC::MEDFactory::_narrow(component);
}
return engine;
}
return presentationManager;
}
+ /*!
+ * This returns a singleton (static) instance of the MED commands history.
+ */
+ MEDCALC::MEDCommandsHistoryManager_ptr getCommandsHistoryManager() {
+ static MEDCALC::MEDCommandsHistoryManager_ptr commandsHistoryManager;
+ if(CORBA::is_nil(commandsHistoryManager)){
+ commandsHistoryManager = getFactory()->getCommandsHistoryManager();
+ }
+ return commandsHistoryManager;
+ }
+
}