7 #include "monitor/action/SDumpAll.hpp" 9 #include <fwCore/base.hpp> 11 #include <fwGui/dialog/MessageDialog.hpp> 13 #include <fwMemory/BufferManager.hpp> 14 #include <fwMemory/BufferInfo.hpp> 16 #include <fwServices/macros.hpp> 41 size_t nbBuffDumped = 0;
42 ::fwMemory::BufferManager::BufferInfoMapType buffInfoMap;
46 buffInfoMap = buffManager->getBufferInfos().get();
48 for(::fwMemory::BufferManager::BufferInfoMapType::value_type elt : buffInfoMap)
51 bool loaded = dumpBuffInfo.
loaded;
52 bool isLock = dumpBuffInfo.lockCount() > 0;
55 bool dumped = buffManager->dumpBuffer(elt.first).get();
62 std::stringstream stream;
63 stream << nbBuffDumped <<
" buffer dumped (" << nbBuffDumped <<
"/"<<buffInfoMap.size()<<
").";
67 ::fwGui::dialog::IMessageDialog::INFO);
FWGUI_API void actionServiceStarting()
Method called when the action service is starting.
void updating() override
Dump all unlocked array/image etc.
static FWGUI_API IMessageDialog::Buttons showMessageDialog(const std::string &title, const std::string &message,::fwGui::dialog::IMessageDialog::Icons icon=INFO)
static FWMEMORY_API BufferManager::sptr getDefault()
Returns the current BufferManager instance.
FWGUI_API void actionServiceStopping()
Method called when the action service is stopping.
bool loaded
true if 'buffer' is loaded
Defines the service interface managing the menu items.
void configuring() override
Calls classic IAction methods to configure.
FWGUI_API void initialize()
Initialize the action.
Base class for each data object.
void stopping() override
Calls classic IAction methods to stop.
The namespace monitor contains tools for monitoring an application built with FW4SPL.
void starting() override
Calls classic IAction methods to start.
virtual MONITOR_API ~SDumpAll() noexcept
Does nothing.
MONITOR_API SDumpAll() noexcept
Does nothing.
Implements an action that dump all buffer (if possible)