coco::delta Class Reference

The delta class (updates to work nodes). More...

#include <api_deltabase.h>

Collaboration diagram for coco::delta:

Collaboration graph

List of all members.

Public Member Functions

 delta ()
 delta (const delta_base &__d)
 delta (const delta &__d)
 ~delta ()
const std::string & get_action () const
const delta_baseget_base () const
bool apply (work_node &_x, const delta_id &_d) const
bool apply3 (work_node &_x, const work_node &_y, const delta_id &_d) const
void convert (work_node &_x)
void unkeep ()
delta_id store (work_node &_x, const certificate &_c)
deltaoperator= (const delta &_d)
bool operator== (const delta &_c) const
bool operator!= (const delta &_c) const


class delta_base
class ie_return_type
std::ostream & operator<< (std::ostream &o, const delta &t)
 Output Operator for deltas.

Detailed Description

The delta class is used to store deltas (updates to search_nodes in the search_graph). It is designed as a wrapper class in order to overcome the problem that copy constructors cannot be overloaded. Deltas are stored in the search database table deltas.

Definition at line 64 of file api_deltabase.h.

Constructor & Destructor Documentation

coco::delta::delta (  )  [inline]

Standard Constructor

Definition at line 72 of file api_deltabase.h.

coco::delta::delta ( const delta_base __d  )  [inline]

Constructor, which constructs a delta from a delta_base. The clone operation for the delta_base will be called in that process.

Definition at line 112 of file api_delta.h.

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

Copy Constructor, which constructs a new delta from an existing delta. The clone operation for the delta_base will be called in that process, effectively overloading the copy constructor for the delta_base.

Definition at line 114 of file api_delta.h.

coco::delta::~delta (  )  [inline]

Destructor, which frees the _d using delete

Definition at line 120 of file api_delta.h.

Member Function Documentation

bool coco::delta::apply ( work_node _x,
const delta_id _d 
) const [inline]

Apply the delta with delta_id _d to work node _x

Definition at line 139 of file api_delta.h.

bool coco::delta::apply3 ( work_node _x,
const work_node _y,
const delta_id _d 
) const [inline]

Apply the delta with delta_id _d to work node _x, constructing in the process work_node _y, without changing _x.

Definition at line 159 of file api_delta.h.

void coco::delta::convert ( work_node _x  )  [inline]

Convert this delta to a delta which can be stored in _x, this is e.g. used for all delta version, which are actually stored as annotation changes.

Definition at line 180 of file api_delta.h.

const std::string & coco::delta::get_action (  )  const [inline]

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

Definition at line 136 of file api_delta.h.

const delta_base * coco::delta::get_base (  )  const [inline]

Return the delta_base stored in this wrapper

Definition at line 137 of file api_delta.h.

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

Definition at line 193 of file api_delta.h.

delta & coco::delta::operator= ( const delta _d  )  [inline]

Assignment operator, which uses the clone operation for the delta_base, effectively overloading the assignment operator for the delta_base.

Definition at line 126 of file api_delta.h.

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

Comparison operators

Definition at line 190 of file api_delta.h.

delta_id coco::delta::store ( work_node _x,
const certificate _c 

Store the delta along with certificate _c in work_node _x. This work_node then keeps the delta. The created delta_id of the delta is returned.

Definition at line 36 of file

void coco::delta::unkeep (  )  [inline]

This method is called when the delta is permanently applied and it signals the delta that certain data structures should be kept intact, even if the delta is destroyed.

Definition at line 188 of file api_delta.h.

Friends And Related Function Documentation

friend class delta_base [friend]

Definition at line 127 of file api_deltabase.h.

friend class ie_return_type [friend]

Definition at line 128 of file api_deltabase.h.

std::ostream& operator<< ( std::ostream &  o,
const delta t 
) [friend]

Stream output operator for deltas, which calls the get_action method of the delta.

Definition at line 137 of file api_deltabase.h.

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

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