00001 #ifndef ATLFAST_CONTAINERASSOCSDISPATCHER_H 00002 #define ATLFAST_CONTAINERASSOCSDISPATCHER_H 00003 00004 #ifndef ATLFAST_GATHERASSOCS_H 00005 #include "AtlfastAlgs/GatherAssocs.h" 00006 #endif 00007 00008 #ifndef STD_ALGORITHM_H 00009 #include <algorithm> 00010 #define STD_ALGORITHM_H 00011 #endif 00012 00013 namespace Atlfast{ 00014 00017 template<class Iter, class Visitor> 00018 Visitor ContainerAssocsDispatcher(Iter begin, Iter end, Visitor visitor){ 00019 GatherAssocs ga = std::for_each(begin, end, GatherAssocs()); 00020 return std::for_each(ga.begin(), ga.end(), visitor); 00021 } 00022 } 00023 #endif