00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef SIENA_FWDTABLE_H
00030 #define SIENA_FWDTABLE_H
00031
00032 #include <cstddef>
00033 #include <new>
00034
00035 #include <siena/exceptions.h>
00036 #include <siena/forwarding.h>
00037 #include <siena/allocator.h>
00038 #include <siena/stst.h>
00039
00040 namespace siena {
00041
00042 class Interface;
00043 class Selectivity;
00044 class Attribute;
00045 class Constraint;
00046 class Filter;
00047 class CProcessor;
00048
00072 class FwdTable : public ForwardingTable {
00073 public:
00074 FwdTable() throw();
00075
00076 virtual ~FwdTable() throw();
00077
00078 virtual void ifconfig(if_t, const predicate &) throw(bad_constraint,
00079 std::bad_alloc);
00080 virtual void consolidate() throw();
00081
00082 virtual void match(const message &, MatchHandler &) const throw();
00083 virtual void match(const message &, MatchMessageHandler &) const throw();
00084
00085 virtual void clear() throw();
00086 virtual void clear_recycle() throw();
00087
00088 virtual size_t allocated_bytesize() const throw();
00089 virtual size_t bytesize() const throw();
00090
00094 void set_preprocess_rounds(unsigned int) throw();
00095
00098 unsigned int get_preprocess_rounds() const throw();
00099
00100 private:
00106 FTAllocator memory;
00107
00115 FTAllocator tmp_memory;
00116
00120 ifid_t if_count;
00121
00124 unsigned int f_count;
00125
00128 unsigned int preprocess_rounds;
00129
00132 STST attributes;
00133
00140 Selectivity * selectivity_first;
00141
00146 Selectivity * selectivity_last;
00147
00158 Selectivity * new_selectivity(const string_t &, ifid_t) throw();
00159
00169 void add_to_selectivity(Selectivity *, ifid_t) throw();
00170
00174 Attribute * get_attribute(const string_t & name) throw();
00175
00179 void connect(Constraint *, Filter *, const string_t &) throw();
00180
00181 struct attr_descr_link {
00182 Attribute * a;
00183 attr_descr_link * next;
00184 };
00185 attr_descr_link * consolidate_list;
00186 };
00187
00188 }
00189
00190 #endif