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
00028 #ifndef _DBTOOLS_H_
00029 #define _DBTOOLS_H_
00030
00031 #include <dbbasic.h>
00032 #include <db_method>
00033 #include <wnodectx.h>
00034
00035 namespace coco {
00036
00038
00044 class point_check_feasibility : public vdbl::method<bool>
00045 {
00046 public:
00048 typedef work_node_context context;
00049
00050 private:
00052 typedef vdbl::method<bool> _Base;
00054 vdbl::colid x_ci;
00056 vdbl::colid L_ci;
00058 vdbl::colid f_ci;
00060 const vdbl::row* _r;
00062 const work_node_context* wnc;
00063
00064 public:
00066 typedef bool return_type;
00067
00069 point_check_feasibility(vdbl::colid _x, vdbl::colid _TL, vdbl::colid _f)
00070 : _Base(), x_ci(_x), L_ci(_TL), f_ci(_f), _r(), wnc(NULL) {}
00072 point_check_feasibility(const point_check_feasibility& _i)
00073 : _Base(_i), x_ci(_i.x_ci), L_ci(_i.L_ci), f_ci(_i.f_ci), _r(_i._r),
00074 wnc(_i.wnc) {}
00076 virtual ~point_check_feasibility() {}
00077
00079 bool operator() () const;
00081 bool def() const { return operator()(); }
00084 void setcontext(const context* c, const vdbl::row* r)
00085 { _r = r; wnc = (work_node_context *) c; }
00086 };
00087
00089
00095 class box_check_intersection : public vdbl::method<bool>
00096 {
00097 public:
00099 typedef work_node_context context;
00100
00101 private:
00103 typedef vdbl::method<bool> _Base;
00105 vdbl::colid x_ci;
00107 const vdbl::row* _r;
00109 const work_node_context* wnc;
00110
00111 public:
00113 typedef bool return_type;
00114
00116 box_check_intersection(vdbl::colid _x)
00117 : _Base(), x_ci(_x), _r(), wnc(NULL) {}
00119 box_check_intersection(const box_check_intersection& _i)
00120 : _Base(_i), x_ci(_i.x_ci), _r(_i._r), wnc(_i.wnc) {}
00122 virtual ~box_check_intersection() {}
00123
00125 bool operator() () const;
00127 bool def() const { return operator()(); }
00130 void setcontext(const context* c, const vdbl::row* r)
00131 { _r = r; wnc = (work_node_context *) c; }
00132 };
00133
00134 }
00135
00136 #endif // _DBTOOLS_H