15 #include <boost/shared_ptr.hpp>
106 unsigned int index = 0;
107 for(std::set<const FWEventItem*>::iterator itChanges =
m_itemChanges.begin();
109 ++itChanges,++
index) {
117 FWItemChangeSignal::slot_list_type slots = signal.slots();
118 for(FWItemChangeSignal::slot_list_type::iterator itSlot=slots.begin(), itEnd = slots.end();
122 (*itSlot)(*itChanges);
124 fwLog(
fwlog::kError) <<(*itChanges)->name()<<
" had the failure in process FWItemChanged signals\n"<<iE.
what()<<std::endl;
125 }
catch(
const std::bad_alloc& iE) {
126 std::cerr <<
"Ran out of memory while processing "<<(*itChanges)->name()<<std::endl;
129 fwLog(
fwlog::kError) <<(*itChanges)->name()<<
" had the failure in process FWItemChanged signals (2) \n"<<iE.what()<<std::endl;
135 for (
size_t ci = 0, ce =
m_changes.size(), si = 0; ci != ce; ++ci, ++si)
140 if (not changes.empty())
149 FWModelChangeSignal::slot_list_type slots = signal.slots();
150 for(FWModelChangeSignal::slot_list_type::iterator itSlot = slots.begin(), itEnd = slots.end();
160 fwLog(
fwlog::kError) << changes.begin()->item()->name()<<
" had the failure in process FWModelChangeSignals\n"
161 << iE.
what() <<
"\n";
163 catch(
const std::bad_alloc& iE)
166 fwLog(
fwlog::kError) <<
"Ran out of memory while processing " << changes.begin()->item()->name() <<
"\n";
172 <<
" had the failure in process FWModelChangeSignals (2)\n"
173 << iE.what() <<
"\n";
virtual char const * what() const
sigc::signal< void, const FWEventItem * > FWItemChangeSignal
sigc::signal< void, const FWModelIds & > FWModelChangeSignal
std::vector< FWModelChangeSignal > m_changeSignals
void itemsGoingToBeClearedSlot(void)
std::vector< FWModelIds > m_changes
static void sendChangeSignalsAreDone(FWModelChangeManager *iCM)
std::set< FWModelId > FWModelIds
std::set< const FWEventItem * > m_itemChanges
void newItemSlot(FWEventItem *)
FWItemChangeSignal itemChanged_
sigc::signal< void > changeSignalsAreDone_
void changed(const FWModelId &)
std::vector< FWItemChangeSignal > m_itemChangeSignals
sigc::signal< void > changeSignalsAreComing_
FWModelChangeSignal changed_
virtual ~FWModelChangeManager()
const FWEventItem * item() const