MACE  1.0.0
 All Classes Namespaces Files Functions Variables Enumerations Defines
Public Types | Public Member Functions | Protected Attributes
mace::stub::ptr< InterfaceType, InterfaceDelegate > Class Template Reference

Behaves like a smart pointer that can handle any type with the same interface. More...

#include <ptr.hpp>

List of all members.

Public Types

typedef mace::stub::vtable
< InterfaceType,
InterfaceDelegate > 
vtable_type
typedef InterfaceType interface_type
typedef InterfaceDelegate delegate_type

Public Member Functions

 ptr (ptr &&m)
 operator bool () const
bool operator! () const
template<typename T >
 ptr (T *v)
template<typename T >
 ptr (const boost::shared_ptr< T > &v)
template<typename OtherInterface , typename OtherDelegate >
 ptr (const ptr< OtherInterface, OtherDelegate > &p)
 constructs an ptr from another ptr with compatible interface.
const vtable_typeoperator* () const
vtable_typeoperator* ()
const vtable_typeoperator-> () const
vtable_typeoperator-> ()

Protected Attributes

boost::shared_ptr< boost::any > m_ptr
boost::shared_ptr< vtable_typem_vtable

Detailed Description

template<typename InterfaceType, typename InterfaceDelegate = mace::stub::mirror_interface>
class mace::stub::ptr< InterfaceType, InterfaceDelegate >

If constructed from a shared pointer, then a copy of the shared pointer will go with every ptr. If constructed from a regular pointer, then the pointer must be valid for the life of all copies of the ptr.

Definition at line 21 of file ptr.hpp.


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