/* * SmartBlindCollection.cpp * * Created on: 16-mag-2009 * Author: Nicola Mori */ /*! @file SmartCollection.cpp The SmartCollection class implementation file */ #include "SmartBlindCollection.h" void SmartBlindCollection::AddAction(CollectionAction& action) { _actions.push_back(&action); } CollectionAction *SmartBlindCollection::GetAction(unsigned int iAction) { if (_actions.size() == 0) return NULL; if (iAction < 0 || iAction > _actions.size() - 1) return NULL; else return _actions[iAction]; } void SmartBlindCollection::Setup(PamLevel2 *events){ BlindCutCollection::Setup(events); for (unsigned int i = 0; i < _actions.size(); i++){ _actions[i]->Setup(events); } } void SmartBlindCollection::Finalize(){ BlindCutCollection::Finalize(); for (unsigned int i = 0; i < _actions.size(); i++){ _actions[i]->Finalize(); } } void SmartBlindCollection::OnGood(PamLevel2 *event){ BlindCutCollection::OnGood(event); for (unsigned int i = 0; i < _actions.size(); i++){ _actions[i]->OnGood(event); } } void SmartBlindCollection::OnBad(PamLevel2 *event, int selectionResult){ BlindCutCollection::OnBad(event, selectionResult); for (unsigned int i = 0; i < _actions.size(); i++){ _actions[i]->OnBad(event, selectionResult); } }