DynaMix  1.3.7
A new take on polymorphism in C++
dynamix::single_object_mutator Class Reference

#include <single_object_mutator.hpp>

Public Member Functions

 single_object_mutator (object *o)
 
 single_object_mutator (object &o)
 
void apply ()
 Applies the mutation to the object.
 
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_mutationmutation () 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
 

Detailed Description

The single object mutator mutates objects. Namely it adds and removes mixins from an object While synchronizing the object's type information

The usage is to call add and remove for the desired components and then call single_object_mutator::apply() or simply have it leave the scope, or use the typedef mutate to do the mutation on a single line


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