- Fix documentation a little

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@359 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-02-20 12:56:28 +00:00
parent 5121ab9f39
commit c4c4ef378f
1 changed files with 21 additions and 2 deletions

View File

@ -22,6 +22,10 @@
namespace memory { namespace memory {
/** \brief A simple reference counted smart pointer /** \brief A simple reference counted smart pointer
*
* \author Matteo Settenvini
* \version 1.0
* \date October 2005
* *
* This template is a smart pointer which uses * This template is a smart pointer which uses
* a simple mechanism of reference count to * a simple mechanism of reference count to
@ -48,13 +52,28 @@ namespace memory {
* */ * */
static const smart_ptr<T, isArray> null; static const smart_ptr<T, isArray> null;
/** Call this constructor only the first time. Whenever /** \brief Constructor, defaults to null pointer.
*
* Call this constructor only the first time. Whenever
* you'll need to keep other references to the same pointer, * you'll need to keep other references to the same pointer,
* use the cctor, or we won't be able to keep updated the * use the cctor, or we won't be able to keep updated the
* reference count. This class requires some effort from * reference count. This class requires some effort from
* the user to abid to some rules. It's meant to be * the user to abid to some rules. It's meant to be
* an help, not a painkiller. */ * an help, not a painkiller.
*
* A good usage of this ctor is:
* \code
* class C;
* smart_ptr<C> c_ptr(new C());
* \endcode
* So you don't keep a potentially dangerous reference
* around. */
smart_ptr(T* ptr = 0) throw(std::bad_alloc); smart_ptr(T* ptr = 0) throw(std::bad_alloc);
/** \brief Copy constructor.
*
* Always use this to obtain another reference
* to a stored pointer. */
smart_ptr(const smart_ptr& sptr) throw(); smart_ptr(const smart_ptr& sptr) throw();
~smart_ptr() throw(); ~smart_ptr() throw();