#include <annotation_delta.h>
Public Member Functions | |
annotation_delta (const std::string &_act) | |
annotation_delta (const std::string &_act, const std::vector< annotation > &__a, const std::vector< annotation > &__r) | |
annotation_delta (const std::string &_act, const annotation &_ad) | |
annotation_delta (const std::string &_act, bool _dummy, const annotation &_rm) | |
annotation_delta (const annotation_delta &__d) | |
annotation_delta (const char *_act, const std::vector< annotation > &__a, const std::vector< annotation > &__r) | |
annotation_delta (const char *_act, const annotation &_ad) | |
annotation_delta (const char *_act, bool _dummy, const annotation &_rm) | |
virtual annotation_delta * | new_copy () const |
virtual void | destroy_copy (delta_base *__d) const |
virtual 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 annotation_delta &_c) const |
bool | operator!= (const annotation_delta &_c) const |
delta | make_delta (const std::string &a) |
const std::string & | get_action () const |
virtual void | convert (work_node &_x, delta_base *&_d) |
virtual void | unkeep () |
virtual bool | apply3 (work_node &_x, const work_node &_y, undelta_base *&_u, const delta_id &_d) const |
Public Attributes | |
std::vector< annotation > | add |
std::vector< annotation > | rm |
Protected Attributes | |
std::string | _action |
Definition at line 95 of file annotation_delta.h.
coco::annotation_delta::annotation_delta | ( | const std::string & | _act | ) | [inline] |
standard constructor: _act
describes the action specifier of the delta
Definition at line 107 of file annotation_delta.h.
coco::annotation_delta::annotation_delta | ( | const std::string & | _act, | |
const std::vector< annotation > & | __a, | |||
const std::vector< annotation > & | __r | |||
) | [inline] |
constructor: _act
describes the action specifier of the delta, the annotations __a
are added, the annotations __r
removed.
Definition at line 112 of file annotation_delta.h.
coco::annotation_delta::annotation_delta | ( | const std::string & | _act, | |
const annotation & | _ad | |||
) | [inline] |
constructor: _act
describes the action specifier of the delta, the annotation _ad
is added, nothing is removed.
Definition at line 120 of file annotation_delta.h.
coco::annotation_delta::annotation_delta | ( | const std::string & | _act, | |
bool | _dummy, | |||
const annotation & | _rm | |||
) | [inline] |
constructor: _act
describes the action specifier of the delta, the annotation _rm
is removed, nothing is added. The parameter _dummy
is ignored.
Definition at line 127 of file annotation_delta.h.
coco::annotation_delta::annotation_delta | ( | const annotation_delta & | __d | ) | [inline] |
standard copy constructor
Definition at line 131 of file annotation_delta.h.
coco::annotation_delta::annotation_delta | ( | const char * | _act, | |
const std::vector< annotation > & | __a, | |||
const std::vector< annotation > & | __r | |||
) | [inline] |
constructor: _act
describes the action specifier of the delta, the annotations __a
are added, the annotations __r
removed.
Definition at line 142 of file annotation_delta.h.
coco::annotation_delta::annotation_delta | ( | const char * | _act, | |
const annotation & | _ad | |||
) | [inline] |
constructor: _act
describes the action specifier of the delta, the annotation _ad
is added, nothing is removed.
Definition at line 150 of file annotation_delta.h.
coco::annotation_delta::annotation_delta | ( | const char * | _act, | |
bool | _dummy, | |||
const annotation & | _rm | |||
) | [inline] |
constructor: _act
describes the action specifier of the delta, the annotation _rm
is removed, nothing is added. The parameter _dummy
is ignored.
Definition at line 157 of file annotation_delta.h.
bool coco::annotation_delta::apply | ( | work_node & | _x, | |
undelta_base *& | _u, | |||
const delta_id & | _did | |||
) | const [virtual] |
apply operation: apply the delta with identity _did
to work_node _x
and construct in _u
the undelta information.
Reimplemented from coco::delta_base.
Definition at line 35 of file annotation_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.
virtual void coco::delta_base::convert | ( | work_node & | _x, | |
delta_base *& | _d | |||
) | [inline, virtual, inherited] |
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.
Reimplemented in coco::table_delta.
Definition at line 189 of file api_deltabase.h.
virtual void coco::annotation_delta::destroy_copy | ( | delta_base * | __d | ) | const [inline, virtual] |
clone destructor
Definition at line 164 of file annotation_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.
virtual annotation_delta* coco::annotation_delta::new_copy | ( | ) | const [inline, virtual] |
clone operation
Reimplemented from coco::delta_base.
Definition at line 161 of file annotation_delta.h.
bool coco::annotation_delta::operator!= | ( | const annotation_delta & | _c | ) | const [inline] |
Definition at line 183 of file annotation_delta.h.
bool coco::annotation_delta::operator!= | ( | const delta_base & | _c | ) | const [inline] |
Definition at line 176 of file annotation_delta.h.
bool coco::annotation_delta::operator== | ( | const annotation_delta & | _c | ) | const [inline] |
Comparison operators
Definition at line 181 of file annotation_delta.h.
bool coco::annotation_delta::operator== | ( | const delta_base & | _c | ) | const [inline] |
Comparison operators
Definition at line 173 of file annotation_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.
std::string coco::delta_base::_action [protected, inherited] |
The action (type) of this delta
Definition at line 154 of file api_deltabase.h.
std::vector<annotation> coco::annotation_delta::add |
the annotations to be added to the work_node
Definition at line 99 of file annotation_delta.h.
std::vector<annotation> coco::annotation_delta::rm |
the annotations to be removed from the work_node
Definition at line 101 of file annotation_delta.h.