boost::mixin::object — The main object class.
// In header: <boost/mixin/object.hpp> class object : public boost::mixin::internal::noncopyable { public: // construct/copy/destruct object(); explicit object(const object_type_template &); object(object &&); ~object(); // public member functions template<typename Mixin> bool has() const; template<typename Mixin> Mixin * get(); template<typename Mixin> const Mixin * get() const; template<typename Feature> bool implements(const Feature *) const; void clear(); bool empty() const; void get_message_names(std::vector< const char * > &) const; void get_mixin_names(std::vector< const char * > &) const; const void * internal_get_mixin(mixin_id) const; bool internal_has_mixin(mixin_id) const; void change_type(const internal::object_type_info *, bool); void construct_mixin(mixin_id); void destroy_mixin(mixin_id); bool internal_implements(feature_id, const internal::message_feature_tag &) const; bool implements_message(feature_id) const; // public data members boost_mixin_internal __pad0__; const internal::object_type_info * _type_info; internal::mixin_data_in_object * _mixin_data; };
object
public
construct/copy/destructobject();Constructs an empty object - no mixins.
explicit object(const object_type_template & type_template);Constructs an object from a specific type template.
object(object && o);Move constructor from an existing object.
~object();
object
public member functionstemplate<typename Mixin> bool has() const;Checks if the object has a specific mixin.
template<typename Mixin> Mixin * get();
Gets a specific mixin from the object. Returns nullptr if the mixin isn't available.
template<typename Mixin> const Mixin * get() const;
Gets a specific mixin from the object. Returns nullptr if the mixin isn't available.
template<typename Feature> bool implements(const Feature *) const;Checks if the mixin implements a feature.
void clear();Destroys all mixins within an object and resets its type info.
bool empty() const;Returns true if the object is empty - has no mixins.
void get_message_names(std::vector< const char * > & out_message_names) const;Adds the names of the messages implemented by the object to the vector.
void get_mixin_names(std::vector< const char * > & out_mixin_names) const;Adds the names of the object's mixins to the vector.
const void * internal_get_mixin(mixin_id id) const;
bool internal_has_mixin(mixin_id id) const;
void change_type(const internal::object_type_info * new_type, bool manage_mixins);
void construct_mixin(mixin_id id);
void destroy_mixin(mixin_id id);
bool internal_implements(feature_id id, const internal::message_feature_tag &) const;
bool implements_message(feature_id id) const;