7 #include <fwRuntime/utils/GenericExecutableFactoryRegistrar.hpp> 8 #include <fwRuntime/operations.hpp> 9 #include <fwRuntime/helper.hpp> 11 #include <fwCore/base.hpp> 12 #include <fwTools/System.hpp> 14 #include <fwMemory/BufferManager.hpp> 15 #include <fwMemory/policy/AlwaysDump.hpp> 16 #include <fwMemory/policy/BarrierDump.hpp> 17 #include <fwMemory/policy/NeverDump.hpp> 18 #include <fwMemory/policy/ValveDump.hpp> 20 #include "memory/Plugin.hpp" 25 static ::fwRuntime::utils::GenericExecutableFactoryRegistrar<Plugin> registrar(
"memory::Plugin");
37 const std::string modeKey =
"loading_mode";
39 if ( this->
getBundle()->hasParameter(modeKey) )
42 std::string mode = this->
getBundle()->getParameterValue(modeKey);
45 manager->setLoadingMode(::fwMemory::BufferManager::LAZY);
46 SLM_INFO(
"Enabled lazy loading mode");
48 else if (mode ==
"direct")
50 manager->setLoadingMode(::fwMemory::BufferManager::DIRECT);
51 SLM_INFO(
"Enabled direct loading mode");
55 SLM_ERROR(
"Unknown loading mode : '" + mode +
"'");
static FWMEMORY_API BufferManager::sptr getDefault()
Returns the current BufferManager instance.
::boost::unique_lock< ReadWriteMutex > WriteLock
Defines a lock of write type for read/write mutex.
#define SLM_ERROR(message)
void start()
Start method. (does nothing)
~Plugin() noexcept
Destructor.
FWRUNTIME_API std::shared_ptr< Bundle > getBundle() const noexcept override
Retrieves the bundle the executable originates from.
void stop() noexcept
Stop method. (does nothing)
The namespace memory contains tools to manage memory. It is used for dump. It allows to define the bu...
#define SLM_INFO(message)