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
00034 #include <siena/exceptions.h>
00035 #include <siena/forwarding.h>
00036 #include <siena/allocator.h>
00037 #include <siena/stst.h>
00038
00039 namespace siena {
00040
00041 class Interface;
00042 class Selectivity;
00043 class Attribute;
00044 class Constraint;
00045 class Filter;
00046 class CProcessor;
00047
00071 class FwdTable : public ForwardingTable {
00072 public:
00073 FwdTable() throw();
00074
00075 virtual ~FwdTable() throw();
00076
00077 virtual void ifconfig(if_t, const predicate &) throw(bad_constraint);
00078 virtual void consolidate() throw();
00079
00080 virtual void match(const message &, MatchHandler &) const throw();
00081 virtual void match(const message &, MatchMessageHandler &) const throw();
00082
00083 virtual void clear() throw();
00084 virtual void clear_recycle() throw();
00085
00086 virtual size_t allocated_bytesize() const throw();
00087 virtual size_t bytesize() const throw();
00088
00092 void set_preprocess_rounds(unsigned int) throw();
00093
00096 unsigned int get_preprocess_rounds() const throw();
00097
00098 private:
00104 FTAllocator memory;
00105
00113 FTAllocator tmp_memory;
00114
00118 ifid_t if_count;
00119
00122 unsigned int f_count;
00123
00126 unsigned int preprocess_rounds;
00127
00130 STST attributes;
00131
00138 Selectivity * selectivity_first;
00139
00144 Selectivity * selectivity_last;
00145
00156 Selectivity * new_selectivity(const string_t &, ifid_t) throw();
00157
00167 void add_to_selectivity(Selectivity *, ifid_t) throw();
00168
00172 Attribute * get_attribute(const string_t & name) throw();
00173
00177 void connect(Constraint *, Filter *, const string_t &) throw();
00178
00179 struct attr_descr_link {
00180 Attribute * a;
00181 attr_descr_link * next;
00182 };
00183 attr_descr_link * consolidate_list;
00184 };
00185
00186 }
00187
00188 #endif