ork::ptr< T > Class Template Reference
[core]

A strong pointer to an Object. More...

#include <Object.h>

Inheritance diagram for ork::ptr< T >:
ork::static_ptr< T >

List of all members.

Public Member Functions

 ptr ()
 Creates a strong pointer pointing to NULL.
 ptr (T *target)
 Creates a strong pointer to the given object.
 ptr (const ptr< T > &p)
 Creates a strong pointer as a copy of the given pointer.
template<class U >
 ptr (const ptr< U > &p)
 Creates a strong pointer as a copy of the given pointer.
 ~ptr ()
 Destroys this strong pointer.
void operator= (const ptr< T > &v)
 Assigns the given pointer to this strong pointer.
T * operator-> () const
 Returns the target object of this strong pointer.
T & operator* () const
 Returns the target object of this strong pointer.
T * get () const
 Returns the target object of this strong pointer.
bool operator== (const ptr< T > &v) const
 Returns true if this pointer and the given pointer point to the same object.
bool operator!= (const ptr< T > &v) const
 Returns true if this pointer and the given pointer point to different objects.
bool operator< (const ptr< T > &v) const
 Compares the addresses of the objects pointed by this pointer and by the given pointer.
bool operator== (const T *target) const
 Returns true if this strong pointer points to the given object.
bool operator!= (const T *target) const
 Returns true if this strong pointer does not point to the given object.
template<class U >
ptr< U > cast () const
 Casts this strong pointer to a strong pointer of the given type.

Protected Attributes

T * target
 The object pointed by this strong pointer.

Detailed Description

template<class T>
class ork::ptr< T >

A strong pointer to an Object.


Constructor & Destructor Documentation

template<class T>
ork::ptr< T >::ptr (  )  [inline]

Creates a strong pointer pointing to NULL.

template<class T>
ork::ptr< T >::ptr ( T *  target  )  [inline]

Creates a strong pointer to the given object.

template<class T>
ork::ptr< T >::ptr ( const ptr< T > &  p  )  [inline]

Creates a strong pointer as a copy of the given pointer.

template<class T>
template<class U >
ork::ptr< T >::ptr ( const ptr< U > &  p  )  [inline]

Creates a strong pointer as a copy of the given pointer.

template<class T>
ork::ptr< T >::~ptr (  )  [inline]

Destroys this strong pointer.


Member Function Documentation

template<class T>
template<class U >
ptr<U> ork::ptr< T >::cast (  )  const [inline]

Casts this strong pointer to a strong pointer of the given type.

template<class T>
T* ork::ptr< T >::get (  )  const [inline]

Returns the target object of this strong pointer.

template<class T>
bool ork::ptr< T >::operator!= ( const T *  target  )  const [inline]

Returns true if this strong pointer does not point to the given object.

template<class T>
bool ork::ptr< T >::operator!= ( const ptr< T > &  v  )  const [inline]

Returns true if this pointer and the given pointer point to different objects.

template<class T>
T& ork::ptr< T >::operator* (  )  const [inline]

Returns the target object of this strong pointer.

template<class T>
T* ork::ptr< T >::operator-> (  )  const [inline]

Returns the target object of this strong pointer.

template<class T>
bool ork::ptr< T >::operator< ( const ptr< T > &  v  )  const [inline]

Compares the addresses of the objects pointed by this pointer and by the given pointer.

Returns true if the address of the object pointed by this pointer is less than the address of the object pointed by the given pointer.

template<class T>
void ork::ptr< T >::operator= ( const ptr< T > &  v  )  [inline]
template<class T>
bool ork::ptr< T >::operator== ( const T *  target  )  const [inline]

Returns true if this strong pointer points to the given object.

template<class T>
bool ork::ptr< T >::operator== ( const ptr< T > &  v  )  const [inline]

Returns true if this pointer and the given pointer point to the same object.


Member Data Documentation

template<class T>
T* ork::ptr< T >::target [protected]

The object pointed by this strong pointer.


Generated on Mon Oct 18 09:36:07 2010 for ork by  doxygen 1.6.1