coco::wnc_hook_base Class Reference
[Advanced Utilities]

Base class for the work node computation hooks. More...

#include <comp_hook.h>

Inheritance diagram for coco::wnc_hook_base:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 wnc_hook_base ()
 wnc_hook_base (const std::string &name)
 wnc_hook_base (const char *name)
 wnc_hook_base (const wnc_hook_base &w)
virtual ~wnc_hook_base ()
virtual wnc_hook_basenew_copy () const =0
virtual void operator() (const work_node &wn, dbt_row &dbr, std::list< delta > *add_ds, std::list< certificate > *add_cs) const =0
virtual bool init_columns (vdbl::standard_table &stable)
virtual bool drop_columns (vdbl::standard_table &stable)
const std::string & name () const

Protected Member Functions

template<class _CI >
bool _init_column (vdbl::standard_table &stable, const std::string &colname, const _CI &c)
template<class _CI >
bool _init_column (vdbl::standard_table &stable, const char *colname, const _CI &c)
bool _drop_columns (vdbl::standard_table &stable)
search_node_relation parent_relation (const work_node &wn) const
search_node_id node_id (const work_node &wn) const


Detailed Description

Base class for the work node computation hooks, which is wrapped by the work_node_comp_hook class since copy constructors cannot directly be overloaded.

Definition at line 111 of file comp_hook.h.


Constructor & Destructor Documentation

coco::wnc_hook_base::wnc_hook_base (  )  [inline]

Standard Constructor

Definition at line 153 of file comp_hook.h.

coco::wnc_hook_base::wnc_hook_base ( const std::string &  name  )  [inline]

Constructor setting the identifier string of this hook to name

Definition at line 155 of file comp_hook.h.

coco::wnc_hook_base::wnc_hook_base ( const char *  name  )  [inline]

Constructor setting the identifier string of this hook to name

Definition at line 157 of file comp_hook.h.

coco::wnc_hook_base::wnc_hook_base ( const wnc_hook_base w  )  [inline]

Standard Copy Constructor, which is usually not used.

Definition at line 159 of file comp_hook.h.

virtual coco::wnc_hook_base::~wnc_hook_base (  )  [inline, virtual]

Standard Destructor

Definition at line 163 of file comp_hook.h.


Member Function Documentation

bool coco::wnc_hook_base::_drop_columns ( vdbl::standard_table &  stable  )  [protected]

Remove all columns, whose identifiers are stored in __managed_cols from table stable.

Definition at line 34 of file comp_hook.cc.

template<class _CI >
bool coco::wnc_hook_base::_init_column ( vdbl::standard_table &  stable,
const char *  colname,
const _CI &  c 
) [inline, protected]

Add a column of type _CI with name colname to the table stable. The column is stored in __managed_cols.

Definition at line 135 of file comp_hook.h.

template<class _CI >
bool coco::wnc_hook_base::_init_column ( vdbl::standard_table &  stable,
const std::string &  colname,
const _CI &  c 
) [inline, protected]

Add a column of type _CI with name colname to the table stable. The column is stored in __managed_cols.

Definition at line 238 of file comp_hook.h.

virtual bool coco::wnc_hook_base::drop_columns ( vdbl::standard_table &  stable  )  [inline, virtual]

Remove all columns, whose identifiers are stored in __managed_cols from table stable. If columns are used, a call to _drop_columns is needed in an overloaded version of this method.

Reimplemented in coco::diameter_comp_hook, coco::inference_engine_comp_hook, coco::logvol_comp_hook, coco::objbounds_comp_hook, coco::pending_status_comp_hook, and coco::pfstar_hook.

Definition at line 187 of file comp_hook.h.

virtual bool coco::wnc_hook_base::init_columns ( vdbl::standard_table &  stable  )  [inline, virtual]

Upon registering this hook, initialize the column(s) in the ``search info'' table in which the result(s) of this hook are stored. It must be overloaded if columns are needed. In that case, the _init_column method should be used.

Reimplemented in coco::diameter_comp_hook, coco::inference_engine_comp_hook, coco::logvol_comp_hook, coco::objbounds_comp_hook, coco::pending_status_comp_hook, and coco::pfstar_hook.

Definition at line 182 of file comp_hook.h.

const std::string& coco::wnc_hook_base::name (  )  const [inline]

Return the identifier string of this work node computation hook.

Definition at line 190 of file comp_hook.h.

virtual wnc_hook_base* coco::wnc_hook_base::new_copy (  )  const [pure virtual]

search_node_id coco::wnc_hook_base::node_id ( const work_node wn  )  const [protected]

This method is an accessor to the search_node_id of work_node wn.

Definition at line 43 of file comp_hook.cc.

virtual void coco::wnc_hook_base::operator() ( const work_node wn,
dbt_row dbr,
std::list< delta > *  add_ds,
std::list< certificate > *  add_cs 
) const [pure virtual]

The evaluation operator of this computation hook. It stores the result of the hook applied to work_node wn in dbt_row dbr, which in return is stored in the ``search info'' table of the search database. The hook can compute additional deltas and add them to add_ds, which are applied to the work node during the split. It must be overloaded.

Implemented in coco::diameter_comp_hook, coco::inference_engine_comp_hook, coco::logvol_comp_hook, coco::objbounds_comp_hook, coco::pending_status_comp_hook, and coco::pfstar_hook.

search_node_relation coco::wnc_hook_base::parent_relation ( const work_node wn  )  const [protected]

This method is an accessor to the search_node_relation of work_node wn.

Definition at line 46 of file comp_hook.cc.


The documentation for this class was generated from the following files:

Generated on Tue Feb 9 14:47:59 2010 for COCONUT API by  doxygen 1.5.8