queso-0.57.1
|
Definition of a shared pointer. More...
#include <SharedPtr.h>
Definition of a shared pointer.
Shared pointers may share ownership of some dynamically allocated object. The object pointed to is guaranteed to be deleted when the last underlying implementation of SharedPtr is destroyed or reset.
If QUESO detects C++11 functionality ot configure-time, then the underlying implementation of SharedPtr is that of std::shared_ptr.
If QUESO does not detect C++11 functionality, boost is required. In that case, the underlying implementation is that of boost::shared_ptr.
If QUESO does not detect C++11 functionality and does not detect boost then QUESO will fail to configure.
SharedPtr is implemented as a template typdef pattern. That is, one declares a SharedPtr like so:
QUESO::SharedPtr< name_of_type >::Type name_of_variable;