scfImplementation< Class > Class Template Reference
[Shared Class Facility (SCF)]
Baseclass for the SCF implementation templates.
More...
#include <csutil/scf_implementation.h>
Inheritance diagram for scfImplementation< Class >:

Public Member Functions | |
void | AddRefOwner (iBase **ref_owner) |
For weak references: add a reference owner. | |
void | DecRef () |
Decrease reference count, and when it runs out delete the object. | |
int | GetRefCount () |
Get the reference count. | |
void | IncRef () |
Increase reference count. | |
void | RemoveRefOwner (iBase **ref_owner) |
For weak references: remove a reference owner. | |
scfImplementation (Class *object, iBase *parent=0) | |
Constructor. | |
virtual | ~scfImplementation () |
Protected Member Functions | |
template<class I> | |
CS_FORCEINLINE void * | GetInterface (scfInterfaceID iInterfaceID, scfInterfaceVersion iVersion) |
Helper function to get a given interface. | |
void * | QueryInterface (scfInterfaceID iInterfaceID, scfInterfaceVersion iVersion) |
Query this implementation for a specific interface. | |
void | scfRemoveRefOwners () |
Protected Attributes | |
Class * | scfObject |
iBase * | scfParent |
int | scfRefCount |
csArray< iBase ** > * | scfWeakRefOwners |
Detailed Description
template<class Class>
class scfImplementation< Class >
Baseclass for the SCF implementation templates.
Provides common methods such as reference counting and handling of weak references.
Definition at line 49 of file scf_implementation.h.
Constructor & Destructor Documentation
|
Constructor. Initialize the SCF-implementation in class named Class. Will be called from scfImplementation(Ext)N constructor Definition at line 56 of file scf_implementation.h. References iBase::IncRef(), and scfImplementation< Class >::scfParent. |
Member Function Documentation
|
For weak references: add a reference owner.
Implements iBase. Definition at line 99 of file scf_implementation.h. References csArray< T, ElementHandler, MemoryAllocator >::InsertSorted(), and scfImplementation< Class >::scfWeakRefOwners. |
|
Decrease reference count, and when it runs out delete the object.
Implements iBase. Definition at line 72 of file scf_implementation.h. References iBase::DecRef(), scfImplementation< Class >::scfObject, scfImplementation< Class >::scfParent, scfImplementation< Class >::scfRefCount, and scfImplementation< Class >::scfRemoveRefOwners(). |
|
Helper function to get a given interface. Used in the implementation of child-classes Definition at line 165 of file scf_implementation.h. References scfCompatibleVersion(), and scfImplementation< Class >::scfObject. |
|
Get the reference count. Just for debugging. Implements iBase. Definition at line 94 of file scf_implementation.h. References scfImplementation< Class >::scfRefCount. |
|
Increase reference count.
Implements iBase. Definition at line 86 of file scf_implementation.h. References scfImplementation< Class >::scfRefCount. |
|
Query this implementation for a specific interface.
Implements iBase. Definition at line 142 of file scf_implementation.h. References iBase::QueryInterface(), scfCompatibleVersion(), scfImplementation< Class >::scfObject, and scfImplementation< Class >::scfParent. |
|
For weak references: remove a reference owner.
Implements iBase. Definition at line 106 of file scf_implementation.h. References csArrayItemNotFound, csArray< T, ElementHandler, MemoryAllocator >::DeleteIndex(), csArray< T, ElementHandler, MemoryAllocator >::FindSortedKey(), and scfImplementation< Class >::scfWeakRefOwners. |
The documentation for this class was generated from the following file:
- csutil/scf_implementation.h
Generated for Crystal Space by doxygen 1.4.4