Boost Reflect Library 0.1.0
|
Behaves like a smart pointer that can handle any type with the same interface. More...
#include <any_ptr.hpp>
Public Types | |
typedef boost::reflect::vtable < InterfaceType, InterfaceDelegate > | vtable_type |
typedef InterfaceType | interface_type |
typedef InterfaceDelegate | delegate_type |
Public Member Functions | |
any_ptr () | |
operator bool () const | |
bool | operator! () const |
template<typename T > | |
any_ptr (T *v) | |
template<typename T > | |
any_ptr (const boost::shared_ptr< T > &v) | |
template<typename OtherInterface , typename OtherDelegate > | |
any_ptr (const any_ptr< OtherInterface, OtherDelegate > &p) | |
constructs an any_ptr from another any_ptr with compatible interface. | |
const vtable_type & | operator* () const |
vtable_type & | operator* () |
const vtable_type * | operator-> () const |
vtable_type * | operator-> () |
Protected Attributes | |
boost::any | m_ptr |
boost::shared_ptr< vtable_type > | m_vtable |
Behaves like a smart pointer that can handle any type with the same interface.
If constructed from a shared pointer, then a copy of the shared pointer will go with every any_ptr. If constructed from a regular pointer, then the pointer must be valid for the life of all copies of the any_ptr.
Definition at line 20 of file any_ptr.hpp.
typedef boost::reflect::vtable<InterfaceType,InterfaceDelegate> vtable_type |
Definition at line 22 of file any_ptr.hpp.
typedef InterfaceType interface_type |
Definition at line 23 of file any_ptr.hpp.
typedef InterfaceDelegate delegate_type |
Definition at line 24 of file any_ptr.hpp.
any_ptr | ( | ) |
Definition at line 26 of file any_ptr.hpp.
any_ptr | ( | T * | v | ) |
Definition at line 33 of file any_ptr.hpp.
References any_ptr< InterfaceType, InterfaceDelegate >::m_vtable.
any_ptr | ( | const boost::shared_ptr< T > & | v | ) |
Definition at line 38 of file any_ptr.hpp.
References any_ptr< InterfaceType, InterfaceDelegate >::m_vtable.
constructs an any_ptr from another any_ptr with compatible interface.
Definition at line 47 of file any_ptr.hpp.
References any_ptr< InterfaceType, InterfaceDelegate >::m_ptr, and any_ptr< InterfaceType, InterfaceDelegate >::m_vtable.
operator bool | ( | ) | const |
Definition at line 29 of file any_ptr.hpp.
References any_ptr< InterfaceType, InterfaceDelegate >::m_vtable.
bool operator! | ( | ) | const |
Definition at line 30 of file any_ptr.hpp.
References any_ptr< InterfaceType, InterfaceDelegate >::m_vtable.
const vtable_type& operator* | ( | ) | const |
Definition at line 52 of file any_ptr.hpp.
References any_ptr< InterfaceType, InterfaceDelegate >::m_vtable.
vtable_type& operator* | ( | ) |
Definition at line 53 of file any_ptr.hpp.
References any_ptr< InterfaceType, InterfaceDelegate >::m_vtable.
const vtable_type* operator-> | ( | ) | const |
Definition at line 55 of file any_ptr.hpp.
References any_ptr< InterfaceType, InterfaceDelegate >::m_vtable.
vtable_type* operator-> | ( | ) |
Definition at line 56 of file any_ptr.hpp.
References any_ptr< InterfaceType, InterfaceDelegate >::m_vtable.
boost::any m_ptr [protected] |
Definition at line 60 of file any_ptr.hpp.
Referenced by any_ptr< InterfaceType, InterfaceDelegate >::any_ptr().
boost::shared_ptr<vtable_type> m_vtable [protected] |
Definition at line 61 of file any_ptr.hpp.
Referenced by any_ptr< InterfaceType, InterfaceDelegate >::any_ptr(), any_ptr< InterfaceType, InterfaceDelegate >::operator bool(), any_ptr< InterfaceType, InterfaceDelegate >::operator!(), any_ptr< InterfaceType, InterfaceDelegate >::operator*(), and any_ptr< InterfaceType, InterfaceDelegate >::operator->().
© Daniel Larimer 2010-2011 - Licensed under Boost Software License, Version 1.0 | Boost Reflect Library |