zeus::TAutoPtr< T > Class Template Reference
#include <AutoPtr.hpp>
List of all members.
Detailed Description
template<class T>
class zeus::TAutoPtr< T >
The auto pointer class helps to manage objects from heap classes. Normally its used if a heap class is created locally. If there are exceptions we will get memory leaks. Therfore we use the auto pointer to manage the objects inside a scope. Leaving the scope will also release the memory allocated with new.
Constructor & Destructor Documentation
Creates an auto pointer
- Parameters:
-
| pIface | : Interface |
| bAllocPointer | : If this flag is true the pointer will be allocated with addRef() |
Creates an auto pointer
- Parameters:
-
| rIface | : Interface |
| bAllocPointer | : If this flag is true the pointer will be allocated with addRef() |
Copy constructor of auto pointer
- Parameters:
-
| wrapper | : auto pointer to copy |
Destroys the auto pointer
Member Function Documentation
Assign operator
- Parameters:
-
Assign operator
- Parameters:
-
Assign operator
- Parameters:
-
| rWrapper | : Interfacewrapper |
Equals operator
- Parameters:
-
| rWrapper | : Interface wrapper |
Equals operator
- Parameters:
-
| wrapper | : Interface wrapper |
template<class T>
| bool zeus::TAutoPtr< T >::operator== |
( |
const T * |
pIface |
) |
const [inline] |
Equals operator
- Parameters:
-
template<class T>
| bool zeus::TAutoPtr< T >::operator== |
( |
const T & |
rIface |
) |
const [inline] |
Equals operator
- Parameters:
-
template<class T>
| bool zeus::TAutoPtr< T >::operator!= |
( |
const T * |
pIface |
) |
const [inline] |
Equals operator
- Parameters:
-
template<class T>
| bool zeus::TAutoPtr< T >::operator!= |
( |
const T & |
rIface |
) |
const [inline] |
Equals operator
- Parameters:
-
Less than operator.
Needed to resolve ambiguities in STL when using TAutoPtr as key of a set or map (ambiguity between operator T*() and operator T*&().).
- Parameters:
-
| ptr | [IN]: Auto pointer to be compared to this. |
Operator is used to return the interface pointer and to access to all methods of this interface
- Returns:
- pointer to interface
Operator is used to return the interface pointer and to access to all methods of this interface
- Returns:
- pointer to interface
Returns the dereferenced pointer of an interface
- Returns:
- pointer to interface
The documentation for this class was generated from the following file: