#include <semantics_delta.h>
Public Member Functions | |
uint32_t | encode_convex (uint32_t e, const convex_e &c) const |
uint32_t | encode_activity (uint32_t e, const activity_descr &a) const |
uint32_t | encode_is_at_either_bound (uint32_t e, bool b) const |
uint32_t | encode_integer (uint32_t e, bool b) const |
uint32_t | encode_hard (uint32_t e, bool b) const |
uint32_t | encode_separable (uint32_t e, const tristate &t) const |
uint32_t | encode_type (uint32_t e, const type_annotation &a) const |
uint32_t | encode (const semantics &s) const |
void | decode_convex (uint32_t e, convex_e &c) const |
void | decode_activity (uint32_t e, activity_descr &a) const |
void | decode_is_at_either_bound (uint32_t e, bool &b) const |
void | decode_integer (uint32_t e, bool &b) const |
void | decode_hard (uint32_t e, bool &b) const |
void | decode_separable (uint32_t e, tristate &t) const |
void | decode_type (uint32_t e, type_annotation &a) const |
void | decode (uint32_t e, semantics &s) const |
semantics_delta () | |
semantics_delta (const std::vector< unsigned int > &__i, const std::vector< uint32_t > &__b) | |
semantics_delta (unsigned int __i, uint32_t __b) | |
semantics_delta (const semantics_delta &__d) | |
semantics_delta * | new_copy () const |
void | destroy_copy (delta_base *__d) const |
void | set (const std::vector< unsigned int > &_i, const std::vector< uint32_t > &_s) |
void | set (const std::vector< unsigned int > &_i, const std::vector< semantics > &_s) |
void | set (unsigned int _i, const semantics &_s) |
void | set_convex (const std::vector< unsigned int > &_i, const std::vector< convex_e > &c) |
void | set_convex (unsigned int _i, const convex_e &c) |
void | set_activity (const std::vector< unsigned int > &_i, const std::vector< activity_descr > &a) |
void | set_activity (unsigned int _i, const activity_descr &a) |
void | set_separable (const std::vector< unsigned int > &_i, const std::vector< tristate > &t) |
void | set_separable (unsigned int _i, const tristate &t) |
void | set_is_at_either_bound (const std::vector< unsigned int > &_i, const std::vector< bool > &b) |
void | set_is_at_either_bound (unsigned int _i, bool b) |
void | set_integer (const std::vector< unsigned int > &_i, const std::vector< bool > &b) |
void | set_integer (unsigned int _i, bool b) |
void | set_hard (const std::vector< unsigned int > &_i, const std::vector< bool > &b) |
void | set_hard (unsigned int _i, bool b) |
void | set_type (const std::vector< unsigned int > &_i, const std::vector< type_annotation > &a) |
void | set_type (unsigned int _i, const type_annotation &a) |
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 semantics_delta &_c) const |
bool | operator!= (const semantics_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 |
Protected Attributes | |
std::string | _action |
Friends | |
class | semantics_undelta |
Definition at line 91 of file semantics_delta.h.
coco::semantics_delta::semantics_delta | ( | ) | [inline] |
Standard Constructor
Definition at line 272 of file semantics_delta.h.
coco::semantics_delta::semantics_delta | ( | const std::vector< unsigned int > & | __i, | |
const std::vector< uint32_t > & | __b | |||
) |
Constructor which explicitly assigns the indices __i
and the vector of already encoded semantics structures __b
.
Definition at line 34 of file semantics_delta.cc.
coco::semantics_delta::semantics_delta | ( | unsigned int | __i, | |
uint32_t | __b | |||
) | [inline] |
Constructor which explicitly assigns one index __i
and the corresponding already encoded semantics structure __b
.
Definition at line 280 of file semantics_delta.h.
coco::semantics_delta::semantics_delta | ( | const semantics_delta & | __d | ) | [inline] |
Standard Copy Constructor
Definition at line 285 of file semantics_delta.h.
bool coco::semantics_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
, hereby changing the bounds as requested.
Reimplemented from coco::delta_base.
Definition at line 222 of file semantics_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.
void coco::semantics_delta::decode | ( | uint32_t | e, | |
semantics & | s | |||
) | const [inline] |
This method decodes a whole semantics structure from the encoded structure e
.
Definition at line 259 of file semantics_delta.h.
void coco::semantics_delta::decode_activity | ( | uint32_t | e, | |
activity_descr & | a | |||
) | const [inline] |
This method decodes the activity_descr part from the encoded semantics structure e
.
Definition at line 235 of file semantics_delta.h.
void coco::semantics_delta::decode_convex | ( | uint32_t | e, | |
convex_e & | c | |||
) | const [inline] |
This method decodes the convex_e part from the encoded semantics structure e
.
Definition at line 231 of file semantics_delta.h.
void coco::semantics_delta::decode_hard | ( | uint32_t | e, | |
bool & | b | |||
) | const [inline] |
This method decodes the hard bool from the encoded semantics structure e
.
Definition at line 247 of file semantics_delta.h.
void coco::semantics_delta::decode_integer | ( | uint32_t | e, | |
bool & | b | |||
) | const [inline] |
This method decodes the integer bool from the encoded semantics structure e
.
Definition at line 243 of file semantics_delta.h.
void coco::semantics_delta::decode_is_at_either_bound | ( | uint32_t | e, | |
bool & | b | |||
) | const [inline] |
This method decodes the is_at_either_bound bool from the encoded semantics structure e
.
Definition at line 239 of file semantics_delta.h.
void coco::semantics_delta::decode_separable | ( | uint32_t | e, | |
tristate & | t | |||
) | const [inline] |
This method decodes the separable tristate from the encoded semantics structure e
.
Definition at line 251 of file semantics_delta.h.
void coco::semantics_delta::decode_type | ( | uint32_t | e, | |
type_annotation & | a | |||
) | const [inline] |
This method decodes the type_annotation part from the encoded semantics structure e
.
Definition at line 255 of file semantics_delta.h.
void coco::semantics_delta::destroy_copy | ( | delta_base * | __d | ) | const [inline] |
Clone Destructor
Definition at line 297 of file semantics_delta.h.
uint32_t coco::semantics_delta::encode | ( | const semantics & | s | ) | const [inline] |
This method encodes a whole semantics structure.
Definition at line 217 of file semantics_delta.h.
uint32_t coco::semantics_delta::encode_activity | ( | uint32_t | e, | |
const activity_descr & | a | |||
) | const [inline] |
This method adds to an already existing encoding of a semantics change the encoding of a new activity_descr a
.
Definition at line 194 of file semantics_delta.h.
uint32_t coco::semantics_delta::encode_convex | ( | uint32_t | e, | |
const convex_e & | c | |||
) | const [inline] |
This method adds to an already existing encoding of a semantics change the encoding of a new convex_e c
.
Definition at line 190 of file semantics_delta.h.
uint32_t coco::semantics_delta::encode_hard | ( | uint32_t | e, | |
bool | b | |||
) | const [inline] |
This method adds to an already existing encoding of a semantics change the encoding of the boolean hard
.
Definition at line 206 of file semantics_delta.h.
uint32_t coco::semantics_delta::encode_integer | ( | uint32_t | e, | |
bool | b | |||
) | const [inline] |
This method adds to an already existing encoding of a semantics change the encoding of the boolean integer
.
Definition at line 202 of file semantics_delta.h.
uint32_t coco::semantics_delta::encode_is_at_either_bound | ( | uint32_t | e, | |
bool | b | |||
) | const [inline] |
This method adds to an already existing encoding of a semantics change the encoding of the boolean is_at_either_bound
.
Definition at line 198 of file semantics_delta.h.
uint32_t coco::semantics_delta::encode_separable | ( | uint32_t | e, | |
const tristate & | t | |||
) | const [inline] |
This method adds to an already existing encoding of a semantics change the encoding of the tristate separable
.
Definition at line 210 of file semantics_delta.h.
uint32_t coco::semantics_delta::encode_type | ( | uint32_t | e, | |
const type_annotation & | a | |||
) | const [inline] |
This method adds to an already existing encoding of a semantics change the encoding of the type_annotation.
Definition at line 214 of file semantics_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.
semantics_delta* coco::semantics_delta::new_copy | ( | ) | const [inline, virtual] |
Clone Operation
Reimplemented from coco::delta_base.
Definition at line 295 of file semantics_delta.h.
bool coco::semantics_delta::operator!= | ( | const semantics_delta & | _c | ) | const [inline] |
Definition at line 405 of file semantics_delta.h.
bool coco::semantics_delta::operator!= | ( | const delta_base & | _c | ) | const [inline] |
Definition at line 397 of file semantics_delta.h.
bool coco::semantics_delta::operator== | ( | const semantics_delta & | _c | ) | const [inline] |
Comparison operators
Definition at line 402 of file semantics_delta.h.
bool coco::semantics_delta::operator== | ( | const delta_base & | _c | ) | const [inline] |
Comparison operators
Definition at line 394 of file semantics_delta.h.
void coco::semantics_delta::set | ( | unsigned int | _i, | |
const semantics & | _s | |||
) |
This set method sets the semantics structure for the nodes with node number _i
to the semantics information stored in _s
.
Definition at line 126 of file semantics_delta.cc.
void coco::semantics_delta::set | ( | const std::vector< unsigned int > & | _i, | |
const std::vector< semantics > & | _s | |||
) |
This set method sets the semantics structure for all nodes whose node numbers are in _i
to the semantics information stored in the corresponding entry of vector _s
.
Definition at line 47 of file semantics_delta.cc.
void coco::semantics_delta::set | ( | const std::vector< unsigned int > & | _i, | |
const std::vector< uint32_t > & | _s | |||
) |
This method sets the vector of indices to _i
and the vector of encoded semantics to _s
.
Definition at line 57 of file semantics_delta.cc.
void coco::semantics_delta::set_activity | ( | unsigned int | _i, | |
const activity_descr & | a | |||
) |
This set_activity method sets the activity_descr part of the semantics structure for the node with node number _i
to the activity_descr information stored in a
. All other semantics information remains unchanged.
Definition at line 152 of file semantics_delta.cc.
void coco::semantics_delta::set_activity | ( | const std::vector< unsigned int > & | _i, | |
const std::vector< activity_descr > & | a | |||
) |
This set_activity method sets the activity_descr part of the semantics structure for all nodes whose node numbers are in _i
to the activity_descr information stored in the corresponding entry of vector a
. All other semantics information remains unchanged.
Definition at line 76 of file semantics_delta.cc.
void coco::semantics_delta::set_convex | ( | unsigned int | _i, | |
const convex_e & | c | |||
) |
void coco::semantics_delta::set_convex | ( | const std::vector< unsigned int > & | _i, | |
const std::vector< convex_e > & | c | |||
) |
void coco::semantics_delta::set_hard | ( | unsigned int | _i, | |
bool | b | |||
) |
This set_hard method sets the hard entry of the semantics structure for the node with node number _i
to the bool information stored in b
. All other semantics information remains unchanged.
Definition at line 194 of file semantics_delta.cc.
void coco::semantics_delta::set_hard | ( | const std::vector< unsigned int > & | _i, | |
const std::vector< bool > & | b | |||
) |
This set_hard method sets the hard entry of the semantics structure for all nodes whose node numbers are in _i
to the bool information stored in the corresponding entry of vector b
. All other semantics information remains unchanged.
Definition at line 106 of file semantics_delta.cc.
void coco::semantics_delta::set_integer | ( | unsigned int | _i, | |
bool | b | |||
) |
This set_integer method sets the integer entry of the semantics structure for the node with node number _i
to the bool information stored in b
. All other semantics information remains unchanged.
Definition at line 180 of file semantics_delta.cc.
void coco::semantics_delta::set_integer | ( | const std::vector< unsigned int > & | _i, | |
const std::vector< bool > & | b | |||
) |
This set_integer method sets the integer entry of the semantics structure for all nodes whose node numbers are in _i
to the bool information stored in the corresponding entry of vector b
. All other semantics information remains unchanged.
Definition at line 96 of file semantics_delta.cc.
void coco::semantics_delta::set_is_at_either_bound | ( | unsigned int | _i, | |
bool | b | |||
) |
void coco::semantics_delta::set_is_at_either_bound | ( | const std::vector< unsigned int > & | _i, | |
const std::vector< bool > & | b | |||
) |
void coco::semantics_delta::set_separable | ( | unsigned int | _i, | |
const tristate & | t | |||
) |
This set_separable method sets the separable entry of the semantics structure for the node with node number _i
to the tristate information stored in t
. All other semantics information remains unchanged.
Definition at line 166 of file semantics_delta.cc.
void coco::semantics_delta::set_separable | ( | const std::vector< unsigned int > & | _i, | |
const std::vector< tristate > & | t | |||
) |
This set_separable method sets the separable entry of the semantics structure for all nodes whose node numbers are in _i
to the tristate information stored in the corresponding entry of vector t
. All other semantics information remains unchanged.
Definition at line 86 of file semantics_delta.cc.
void coco::semantics_delta::set_type | ( | unsigned int | _i, | |
const type_annotation & | a | |||
) |
This set_type method sets the type_annotation part of the semantics structure for the node with node number _i
to the type_annotation information stored in a
. All other semantics information remains unchanged.
Definition at line 208 of file semantics_delta.cc.
void coco::semantics_delta::set_type | ( | const std::vector< unsigned int > & | _i, | |
const std::vector< type_annotation > & | a | |||
) |
This set_type method sets the type_annotation part of the semantics structure for all nodes whose node numbers are in _i
to the type_annotation information stored in the corresponding entry of vector a
. All other semantics information remains unchanged.
Definition at line 116 of file semantics_delta.cc.
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.
friend class semantics_undelta [friend] |
Definition at line 409 of file semantics_delta.h.
std::string coco::delta_base::_action [protected, inherited] |
The action (type) of this delta
Definition at line 154 of file api_deltabase.h.