7 #ifndef __FWMEMORY_POLICY_BARRIERDUMP_HPP__ 8 #define __FWMEMORY_POLICY_BARRIERDUMP_HPP__ 10 #include "fwMemory/BufferInfo.hpp" 11 #include "fwMemory/BufferManager.hpp" 12 #include "fwMemory/config.hpp" 13 #include "fwMemory/IPolicy.hpp" 14 #include "fwMemory/policy/factory/new.hpp" 16 #include <fwCore/base.hpp> 35 ::fwMemory::policy::factory::New< BarrierDump >)
38 FWMEMORY_API virtual
void allocationRequest(
BufferInfo& info,
42 FWMEMORY_API virtual
void setRequest(
BufferInfo& info,
46 FWMEMORY_API virtual
void reallocateRequest(
BufferInfo& info,
50 FWMEMORY_API virtual
void destroyRequest(
BufferInfo& info,
53 FWMEMORY_API virtual
void lockRequest(
BufferInfo& info,
55 FWMEMORY_API virtual
void unlockRequest(
BufferInfo& info,
58 FWMEMORY_API virtual
void dumpSuccess(
BufferInfo& info,
60 FWMEMORY_API virtual
void restoreSuccess(
BufferInfo& info,
63 FWMEMORY_API virtual
void refresh() override;
67 void setBarrier(
size_t barrier )
73 size_t getBarrier()
const 78 FWMEMORY_API
virtual std::string getParam(
const std::string& name,
bool* ok = NULL )
const override;
79 FWMEMORY_API
bool setParam(
const std::string& name,
const std::string& value)
override;
80 FWMEMORY_API
const fwMemory::IPolicy::ParamNamesType& getParamNames()
const override;
84 FWMEMORY_API
size_t getTotalAlive()
const;
85 FWMEMORY_API
bool isBarrierCrossed()
const;
87 FWMEMORY_API
size_t dump(
size_t nbOfBytes);
89 FWMEMORY_API
void apply();
91 size_t m_totalAllocated;
100 #endif // __FWMEMORY_POLICY_BARRIERDUMP_HPP__ The namespace fwMemory contains tools to manage memory. Use for dump.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
BufferManager implementation.
Defines the memory dump policy interface.