A c++ sparse block matrix library aimed at Second Order cone problems
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
bogus::NaiveSharedPtr< T > Class Template Reference

Naive reference-counting Shared Pointer. More...

#include <NaiveSharedPtr.hpp>

Public Member Functions

 NaiveSharedPtr (T *instance=(static_cast< T * >(0)))
 NaiveSharedPtr (const NaiveSharedPtr< T > &rhs)
const NaiveSharedPtroperator= (const NaiveSharedPtr< T > &rhs)
void reset (T *instance=(static_cast< T * >(0)))
void release ()
T & operator* ()
T const & operator* () const
T * operator-> ()
T const * operator-> () const
T * get ()
const T * get () const
 operator bool () const

Detailed Description

template<typename T>
class bogus::NaiveSharedPtr< T >

Naive reference-counting Shared Pointer.

There's no reason to use this implementation over any other one from boost, tr1, or c++11, except for c++98 compability. Fortunately it is only used for an edge case ( see EigenSparseLinearSolvers.hpp )

This class is NOT thread-safe. However, multiple NaiveSmartPointers pointing to the same shared instance should be able to be safely reset in parallel.

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