Commit 94d26a81 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

correction

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1788
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 9d7d05d0
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: handle.h,v 1.1 2005-06-30 13:55:12 tforb Exp $
* $Id: handle.h,v 1.2 2005-06-30 13:59:34 tforb Exp $
* \author Thomas Forbriger
* \date 30/06/2005
*
......@@ -23,11 +23,11 @@
#define TF_HANDLE_H_VERSION \
"TF_HANDLE_H V1.0 "
#define TF_HANDLE_H_CVSID \
"$Id: handle.h,v 1.1 2005-06-30 13:55:12 tforb Exp $"
"$Id: handle.h,v 1.2 2005-06-30 13:59:34 tforb Exp $"
namespace tf {
namespace tfxx {
/** template #tf::THandle<class TObj>#:
/** template #tfxx::THandle<class TObj>#:
*
* THandle is a class template published by B. Stroustrup in Chapter 25.7 of
* "The C++ programming Language" (3rd edition). This is a slightly modified
......@@ -53,7 +53,7 @@ namespace tf {
*
* @author Bjarne Stroustrup,
* @author Thomas Forbriger
* @version V1.0 (#$Revision: 1.1 $ $Date: 2005-06-30 13:55:12 $#)
* @version V1.0 (#$Revision: 1.2 $ $Date: 2005-06-30 13:59:34 $#)
* @memo template providing a handle to an object of any type
*/
template<class X>
......@@ -63,7 +63,7 @@ class Handle {
typedef X* Tpointer;
typedef X& Treference;
/** constructor #tf::THandle<class X>::THandle#:
/** constructor #tfxx::THandle<class X>::THandle#:
*
* This constructor is used in the following way:
*
......@@ -73,7 +73,7 @@ class Handle {
*/
Handle(X* p): Mrep(p), Mpcount(new int(1)) { }
/** constructor #tf::THandle<class X>::THandle#:
/** constructor #tfxx::THandle<class X>::THandle#:
*
* This constructor is used in the following way together with another
* #handle2# of type #THandle<X>#:
......@@ -85,24 +85,24 @@ class Handle {
Handle(const THandle& h): Mrep(h.Mrep), Mpcount(h.Mpcount)
{ (*pcount)++; }
/** desctructor #tf::THandle<class X>::~THandle#
/** desctructor #tfxx::THandle<class X>::~THandle#
* @memo book-keeping destructor
*/
~Handle() { if (--(*Mpcount)==0) { delete Mrep; delete Mpcount; } }
/** operator #tf::THandle<class X>::operator->()#
/** operator #tfxx::THandle<class X>::operator->()#
* @return returns pointer to object of type #class X#
* @memo dereferencing operator
*/
Tpointer operator->() const { return Mrep; }
/** operator #tf::THandle<class X>::operator*()#
/** operator #tfxx::THandle<class X>::operator*()#
* @return returns reference to object of type #class X#
* @memo dereferencing operator
*/
Treference operator*() const { return *Mrep; }
/** operator #tf::THandle<class X>::operator=()#
/** operator #tfxx::THandle<class X>::operator=()#
* @memo book-keeping asignment operator
*/
Handle& operator=(const Handle& h)
......@@ -122,7 +122,7 @@ class Handle {
int* Mpcount;
}; // template class Handle
} // namespace tf
} // namespace tfxx
#endif // TF_HANDLE_H_VERSION (includeguard)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment