lestes::std::srp< T > Class Template Reference

#include <srp.hh>

Inheritance diagram for lestes::std::srp< T >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef T pointee_type
 the type pointed to

Public Member Functions

 srp (void)
 Creates srp, initializes with NULL pointer.
 srp (T *a_pointer)
 Creates srp, initializes with pointer .
template<typename U>
 srp (U *a_pointer)
 Creates srp, initializes with pointer .
 srp (const srp< T > &other)
 Creates srp, initializes with srp to the same type.
template<typename U>
 srp (const srp< U > &other)
 Creates srp, initializes with srp.
template<typename U>
 srp (const ptr< U > &other)
 Creates srp, initializes with ptr.
 ~srp (void)
 Destroys srp.
T * operator-> (void) const
 Returns the pointer.
T & operator * (void) const
 Returns dereferenced pointer.
srp< T > & operator= (T *a_pointer)
 Assigns a pointer.
template<typename U>
srp< T > & operator= (U *a_pointer)
 Assigns a pointer.
srp< T > & operator= (const srp< T > &other)
 Assigns srp of the same type.
template<typename U>
srp< T > & operator= (const ptr< U > &other)
 Assigns ptr.
template<typename U>
srp< T > & operator= (const srp< U > &other)
 Assigns srp.
 operator condition * (void) const
 Tests NULL pointer.
bool operator! (void) const
 Tests non NULL pointer.
bool operator== (T *a_pointer) const
 Compares to pointer.
template<typename U>
bool operator== (U *a_pointer) const
 Compares to pointer.
bool operator== (::std::ptrdiff_t a_pointer) const
 Compares to NULL.
template<typename U>
bool operator== (const ptr< U > &other) const
 Compares to ptr.
template<typename U>
bool operator== (const srp< U > &other) const
 Compares to srp.
bool operator!= (T *a_pointer) const
 Compares to pointer.
template<typename U>
bool operator!= (U *a_pointer) const
 Compares to pointer.
bool operator!= (::std::ptrdiff_t a_pointer) const
 Compares to NULL.
template<typename U>
bool operator!= (const ptr< U > &other) const
 Compares to ptr.
template<typename U>
bool operator!= (const srp< U > &other) const
 Compares to srp.
template<typename U>
ptr< U > dncast (void) const
 Performs dynamic cast to other type.
T * pointer_get (void) const
 Returns the pointer.
bool operator< (const srp< T > &) const
 Compares two pointers for ordering.

Private Member Functions

void pointer_set (T *a_pointer)
 Sets the pointer.

Classes

struct  condition
 Condition class. More...

Detailed Description

template<typename T>
class lestes::std::srp< T >

Represents structure pointer.
Parameters:
T The type of object pointed to.


Member Typedef Documentation

template<typename T>
typedef T lestes::std::srp< T >::pointee_type

the type pointed to

Author:
TMA


Constructor & Destructor Documentation

template<typename T>
lestes::std::srp< T >::srp ( void   )  [inline]

Creates srp, initializes with NULL pointer.

Creates srp, initializes with NULL pointer.

Postcondition:
pointer_get() == NULL

template<typename T>
lestes::std::srp< T >::srp ( T *  a_pointer  )  [inline]

Creates srp, initializes with pointer .

Creates srp, initializes with pointer.

Postcondition:
pointer_get() == a_pointer
Parameters:
a_pointer The initialization value.

template<typename T>
template<typename U>
lestes::std::srp< T >::srp ( U *  a_pointer  )  [inline]

Creates srp, initializes with pointer .

Creates srp, initializes with pointer.

Postcondition:
pointer_get() == a_pointer
Parameters:
U The type of the initializer pointer.
a_pointer The initialization value.

template<typename T>
lestes::std::srp< T >::srp ( const srp< T > &  other  )  [inline]

Creates srp, initializes with srp to the same type.

Creates srp, initializes with srp to the same type. Workaround to avoid implicit copy constructor creation.

Postcondition:
pointer_get() == other.pointer_get()
Parameters:
other The srp to initialize with.

template<typename T>
template<typename U>
lestes::std::srp< T >::srp ( const srp< U > &  other  )  [inline]

Creates srp, initializes with srp.

Creates srp, initializes with srp.

Postcondition:
pointer_get() == other.pointer_get()
Parameters:
U The type of the initializer srp.
other The srp to initialize with.

template<typename T>
template<typename U>
lestes::std::srp< T >::srp ( const ptr< U > &  other  )  [inline]

Creates srp, initializes with ptr.

Creates srp, initializes with ptr.

Postcondition:
pointer_get() == other.pointer_get()
Parameters:
U The type of the initializer ptr.
other The ptr to initialize with.

template<typename T>
lestes::std::srp< T >::~srp ( void   )  [inline]

Destroys srp.

Destroys srp.


Member Function Documentation

template<typename T>
T * lestes::std::srp< T >::operator-> ( void   )  const [inline]

Returns the pointer.

Returns the pointer.

Returns:
The contained pointer.

template<typename T>
T & lestes::std::srp< T >::operator * ( void   )  const [inline]

Returns dereferenced pointer.

Dereferences the pointer.

Returns:
The dereferenced pointer.

template<typename T>
srp< T > & lestes::std::srp< T >::operator= ( T *  a_pointer  )  [inline]

Assigns a pointer.

Assigns pointer.

Parameters:
a_pointer The pointer to assign.
Returns:
This srp after the assignment.

template<typename T>
template<typename U>
srp< T > & lestes::std::srp< T >::operator= ( U *  a_pointer  )  [inline]

Assigns a pointer.

Assigns pointer.

Parameters:
U The type of the assigned pointer.
a_pointer The pointer to assign.
Returns:
This srp after the assignment.

template<typename T>
srp< T > & lestes::std::srp< T >::operator= ( const srp< T > &  other  )  [inline]

Assigns srp of the same type.

Assigns srp of the same type. Workaround to avoid implicit assignment operator creation.

Parameters:
other The srp to assign.
Returns:
This srp after assignment.

template<typename T>
template<typename U>
srp< T > & lestes::std::srp< T >::operator= ( const ptr< U > &  other  )  [inline]

Assigns ptr.

Assigns ptr.

Parameters:
U The type of the assigned ptr.
other The ptr to assign.
Returns:
This srp after assignment.

template<typename T>
template<typename U>
srp< T > & lestes::std::srp< T >::operator= ( const srp< U > &  other  )  [inline]

Assigns srp.

Assigns srp.

Parameters:
U The type of the assigned srp.
other The srp to assign.
Returns:
This srp after assignment.

template<typename T>
lestes::std::srp< T >::operator condition * ( void   )  const [inline]

Tests NULL pointer.

Tests NULL pointer.

Returns:
Condition convertible to true if the pointer is NULL.

template<typename T>
bool lestes::std::srp< T >::operator! ( void   )  const [inline]

Tests non NULL pointer.

Tests non NULL pointer.

Returns:
true if the pointer is not NULL.

template<typename T>
bool lestes::std::srp< T >::operator== ( T *  a_pointer  )  const [inline]

Compares to pointer.

Compares to pointer.

Returns:
true if both pointers are equal.

template<typename T>
template<typename U>
bool lestes::std::srp< T >::operator== ( U *  a_pointer  )  const [inline]

Compares to pointer.

Compares to pointer.

Parameters:
U The type of the compared pointer.
Returns:
true if both pointers are equal.

template<typename T>
bool lestes::std::srp< T >::operator== ( ::std::ptrdiff_t  a_pointer  )  const [inline]

Compares to NULL.

Compares to NULL pointer. Workaround to avoid implicit bool conversion.

Returns:
true if both pointers are equal.

template<typename T>
template<typename U>
bool lestes::std::srp< T >::operator== ( const ptr< U > &  other  )  const [inline]

Compares to ptr.

Compares to ptr.

Parameters:
U The type of the compared ptr.
Returns:
true if both pointers are equal.

template<typename T>
template<typename U>
bool lestes::std::srp< T >::operator== ( const srp< U > &  other  )  const [inline]

Compares to srp.

Compares to srp.

Parameters:
U The type of the compared pointer.
Returns:
true if both pointers are equal.

template<typename T>
bool lestes::std::srp< T >::operator!= ( T *  a_pointer  )  const [inline]

Compares to pointer.

Compares to pointer.

Returns:
false if both pointers are equal.

template<typename T>
template<typename U>
bool lestes::std::srp< T >::operator!= ( U *  a_pointer  )  const [inline]

Compares to pointer.

Compares to pointer.

Parameters:
U The type of the compared pointer.
Returns:
false if both pointers are equal.

template<typename T>
bool lestes::std::srp< T >::operator!= ( ::std::ptrdiff_t  a_pointer  )  const [inline]

Compares to NULL.

Compares to NULL pointer. Workaround to avoid implicit bool conversion.

Returns:
false if both pointers are equal.

template<typename T>
template<typename U>
bool lestes::std::srp< T >::operator!= ( const ptr< U > &  other  )  const [inline]

Compares to ptr.

Compares to ptr.

Parameters:
U The type of the compared ptr.
Returns:
false if both pointers are equal.

template<typename T>
template<typename U>
bool lestes::std::srp< T >::operator!= ( const srp< U > &  other  )  const [inline]

Compares to srp.

Compares to srp.

Parameters:
U The type of the compared pointer.
Returns:
false if both pointers are equal.

template<typename T>
template<typename U>
ptr< U > lestes::std::srp< T >::dncast ( void   )  const [inline]

Performs dynamic cast to other type.

Performs dynamic cast on pointers.

When the dynamic type of the pointee is not the requested one or one derived from it, the function fails with an assertion. Null pointers do not make the function fail.

Parameters:
U The type of the target ptr.
Returns:
New ptr initialized with this srp pointer.

template<typename T>
T * lestes::std::srp< T >::pointer_get ( void   )  const [inline]

Returns the pointer.

Returns the pointer.

Returns:
The contained pointer.

Reimplemented from lestes::std::mem::simple_pointer.

template<typename T>
bool lestes::std::srp< T >::operator< ( const srp< T > &  b  )  const [inline]

Compares two pointers for ordering.

Compares the pointer with a given one.

Parameters:
b The pointer to compare with.

template<typename T>
void lestes::std::srp< T >::pointer_set ( T *  a_pointer  )  [inline, private]

Sets the pointer.

Sets the pointer.

Parameters:
a_pointer The pointer to set.


The documentation for this class was generated from the following files:
Generated on Mon Feb 12 18:50:09 2007 for lestes by doxygen 1.5.1-20070107