Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

at::PointerWrapper< w_TD, w_debug_code > Class Template Reference

#include <at_pointers.h>

Collaboration diagram for at::PointerWrapper< w_TD, w_debug_code >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef w_TD value_type

Public Methods

 PointerWrapper (w_TD *i_value=0)
void Assign (w_TD *i_in)
void AssignNull ()
void AssignInvalid ()
bool IsNull () const
bool IsValid () const
const w_TD * Get () const
w_TD ** GetInnerAddr ()

Detailed Description

template<typename w_TD, bool w_debug_code>
class at::PointerWrapper< w_TD, w_debug_code >

PointerWrapper provides methods and a type for managing POD pointers. It uses the same interface as the IteratorWrapper and hence the PointerWrapper and IteratorWrapper classes be used interchangeably as ways to manage pointers.
Parameters:
w_TD  is the type being pointed to - synonymous with the value_type.
w_debug_code  is set to true if "invalid" pointer checks are being made.


Member Typedef Documentation

template<typename w_TD, bool w_debug_code>
typedef w_TD at::PointerWrapper< w_TD, w_debug_code >::value_type
 

value_type is the value of the return from w_T::operator *()


Constructor & Destructor Documentation

template<typename w_TD, bool w_debug_code>
at::PointerWrapper< w_TD, w_debug_code >::PointerWrapper w_TD *    i_value = 0 [inline]
 

construct a pointer_value given a w_T value. It is assumed that the pointer value is a valid pointer. (This is where this concept breaks down a little. There is no way of knowing what kind of pointer is being passed.)

Parameters:
i_value  is the value of the pointer.


Member Function Documentation

template<typename w_TD, bool w_debug_code>
void at::PointerWrapper< w_TD, w_debug_code >::Assign w_TD *    i_in [inline]
 

The Assign method is the function used to assign pointers.

Parameters:
i_in  The the value being assigned

template<typename w_TD, bool w_debug_code>
void at::PointerWrapper< w_TD, w_debug_code >::AssignInvalid   [inline]
 

AssignInvalid will set the pointer to an invalid entry. Meaning attempts to use the pointer will assert after AssignInvalid.

template<typename w_TD, bool w_debug_code>
void at::PointerWrapper< w_TD, w_debug_code >::AssignNull   [inline]
 

Assign the pointer value to null

Parameters:
i_pv  The pointer_value being written to

template<typename w_TD, bool w_debug_code>
const w_TD* at::PointerWrapper< w_TD, w_debug_code >::Get   const [inline]
 

Get will retrieve from a pointer_value the value contained.

Returns:
a reference to the pointer value

template<typename w_TD, bool w_debug_code>
w_TD** at::PointerWrapper< w_TD, w_debug_code >::GetInnerAddr   [inline]
 

Return the address of the inner pointer. This is used for legacy API's which require a pointer to the internal address.

Returns:
a reference to the pointer value

template<typename w_TD, bool w_debug_code>
bool at::PointerWrapper< w_TD, w_debug_code >::IsNull   const [inline]
 

Returns true if the value is null - if debug mode is on, this check for test of an "invalid" pointer.

Returns:
true if null, false otherwise

template<typename w_TD, bool w_debug_code>
bool at::PointerWrapper< w_TD, w_debug_code >::IsValid   const [inline]
 

Determines in the pointer is a valid pointer. In this case, the check for assert is not done because this is used when to determine if the pointer needs releasing.

Returns:
true if pointer is "valid"


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

Generated for Austria by doxygen and MakeXS at Sun Oct 24 17:35:34 PDT 2004