iRefTracker Struct Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
iRefTracker Struct Reference

The reference tracker interface. More...

`#include <iutil/reftrack.h>`

Inheritance diagram for iRefTracker:

List of all members.

## Public Member Functions
virtual void | AddAlias (void *obj, void *mapTo)=0
| Add an alias.
virtual void | MatchDecRef (void *object, int refCount, void *tag)=0
| Match the most recent DecRef() to a 'tag' so it can be tracked what DecRef()ed a ref.
virtual void | MatchIncRef (void *object, int refCount, void *tag)=0
| Match the most recent IncRef() to a 'tag' so it can be tracked what IncRef()ed a ref.
virtual void | RemoveAlias (void *obj, void *mapTo)=0
| Remove an alias.
virtual void | SetDescription (void *obj, const char *description)=0
| Set description for an object.
virtual void | SetDescriptionWeak (void *obj, const char *description)=0
| Set description for an object, but only if no description has been set yet.
virtual void | TrackConstruction (void *object)=0
| Called by an object if it constructed.
virtual void | TrackDecRef (void *object, int refCount)=0
| Called by an object if it has been DecRef()ed.
virtual void | TrackDestruction (void *object, int refCount)=0
| Called by an object if it destructed.
virtual void | TrackIncRef (void *object, int refCount)=0
| Called by an object if it has been IncRef()ed.

## Detailed Description

The reference tracker interface.

Exposed by iSCF::SCF if enabled at compile-time.

Definition at line 31 of file reftrack.h.

## Member Function Documentation

virtual void iRefTracker::AddAlias | ( | void * | obj,
|  | void * | mapTo
| ) |  | `[pure virtual]`

Add an alias.

Basically says "mapTO is the same as obj." Used for embedded interfaces.

virtual void iRefTracker::MatchDecRef | ( | void * | object,
|  | int | refCount,
|  | void * | tag
| ) |  | `[pure virtual]`

Match the most recent DecRef() to a 'tag' so it can be tracked what DecRef()ed a ref.

csRef<>s employ this mechanism and tag DecRef()s with 'this'.

virtual void iRefTracker::MatchIncRef | ( | void * | object,
|  | int | refCount,
|  | void * | tag
| ) |  | `[pure virtual]`

Match the most recent IncRef() to a 'tag' so it can be tracked what IncRef()ed a ref.

csRef<>s employ this mechanism and tag IncRef()s with 'this'.

virtual void iRefTracker::RemoveAlias | ( | void * | obj,
|  | void * | mapTo
| ) |  | `[pure virtual]`

Remove an alias.

virtual void iRefTracker::SetDescription | ( | void * | obj,
|  | const char * | description
| ) |  | `[pure virtual]`

Set description for an object.

Remarks:
  Currently the provided description pointer is stored as-is. That means the string must be constant!

virtual void iRefTracker::SetDescriptionWeak | ( | void * | obj,
|  | const char * | description
| ) |  | `[pure virtual]`

Set description for an object, but only if no description has been set yet.

Remarks:
  Currently the provided description pointer is stored as-is. That means the string must be constant!

virtual void iRefTracker::TrackConstruction | ( | void * | object | ) | `[pure virtual]`

Called by an object if it constructed.

virtual void iRefTracker::TrackDecRef | ( | void * | object,
|  | int | refCount
| ) |  | `[pure virtual]`

Called by an object if it has been DecRef()ed.

virtual void iRefTracker::TrackDestruction | ( | void * | object,
|  | int | refCount
| ) |  | `[pure virtual]`

Called by an object if it destructed.

virtual void iRefTracker::TrackIncRef | ( | void * | object,
|  | int | refCount
| ) |  | `[pure virtual]`

Called by an object if it has been IncRef()ed.

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

- iutil/reftrack.h