00001 #ifndef ROLLER_CLASS
00002 #define ROLLER_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <basis/definitions.h>
00019
00021
00032 template <class contents>
00033 class roller
00034 {
00035 public:
00036 roller(contents start_of_range, contents end_of_range);
00038
00044 ~roller();
00045
00046
00047 contents minimum() { return _start_of_range; }
00049 contents maximum() { return _end_of_range; }
00051
00052 contents next_id();
00054
00055 contents current() const;
00057
00062 void set_current(contents new_current);
00064
00066 private:
00067 contents _current_id;
00068 contents _start_of_range;
00069 contents _end_of_range;
00070 };
00071
00073
00075
00076 class int_roller : public roller<int>
00077 {
00078 public:
00079 int_roller(int start_of_range, int end_of_range)
00080 : roller<int>(start_of_range, end_of_range) {}
00081 };
00082
00083 #endif
00084