7 #ifndef __FWMEMORY_IPOLICY_HPP__ 8 #define __FWMEMORY_IPOLICY_HPP__ 10 #include "fwMemory/BufferInfo.hpp" 11 #include "fwMemory/BufferManager.hpp" 12 #include "fwMemory/config.hpp" 13 #include "fwMemory/policy/factory/new.hpp" 15 #include <fwCore/base.hpp> 28 typedef std::vector<std::string> ParamNamesType;
30 virtual void allocationRequest(
BufferInfo& info,
31 ::fwMemory::BufferManager::ConstBufferPtrType buffer,
32 BufferInfo::SizeType size ) = 0;
35 ::fwMemory::BufferManager::ConstBufferPtrType buffer, BufferInfo::SizeType size ) = 0;
37 virtual void reallocateRequest(
BufferInfo& info,
38 ::fwMemory::BufferManager::ConstBufferPtrType buffer,
39 BufferInfo::SizeType newSize ) = 0;
41 virtual void destroyRequest(
BufferInfo& info, ::fwMemory::BufferManager::ConstBufferPtrType buffer ) = 0;
43 virtual void lockRequest(
BufferInfo& info, ::fwMemory::BufferManager::ConstBufferPtrType buffer ) = 0;
44 virtual void unlockRequest(
BufferInfo& info, ::fwMemory::BufferManager::ConstBufferPtrType buffer ) = 0;
46 virtual void dumpSuccess(
BufferInfo& info, ::fwMemory::BufferManager::ConstBufferPtrType buffer ) = 0;
47 virtual void restoreSuccess(
BufferInfo& info, ::fwMemory::BufferManager::ConstBufferPtrType buffer ) = 0;
49 virtual void refresh() = 0;
51 virtual bool setParam(
const std::string& name,
const std::string& value) = 0;
52 virtual std::string getParam(
const std::string& name,
bool* ok = NULL )
const = 0;
53 virtual const ParamNamesType& getParamNames()
const = 0;
61 ::fwMemory::policy::registry::get()->addFactory(T::leafClassname(), &::fwMemory::policy::factory::New<T>);
69 #endif // __FWMEMORY_IPOLICY_HPP__
Base class for all FW4SPL's classes.
The namespace fwMemory contains tools to manage memory. Use for dump.
Defines the memory dump policy interface.