[Kpod-devel] cvs_commit libqtpod/src containerutils.h,1.2,1.3
Status: Beta
Brought to you by:
fry26
From: Michael S. <fr...@us...> - 2006-03-19 23:40:52
|
Update of /cvsroot/kpod/libqtpod/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8173/src Modified Files: containerutils.h Log Message: appendAll() template added Index: containerutils.h =================================================================== RCS file: /cvsroot/kpod/libqtpod/src/containerutils.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** containerutils.h 13 Mar 2006 23:41:47 -0000 1.2 --- containerutils.h 19 Mar 2006 23:40:43 -0000 1.3 *************** *** 53,56 **** --- 53,65 ---- } + template <class ContainerT, class Iter> + ContainerT& appendAll( ContainerT& container, Iter begin, Iter end ) { + Iter elemIter = begin; + for ( ; elemIter != end; ++elemIter ) { + container.append( *elemIter ); + } + return container; + } + /** * An Iterator over all Elements where the given predicate returned TRUE |