coco::boxes_delta Class Reference
[Deltas]

A delta class which adds new boxes to the search database. More...

#include <boxes_delta.h>

Inheritance diagram for coco::boxes_delta:

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

Collaboration graph
[legend]

List of all members.

Public Types

typedef std::pair< std::string,
dbt_row
t_line
typedef std::vector< t_linet_ctr

Public Member Functions

 boxes_delta (bool _add=true)
 boxes_delta (const dbt_row &_b, bool _add=true)
 boxes_delta (const std::vector< dbt_row > &_b, bool _add=true)
 boxes_delta (const boxes_delta &__d)
boxes_deltanew_copy () const
void destroy_copy (delta_base *__d) const
void create_table (work_node &_x, vdbl::standard_table *&ptb, const std::string &__t) const
bool apply (work_node &_x, undelta_base *&_u, const delta_id &_did) const
bool operator== (const delta_base &_c) const
bool operator!= (const delta_base &_c) const
bool operator== (const boxes_delta &_c) const
bool operator!= (const boxes_delta &_c) const
void add (const t_line &_tl)
void add (const std::string &_tn, const dbt_row &_r)
void add (const std::vector< t_line > &_tlv)
void rm (const annotation &_tr)
void rm (const std::vector< annotation > &_trv)
void convert (work_node &_x, delta_base *&_u)
bool operator== (const table_delta &_c) const
bool operator!= (const table_delta &_c) const
delta make_delta (const std::string &a)
const std::string & get_action () const
virtual void unkeep ()
virtual bool apply3 (work_node &_x, const work_node &_y, undelta_base *&_u, const delta_id &_d) const

Protected Attributes

std::string _action


Detailed Description

A specialized delta class which adds new boxes, e.g. exclusion boxes, to the search database. It is a subclass of table_delta and is, after storing the information in the search database, converted to an annotation_delta. Therefore, no boxes_undelta class is needed.

Definition at line 44 of file boxes_delta.h.


Member Typedef Documentation

typedef std::vector<t_line> coco::table_delta::t_ctr [inherited]

A variable of this type holds the new table entries.

Definition at line 49 of file table_delta.h.

typedef std::pair<std::string,dbt_row> coco::table_delta::t_line [inherited]

This type specifies one row in one table.

Definition at line 47 of file table_delta.h.


Constructor & Destructor Documentation

coco::boxes_delta::boxes_delta ( bool  _add = true  )  [inline]

Standard Constructor: if _add is false, the box is interpreted as an exclusion box. Otherwise it is stored in the table of boxes.

Definition at line 53 of file boxes_delta.h.

coco::boxes_delta::boxes_delta ( const dbt_row _b,
bool  _add = true 
) [inline]

Constructor: the box is described, including all additional information as dbt_row in the database format, if _add is false, the box is interpreted as an exclusion box. It is stored in the table box of boxes. The columns are
NameTypeR/O
x vector<interval>requiredthe box
exclusion box bool optionaldefault: false
contains optimumbool optionaldefault: false
eval region bool optionaldefault: false

Definition at line 67 of file boxes_delta.h.

coco::boxes_delta::boxes_delta ( const std::vector< dbt_row > &  _b,
bool  _add = true 
) [inline]

Constructor: the boxes are described, including all additional information as dbt_row in the database format. The parameter _b is a vector of boxes to be added. If _add is false, the boxes are interpreted as an exclusion boxes. They are stored in the table box of boxes. The columns are
NameTypeR/ODescriptionDefault
x vector<interval>requiredthe box
exclusion box bool optionalan exclusion box?false
contains optimumbool optionalcontains the optimum?false
eval region bool optionalan eval region?false

Definition at line 84 of file boxes_delta.h.

coco::boxes_delta::boxes_delta ( const boxes_delta __d  )  [inline]

Standard Copy Constructor

Definition at line 89 of file boxes_delta.h.


Member Function Documentation

void coco::table_delta::add ( const std::vector< t_line > &  _tlv  )  [inline, inherited]

This method adds a list of table rows.

Definition at line 100 of file table_delta.h.

void coco::table_delta::add ( const std::string &  _tn,
const dbt_row _r 
) [inline, inherited]

This method adds one row _r to the table _tn.

Definition at line 97 of file table_delta.h.

void coco::table_delta::add ( const t_line _tl  )  [inline, inherited]

This method adds one table row.

Definition at line 95 of file table_delta.h.

bool coco::boxes_delta::apply ( work_node _x,
undelta_base *&  _u,
const delta_id _did 
) const [virtual]

Apply the delta with delta_id _d to work node _x. This will never be used, because the boxes_delta is converted to annotation_delta before the apply is performed.

Reimplemented from coco::table_delta.

Definition at line 35 of file boxes_delta.cc.

bool coco::delta_base::apply3 ( work_node _x,
const work_node _y,
undelta_base *&  _u,
const delta_id _d 
) const [inline, virtual, inherited]

Apply the delta with delta_id _d to work node _x, constructing in the process work_node _y, without changing _x. In this process the undo information for this delta is stored in _u. This method should be overloaded in the specializations of this class for maximal efficiency, but it need not since a standard procedure is available, which uses the work_node copy constructur and the apply method.

Definition at line 88 of file api_delta.h.

void coco::table_delta::convert ( work_node _x,
delta_base *&  _u 
) [virtual, inherited]

This method converts the table delta to an annotation_delta after the information is stored in the search database. The conversion is based on work_node _x, and the generated annotation_delta is returned via _u.

Reimplemented from coco::delta_base.

Definition at line 42 of file table_delta.cc.

void coco::boxes_delta::create_table ( work_node _x,
vdbl::standard_table *&  ptb,
const std::string &  __t 
) const [virtual]

This method creates the box table in the search database for the work_node _x. A pointer ptb to the created table is set. The parameter __t for the table name is ignored.

Reimplemented from coco::table_delta.

Definition at line 43 of file boxes_delta.cc.

void coco::boxes_delta::destroy_copy ( delta_base __d  )  const [inline, virtual]

Clone Destructor

Reimplemented from coco::table_delta.

Definition at line 95 of file boxes_delta.h.

const std::string& coco::delta_base::get_action (  )  const [inline, inherited]

Retrieve the action information (the delta type) for this delta.

Definition at line 184 of file api_deltabase.h.

delta coco::delta_base::make_delta ( const std::string &  a  )  [inline, inherited]

Construct a delta from this delta_base with the action a.

Definition at line 175 of file api_deltabase.h.

boxes_delta* coco::boxes_delta::new_copy (  )  const [inline, virtual]

Clone Operation

Reimplemented from coco::table_delta.

Definition at line 92 of file boxes_delta.h.

bool coco::table_delta::operator!= ( const table_delta _c  )  const [inline, inherited]

Definition at line 143 of file table_delta.h.

bool coco::boxes_delta::operator!= ( const boxes_delta _c  )  const [inline]

Definition at line 119 of file boxes_delta.h.

bool coco::boxes_delta::operator!= ( const delta_base _c  )  const [inline]

Reimplemented from coco::table_delta.

Definition at line 112 of file boxes_delta.h.

bool coco::table_delta::operator== ( const table_delta _c  )  const [inline, inherited]

Comparison operators

Definition at line 142 of file table_delta.h.

bool coco::boxes_delta::operator== ( const boxes_delta _c  )  const [inline]

Comparison operators

Definition at line 117 of file boxes_delta.h.

bool coco::boxes_delta::operator== ( const delta_base _c  )  const [inline]

Comparison operators

Reimplemented from coco::table_delta.

Definition at line 109 of file boxes_delta.h.

void coco::table_delta::rm ( const std::vector< annotation > &  _trv  )  [inline, inherited]

This method adds the annotations in _trv to the list of removed annotations.

Definition at line 107 of file table_delta.h.

void coco::table_delta::rm ( const annotation _tr  )  [inline, inherited]

This method adds the annotation _tr to the list of removed annotations.

Definition at line 104 of file table_delta.h.

virtual void coco::delta_base::unkeep (  )  [inline, virtual, inherited]

Perform this operation when the delta is released (unkept) from a work_node.

Reimplemented in coco::dag_delta.

Definition at line 194 of file api_deltabase.h.


Member Data Documentation

std::string coco::delta_base::_action [protected, inherited]

The action (type) of this delta

Definition at line 154 of file api_deltabase.h.


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

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