00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __eoPeriodicContinue_h
00025 #define __eoPeriodicContinue_h
00026
00027 #include <eoContinue.h>
00028 #include <eoPop.h>
00029
00030 template <class EOT> class eoPeriodicContinue: public eoContinue <EOT> {
00031
00032 public:
00033
00035 eoPeriodicContinue (unsigned __period, unsigned __init_counter = 0);
00036
00039 bool operator () (const eoPop <EOT> & pop);
00040
00041 private:
00042
00043 unsigned period;
00044
00045 unsigned counter;
00046
00047 };
00048
00049 template <class EOT>
00050 eoPeriodicContinue <EOT> :: eoPeriodicContinue (unsigned __period, unsigned __init_counter
00051 ) : period (__period),
00052 counter (__init_counter) {
00053
00054 }
00055
00056 template <class EOT>
00057 bool eoPeriodicContinue <EOT> :: operator () (const eoPop <EOT> & __pop) {
00058
00059 return ((++ counter) % period) != 0 ;
00060 }
00061
00062 #endif
00063