bdm::object_ptr< T > Class Template Reference
A wrapper of shared_ptr which is never empty. More...
#include <shared_ptr.h>
Inheritance diagram for bdm::object_ptr< T >:
Public Member Functions | |
object_ptr () | |
Default constructor. | |
object_ptr (const shared_ptr< T > &b) | |
Upcast from shared_ptr<T> to object_ptr<T>. | |
object_ptr (T *p) | |
object_ptr< T > & | operator= (const object_ptr< T > &other) |
Assignment operator. |
Detailed Description
template<typename T>
class bdm::object_ptr< T >
A wrapper of shared_ptr which is never empty.
T must have a default constructor.
Note that shared_ptr's destructor isn't virtual - don't call delete on pointers to instances of this class.
Constructor & Destructor Documentation
template<typename T>
bdm::object_ptr< T >::object_ptr | ( | ) | [inline] |
Default constructor.
Calls T's default constructor.
template<typename T>
bdm::object_ptr< T >::object_ptr | ( | const shared_ptr< T > & | b | ) | [inline] |
Upcast from shared_ptr<T> to object_ptr<T>.
- Parameters:
-
b The shared pointer, which must not be empty.
template<typename T>
bdm::object_ptr< T >::object_ptr | ( | T * | p | ) | [inline] |
Constructs an object_ptr that owns the pointer p. p must have been alllocated by new!
The documentation for this class was generated from the following file:
Generated on 2 Dec 2013 for mixpp by 1.4.7