AFF --- A container for numbers (array) by Friederich and Forbriger.
collector.h
Go to the documentation of this file.
1 
36 // include guard
37 #ifndef AFF_COLLECTOR_H_VERSION
38 
39 #define AFF_COLLECTOR_H_VERSION \
40  "AFF_COLLECTOR_H V1.1"
41 
42 #include<aff/iterator.h>
43 
44 namespace aff {
45 
48  namespace func {
49 
52  namespace util {
53 
70  template<class C, template<class> class F>
71  typename F<C>::Tretval collect(const typename C::Tcoc& c)
72  {
73  F<C> exfun(c);
74  aff::Browser<C> browser(c);
75  while(browser.valid())
76  {
77  exfun(*browser);
78  ++browser;
79  }
80  return(exfun.result());
81  }; // collect
82 
83  } // namespace util
84 
85  } // namespace func
86 
87 } // namespace aff
88 
89 #endif // AFF_COLLECTOR_H_VERSION (includeguard)
90 
91 /* ----- END OF collector.h ----- */
Root namespace of library.
Definition: array.h:148
F< C >::Tretval collect(const typename C::Tcoc &c)
Definition: collector.h:71
Browser.
Definition: iterator.h:139
bool valid() const
delegate to stepper
Definition: iterator.h:163
Define the iterator class template (prototypes)