PrevUpHomeNext

Class single_object_mutator

boost::mixin::single_object_mutator

Synopsis

// 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();
};

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

single_object_mutator public construct/copy/destruct

  1. single_object_mutator(object * o);
  2. single_object_mutator(object & o);
  3. ~single_object_mutator();

single_object_mutator public member functions

  1. void apply();
    Applies the mutation to the object.

PrevUpHomeNext