00001 #ifndef SPAN_MANAGER_CLASS
00002 #define SPAN_MANAGER_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "data_structure_dll.h"
00019
00020
00021 class bit_vector;
00022
00024
00032 class DATA_STRUCTURE_CLASS_STYLE span_manager
00033 {
00034 public:
00035 span_manager(int number_of_items);
00036
00037
00038 span_manager(const span_manager &to_copy);
00039
00040 ~span_manager();
00041
00042 span_manager &operator =(const span_manager &to_copy);
00043
00044 void reset(int number_of_items);
00046
00047 bool update(const int_array &new_spans);
00049
00052 int received_sequence() const;
00054
00057 int missing_sequence() const;
00059
00061 void make_received_list(int_array &spans, int max_spans = -1) const;
00063
00069 void make_missing_list(int_array &spans, int max_spans = -1) const;
00071
00072 const bit_vector &vector() const;
00074 bit_vector &vector();
00076
00077 istring print_received_list() const;
00079
00080 istring print_missing_list() const;
00082
00083 private:
00084 bit_vector *_implementation;
00085
00086 istring funky_print(const int_array &to_spew, int rec_seq) const;
00088 };
00089
00090 #endif
00091