16 #include <boost/shared_ptr.hpp>
107 unsigned int index = 0;
108 for(std::set<const FWEventItem*>::iterator itChanges =
m_itemChanges.begin();
110 ++itChanges,++
index) {
118 FWItemChangeSignal::slot_list_type slots = signal.slots();
119 for(FWItemChangeSignal::slot_list_type::iterator itSlot=slots.begin(), itEnd = slots.end();
123 (*itSlot)(*itChanges);
125 fwLog(
fwlog::kError) <<(*itChanges)->name()<<
" had the failure in process FWItemChanged signals\n"<<iE.
what()<<std::endl;
126 }
catch(
const std::bad_alloc& iE) {
127 std::cerr <<
"Ran out of memory while processing "<<(*itChanges)->name()<<std::endl;
130 fwLog(
fwlog::kError) <<(*itChanges)->name()<<
" had the failure in process FWItemChanged signals (2) \n"<<iE.what()<<std::endl;
136 for (
size_t ci = 0, ce =
m_changes.size(), si = 0; ci != ce; ++ci, ++si)
141 if (not changes.empty())
150 FWModelChangeSignal::slot_list_type slots = signal.slots();
151 for(FWModelChangeSignal::slot_list_type::iterator itSlot = slots.begin(), itEnd = slots.end();
161 fwLog(
fwlog::kError) << changes.begin()->item()->name()<<
" had the failure in process FWModelChangeSignals\n"
162 << iE.
what() <<
"\n";
164 catch(
const std::bad_alloc& iE)
167 fwLog(
fwlog::kError) <<
"Ran out of memory while processing " << changes.begin()->item()->name() <<
"\n";
173 <<
" had the failure in process FWModelChangeSignals (2)\n"
174 << 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< const FWEventItem * > m_itemChanges
void newItemSlot(FWEventItem *)
std::set< FWModelId > FWModelIds
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