DynaMix
1.3.7
A new take on polymorphism in C++
|
#include <same_type_mutator.hpp>
Public Member Functions | |
same_type_mutator (const internal::object_type_info *info) | |
void | apply_to (object &o) |
template<typename Mixin > | |
object_mutator & | add () |
bool | add (const char *mixin_type_name) |
void | add (mixin_id id) |
template<typename Mixin > | |
object_mutator & | remove () |
bool | remove (const char *mixin_type_name) |
void | remove (mixin_id id) |
void | cancel () |
void | create () |
const object_type_mutation & | mutation () const |
Protected Member Functions | |
void | apply_to (object &obj) const |
Protected Attributes | |
object_type_mutation | _mutation |
const object_type_info * | _target_type_info |
bool | _is_created |
The same type object mutator mutates objects of the same type. Namely, it adds and removes mixins from objects that initially have the same mixins.
If you want to mutate many objects of the same type, using this class will make it much faster than using the single_object_mutator
multiple times.