coco::delta_node Class Reference
[Search Graph]

Class holding the delta nodes in the search graph. More...

#include <search_node.h>

Inheritance diagram for coco::delta_node:

Inheritance graph
[legend]
Collaboration diagram for coco::delta_node:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 delta_node (const search_node_id &_i, const vdbl::userid &_dui, std::vector< delta_id > &__d, gptr< search_node > &_gm, gptr< vdbl::database > &_db, search_node_relation _snr=snr_reduction)
virtual ~delta_node ()
delta_nodeoperator= (const delta_node &__w)
bool is_delta () const
unsigned int n_deltas () const
delta_id get_delta_id (unsigned int i) const
delta get_delta (unsigned int i)
const deltaget_delta (unsigned int i) const
template<class _Iterator >
void add_deltas (_Iterator _f, _Iterator _l)
template<class _SeqContainer >
void get_deltas (_SeqContainer &_c)
vdbl::userid get_dbuserid () const
gptr< search_node > * global_model () const
gptr< vdbl::database > * database () const
search_node_id get_id () const
void set_id (const search_node_id &i)
vdbl::rowid get_rowid () const
void set_rowid (const vdbl::rowid &i)
void keep (const annotation &_an)
void keep (const std::vector< annotation > &_anv)
void unkeep (const annotation &_an)
void unkeep (const std::vector< annotation > &_anv)

Protected Member Functions

search_node_relation parent_relation () const

Protected Attributes

gptr< search_node > * __global_model
gptr< vdbl::database > * __dbase
vdbl::userid _dbuser
search_node_relation _snr
search_node_id _id
std::vector< annotation_keep
vdbl::rowid _rid

Friends

class search_graph


Detailed Description

This is a class of nodes stored in the search graph. It represents a delta node, i.e., a node which only stores the changes with respect to the parent model.
See also:
delta

Definition at line 210 of file search_node.h.


Constructor & Destructor Documentation

coco::delta_node::delta_node ( const search_node_id _i,
const vdbl::userid &  _dui,
std::vector< delta_id > &  __d,
gptr< search_node > &  _gm,
gptr< vdbl::database > &  _db,
search_node_relation  _snr = snr_reduction 
) [inline]

This constructor generates a new delta node (a reduction node by default) with search_node_id i and search_node_relation __snr holding the delta ids stored in __d. The parameters _gm, _db, and _dui initialize the global model, search database, and the database user id, respectively.

Definition at line 227 of file search_node.h.

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

Standard Destructor

Definition at line 235 of file search_node.h.


Member Function Documentation

template<class _Iterator >
void coco::delta_node::add_deltas ( _Iterator  _f,
_Iterator  _l 
) [inline]

This method inserts all deltas in the collection of delta ids, which starts at iterator _f and ends before iterator _l to the list of delta ids in this delta node.

Definition at line 261 of file search_node.h.

gptr<vdbl::database>* coco::search_node::database (  )  const [inline, inherited]

This is the accessor method for the search database.

Definition at line 164 of file search_node.h.

vdbl::userid coco::search_node::get_dbuserid (  )  const [inline, inherited]

This is the accessor method for the database user id.

Definition at line 158 of file search_node.h.

const delta & coco::delta_node::get_delta ( unsigned int  i  )  const [inline]

A call to this method returns a const reference to the ith delta.

Definition at line 408 of file search_node.hpp.

delta coco::delta_node::get_delta ( unsigned int  i  )  [inline]

A call to this method returns a copy of the ith delta.

Definition at line 394 of file search_node.hpp.

delta_id coco::delta_node::get_delta_id ( unsigned int  i  )  const [inline]

A call to this method returns the delta id of the ith delta.

Definition at line 249 of file search_node.h.

template<class _SeqContainer >
void coco::delta_node::get_deltas ( _SeqContainer &  _c  )  [inline]

This method extracts all deltas from the delta node and adds it to the end of the container passed.

Definition at line 267 of file search_node.h.

search_node_id coco::search_node::get_id (  )  const [inline, inherited]

This is the accessor method for the search node id of this node.

Definition at line 167 of file search_node.h.

vdbl::rowid coco::search_node::get_rowid (  )  const [inline, inherited]

This is the accessor method for the row id of this node.

Definition at line 173 of file search_node.h.

gptr<search_node>* coco::search_node::global_model (  )  const [inline, inherited]

This is the accessor method for the global model.

Definition at line 161 of file search_node.h.

bool coco::delta_node::is_delta (  )  const [inline, virtual]

This method is called to determine whether a search node stores only deltas (delta_node) or a full model (full_node). In case of a delta_node it returns true.

Reimplemented from coco::search_node.

Definition at line 243 of file search_node.h.

void coco::search_node::keep ( const std::vector< annotation > &  _anv  )  [inline, inherited]

A call to this method informs the search node to be the keeper of all the annotations in _anv.

Definition at line 184 of file search_node.h.

void coco::search_node::keep ( const annotation _an  )  [inline, inherited]

A call to this method informs the search node to be the keeper of the annotation _an.

Definition at line 180 of file search_node.h.

unsigned int coco::delta_node::n_deltas (  )  const [inline]

This method returns the number of deltas stored in this delta node.

Definition at line 246 of file search_node.h.

delta_node & coco::delta_node::operator= ( const delta_node __w  )  [inline]

Standard Assignment Operator

Definition at line 197 of file search_node.hpp.

search_node_relation coco::search_node::parent_relation (  )  const [inline, protected, inherited]

A call to this method returns the relation of this node to its parent in the search graph.

Definition at line 117 of file search_node.h.

void coco::search_node::set_id ( const search_node_id i  )  [inline, inherited]

This is the set method for the search node id of this node.

Definition at line 170 of file search_node.h.

void coco::search_node::set_rowid ( const vdbl::rowid &  i  )  [inline, inherited]

This is the set method for the row id of this node.

Definition at line 176 of file search_node.h.

void coco::search_node::unkeep ( const std::vector< annotation > &  _anv  )  [inline, inherited]

A call to this method informs the search node to no longer be the keeper of all the annotations in _anv.

Definition at line 93 of file search_node.hpp.

void coco::search_node::unkeep ( const annotation _an  )  [inline, inherited]

A call to this method informs the search node to no longer be the keeper of the annotation _an.

Definition at line 82 of file search_node.hpp.


Friends And Related Function Documentation

friend class search_graph [friend, inherited]

Definition at line 195 of file search_node.h.


Member Data Documentation

gptr<vdbl::database>* coco::search_node::__dbase [protected, inherited]

This is a pointer to a global pointer to the search database associated to this search graph.

Definition at line 96 of file search_node.h.

This is a pointer to a global pointer to the top of the search graph. It is NULL for a standalone node or the top of the graph.

Definition at line 93 of file search_node.h.

vdbl::userid coco::search_node::_dbuser [protected, inherited]

This member stores the database user id under which this search is performed. For the in-memory database this is irrelevant.

Definition at line 99 of file search_node.h.

search_node_id coco::search_node::_id [protected, inherited]

This is the unique identifier of this search node.

Definition at line 104 of file search_node.h.

std::vector<annotation> coco::search_node::_keep [protected, inherited]

The _keep member is a list of all those annotations which are kept by this search node. If the node is destroyed all kept annotations are removed from the search database.

Definition at line 108 of file search_node.h.

vdbl::rowid coco::search_node::_rid [protected, inherited]

This row id specifies the row in the search info table where the hook information for this search_node is stored

Definition at line 112 of file search_node.h.

This member specifies the relation of the search node to its parent(s) in the search graph.

Definition at line 102 of file search_node.h.


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

Generated on Tue Feb 9 14:49:58 2010 for COCONUT API by  doxygen 1.5.8