- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# FUTrackedPtr< ObjectClass > Class Template Reference
[Utility Classes.]

A tracked object pointer The reverse idea of a smart pointer: if the object pointed to by the pointer is released, the pointer will become NULL. More...

`#include <FUTracker.h>`

Inheritance diagram for FUTrackedPtr< ObjectClass >:

List of all members.

## Public Member Functions
| FUTrackedPtr (ObjectClass *_ptr=NULL)
| Copy constructor.
| ~FUTrackedPtr ()
| Destructor.
FUTrackedPtr & | operator= (ObjectClass *_ptr)
| Assigns this tracking pointer a new object to track.
FUTrackedPtr & | operator= (const FUTrackedPtr &_ptr)
| See above.
virtual bool | TracksObject (const FUTrackable *object) const
| Retrieves whether an object is tracked by this tracker.
ObjectClass & | operator * ()
| Accesses the tracked object.
const ObjectClass & | operator * () const
| See above.
ObjectClass * | operator-> ()
| See above.
const ObjectClass * | operator-> () const
| See above.
| operator ObjectClass * ()
| See above.
| operator const ObjectClass * () const
| See above.
## Protected Member Functions
virtual void | OnObjectReleased (FUTrackable *object)
| Callback when an object tracked by this tracker is being released.
## Protected Attributes
ObjectClass * | ptr
| The tracked pointer.

## Detailed Description

### template<class ObjectClass = FUTrackable>
class FUTrackedPtr< ObjectClass >

A tracked object pointer The reverse idea of a smart pointer: if the object pointed to by the pointer is released, the pointer will become NULL.

## Constructor & Destructor Documentation

template<class ObjectClass = FUTrackable>
FUTrackedPtr< ObjectClass >::FUTrackedPtr | ( | ObjectClass * | _ptr = `NULL` | ) | `[inline]`

  | Copy constructor. Parameters:
  | _ptr | The object to track. This pointer can be NULL to indicate that no object should be tracked at this time.

template<class ObjectClass = FUTrackable>
FUTrackedPtr< ObjectClass >::~FUTrackedPtr | ( |  | ) | `[inline]`

| Destructor. Stops the tracking of the pointer.

## Member Function Documentation

template<class ObjectClass = FUTrackable>
virtual void FUTrackedPtr< ObjectClass >::OnObjectReleased | ( | FUTrackable * | object | ) | `[inline, protected, virtual]`

  | Callback when an object tracked by this tracker is being released. Parameters:
  | object | A contained object.
Implements FUTracker.

template<class ObjectClass = FUTrackable>
ObjectClass& FUTrackedPtr< ObjectClass >::operator * | ( |  | ) | `[inline]`

| Accesses the tracked object. Returns: The tracked object.

template<class ObjectClass = FUTrackable>
FUTrackedPtr& FUTrackedPtr< ObjectClass >::operator= | ( | ObjectClass * | _ptr | ) | `[inline]`

  | Assigns this tracking pointer a new object to track. Parameters:
  | _ptr | The new object to track.
Returns: This reference.

template<class ObjectClass = FUTrackable>
virtual bool FUTrackedPtr< ObjectClass >::TracksObject | ( | const FUTrackable * | object | ) | const`[inline, virtual]`

  | Retrieves whether an object is tracked by this tracker. Parameters:
  | object | An object.
Reimplemented from FUTracker.

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

- FUtils/FUTracker.h