|
| object_type_mutation () |
| Constructs an empty mutation.
|
|
| object_type_mutation (const mixin_collection *src) |
| Constructs a mutation with a specific source.
|
|
void | set_source (const mixin_collection *src) |
| Sets the source of the mutation.
|
|
template<typename Mixin > |
bool | is_adding () const |
| Checks if the mutation is adding a mixin.
|
|
template<typename Mixin > |
bool | is_removing () const |
| Checks if the mutation is removing a mixin.
|
|
template<typename Mixin > |
bool | source_has () const |
| Checks if the mutation's source has a mixin.
|
|
bool | is_adding (mixin_id id) const |
|
bool | is_removing (mixin_id id) const |
|
bool | source_has (mixin_id id) const |
|
template<typename Feature > |
bool | is_adding (const Feature *f) const |
|
template<typename Feature > |
bool | is_removing (const Feature *f) const |
|
template<typename Feature > |
bool | source_implements (const Feature *f) const |
| Checks if the mutation's source implements a feature.
|
|
template<typename Mixin > |
void | stop_adding () |
| Removes a mixin from the ones being added by the mutation.
|
|
template<typename Mixin > |
void | stop_removing () |
| Removes a mixin from the ones being removed by the mutation.
|
|
void | stop_adding (mixin_id id) |
|
void | stop_removing (mixin_id id) |
|
template<typename Feature > |
void | stop_adding (const Feature *f) |
|
template<typename Feature > |
void | stop_removing (const Feature *f) |
|
template<typename Mixin > |
void | start_adding () |
| Adds a mixin to the ones being added by the mutation.
|
|
template<typename Mixin > |
void | start_removing () |
| Adds a mixin to the ones being removed by the mutation.
|
|
void | start_adding (mixin_id id) |
|
void | start_removing (mixin_id id) |
|
template<typename Feature > |
void | start_removing (const Feature *f) |
|
bool | empty () const |
| Returns true if the mutation is empty - adds no mixins and removes no mixins.
|
|
void | normalize () |
|
void | clear () |
| Clears a mutation. Restores it to its initial state.
|
|
This class represents an object mutation. It is used by mutators and mutation rules.
Internally the class has two mixin_collection
objects - removing
and adding
. They represent the mixins that are supposed to be removed and added by the mutation.
Additionally another mixin collection might be present - the source. It is a pointer that may be null. If it's not, it represents the mixins of the object that currently being mutated by this mutation.