boost::mixin::single_object_mutator
// In header: <boost/mixin/single_object_mutator.hpp> class single_object_mutator : public boost::mixin::internal::object_mutator { public: // construct/copy/destruct single_object_mutator(object *); single_object_mutator(object &); ~single_object_mutator(); // public member functions void apply(); };
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