void ActionBlock::Perform(ArtifactSet &artifacts, ProgressListener &listener) { size_t nr = 0; unsigned totalWeight = Weight(); for(const_iterator i=begin();i!=end();++i) { Action *action = *i; unsigned weight = action->Weight(); listener.OnStartTask(*this, nr, totalWeight, action->Description(), weight); action->Perform(artifacts, listener); listener.OnEndTask(*this); nr += weight; } }
void EditStrategyWindow::fillStore(Gtk::TreeModel::Row &row, Action &action, size_t childIndex) { Gtk::TreeModel::iterator iter = _store->append(row.children()); Gtk::TreeModel::Row newRow = *iter; newRow[_columns.action] = &action; newRow[_columns.description] = action.Description(); newRow[_columns.childIndex] = childIndex; ActionContainer *container = dynamic_cast<ActionContainer*>(&action); if(container != 0) { for(size_t i = 0;i<container->GetChildCount();++i) { fillStore(newRow, container->GetChild(i), i); } } }