scfImplementation< Class > Class Template 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 | Protected Member Functions
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 >:

List of all members.

## Public Member Functions
virtual void | AddRefOwner (void **ref_owner)
| For weak references: add a reference owner.
virtual void | DecRef ()
| Decrement the number of references to this object.
virtual scfInterfaceMetadataList * | GetInterfaceMetadata ()
| Request the meta-data for the interfaces implemented by this object.
virtual int | GetRefCount ()
| Get the ref count (only for debugging).
virtual void | IncRef ()
| Increment the number of references to this object.
scfImplementation & | operator= (const scfImplementation &)
| Assign to another instance.
virtual void | RemoveRefOwner (void **ref_owner)
| For weak references: remove a reference owner.
| scfImplementation (Class *object, iBase *parent=0)
| Constructor.
| scfImplementation (const scfImplementation &)
| Copy constructor.
## Protected Member Functions
void * | QueryInterface (scfInterfaceID iInterfaceID, scfInterfaceVersion iVersion)
| Query a particular interface implemented by this object.

## 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 198 of file scf_implementation.h.

## Constructor & Destructor Documentation

template<class Class>

scfImplementation< Class >::scfImplementation | ( | Class * | object,
|  | iBase * | parent = `0`
| ) |  | `[inline]`

Constructor.

Initialize the SCF-implementation in class named Class. Will be called from scfImplementation(Ext)N constructor

Definition at line 207 of file scf_implementation.h.

template<class Class>

scfImplementation< Class >::scfImplementation | ( | const scfImplementation< Class > & |  | ) | `[inline]`

Copy constructor.

Use of the default copy constructor is nor desired since the information is insufficient to fully initialize scfImplementation; hence, an explicit copy constructor must be created in the derived class that initializes scfImplementation like in the normal constructor, i.e. "scfImplementation (this)".

Definition at line 229 of file scf_implementation.h.

## Member Function Documentation

template<class Class>

virtual void scfImplementation< Class >::AddRefOwner | ( | void ** | ref_owner | ) | `[inline, virtual]`

For weak references: add a reference owner.

Thread-safe - it is possible to add reference owners from different threads at the same time. However, if an object may be destructed on another thread, race conditions might ensue. If weak references are to be used in a multithreaded environment each thread holding a weak reference to an object should also hold a normal reference somewhere.

Implements iBase.

Definition at line 286 of file scf_implementation.h.

template<class Class>

virtual void scfImplementation< Class >::DecRef | ( |  | ) | `[inline, virtual]`

Decrement the number of references to this object.

Thread-safe - it is possible to manipulate the reference count from different threads. If multiple threads simultaneously decrement the reference count and cause the object to be freed it's not defined on which thread the subsequent destruction happens - it may happen in any one of the decrementing thread.

Implements iBase.

Reimplemented in csPoolEvent, scfImplementationPooled< scfImplementation1< RenderView, iRenderView > >, scfImplementationPooled< scfImplementationExt0< csParasiticDataBufferPooled, csParasiticDataBufferBase > >, and csGLScreenShot.

Definition at line 260 of file scf_implementation.h.

template<class Class>

virtual scfInterfaceMetadataList* scfImplementation< Class >::GetInterfaceMetadata | ( |  | ) | `[inline, virtual]`

Request the meta-data for the interfaces implemented by this object.

Thread-safe - it is possible to query the supported interfaces from different threads at the same time.

Implements iBase.

Definition at line 314 of file scf_implementation.h.

template<class Class>

virtual int scfImplementation< Class >::GetRefCount | ( |  | ) | `[inline, virtual]`

Get the ref count (only for debugging).

If another thread manipulates the reference count at the same time the count may reflect the state before or after the manipulation; it is undefined which exactly.

Implements iBase.

Definition at line 281 of file scf_implementation.h.

template<class Class>

virtual void scfImplementation< Class >::IncRef | ( |  | ) | `[inline, virtual]`

Increment the number of references to this object.

Thread-safe - it is possible to manipulate the reference count from different threads at the same time.

Implements iBase.

Reimplemented in csGLScreenShot.

Definition at line 272 of file scf_implementation.h.

template<class Class>

scfImplementation& scfImplementation< Class >::operator= | ( | const scfImplementation< Class > & |  | ) | `[inline]`

Assign to another instance.

When assigning an SCF object to another, anything contained in this class should not be copied, since it's all instance- specific. Hence the assignment operator does nothing.

Definition at line 255 of file scf_implementation.h.

template<class Class>

void* scfImplementation< Class >::QueryInterface | ( | scfInterfaceID | iInterfaceID,
|  | scfInterfaceVersion | iVersion
| ) |  | `[inline, protected, virtual]`

Query a particular interface implemented by this object.

You are _not_ allowed to cast this to anything but a pointer to this interface (not even iBase). Use scfQueryInterface<interface> instead of using this method directly. Thread-safe - it is possible to query interfaces from different threads at the same time.

Implements iBase.

Reimplemented in scfImplementation7< Class, I1, I2, I3, I4, I5, I6, I7 >, scfImplementation7< csGraphics2D, iGraphics2D, iComponent, iNativeWindow, iNativeWindowManager, iPluginConfig, iDebugHelper, iEventHandler >, scfImplementation6< Class, I1, I2, I3, I4, I5, I6 >, scfImplementation5< Class, I1, I2, I3, I4, I5 >, scfImplementation4< Class, I1, I2, I3, I4 >, scfImplementation3< Class, I1, I2, I3 >, scfImplementation3< csConfigManager, iConfigManager, scfFakeInterface< iConfigFile >, iConfigNotifier >, scfImplementation2< Class, I1, I2 >, scfImplementation2< csKeyboardDriver, iKeyboardDriver, iEventHandler >, scfImplementation2< csJoystickDriver, iJoystickDriver, iEventHandler >, scfImplementation2< csMeshType, iMeshObjectType, iComponent >, scfImplementation2< csVisibilityObjectWrapper, iMovableListener, iObjectModelListener >, scfImplementation2< FrameSignpost_Logic3D, iFrameEventSignpost, scfFakeInterface< iEventHandler > >, scfImplementation2< csMouseDriver, iMouseDriver, iEventHandler >, scfImplementation2< SystemOpenManager, iSystemOpenManager, iEventHandler >, scfImplementation2< csBaseRenderStepType, iRenderStepType, iComponent >, scfImplementation2< csInputBinder, iInputBinder, iEventHandler >, scfImplementation2< FrameSignpost_ConsoleDebug, iFrameEventSignpost, scfFakeInterface< iEventHandler > >, scfImplementation2< csShaderProgram, iShaderProgram, iShaderDestinationResolver >, scfImplementation2< AnimNodeManagerCommon< ThisType, ManagerInterface, FactoryType >, ManagerInterface, iComponent >, scfImplementation2< FrameSignpost_3D2D, iFrameEventSignpost, scfFakeInterface< iEventHandler > >, scfImplementation2< csBaseRenderStepLoader, iLoaderPlugin, iComponent >, scfImplementation2< FrameSignpost_DebugFrame, iFrameEventSignpost, scfFakeInterface< iEventHandler > >, scfImplementation2< RenderBufferPersistent, iRenderBuffer, iRenderBufferPersistence >, scfImplementation2< FrameSignpost_2DConsole, iFrameEventSignpost, scfFakeInterface< iEventHandler > >, scfImplementation1< Class, I1 >, scfImplementation1< DataBuffer< Allocator >, iDataBuffer >, scfImplementation1< ThreadEvent13< T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13 >, iJob >, scfImplementation1< FramePrinter, iEventHandler >, scfImplementation1< csObject, iObject >, scfImplementation1< csRenderBuffer, iRenderBuffer >, scfImplementation1< scfStringArray, iStringArray >, scfImplementation1< SndSysBasicData, iSndSysData >, scfImplementation1< csMemFile, iFile >, scfImplementation1< csImageBase, iImage >, scfImplementation1< csTiledCoverageBuffer, iDebugHelper >, scfImplementation1< csClipper, iClipper2D >, scfImplementation1< ThreadEvent6< T, A1, A2, A3, A4, A5, A6 >, iJob >, scfImplementation1< csNullCacheManager, iCacheManager >, scfImplementation1< SndSysBasicStream, iSndSysStream >, scfImplementation1< csDocumentNodeCommon, iDocumentNode >, scfImplementation1< ThreadEvent9< T, A1, A2, A3, A4, A5, A6, A7, A8, A9 >, iJob >, scfImplementation1< csConfigFile, iConfigFile >, scfImplementation1< RootedHierarchicalCache, iHierarchicalCache >, scfImplementation1< TMEventHandler, iEventHandler >, scfImplementation1< csTextProgressMeter, iProgressMeter >, scfImplementation1< csTriangleMeshPointer, iTriangleMesh >, scfImplementation1< csEventAttributeIterator, iEventAttributeIterator >, scfImplementation1< csTinyDocumentSystem, iDocumentSystem >, scfImplementation1< csNormalizationCubeAccessor, iShaderVariableAccessor >, scfImplementation1< csOccluvisObjIt, iVisibilityObjectIterator >, scfImplementation1< LightCallback, iLightCallback >, scfImplementation1< ThreadedJobQueue, iJobQueue >, scfImplementation1< csThreadManager, iThreadManager >, scfImplementation1< csObjectModel, iObjectModel >, scfImplementation1< scfArrayWrapConst< iGradientShades, csArray< csGradientShade > >, iGradientShades >, scfImplementation1< csEmptyDocumentNodeIterator, iDocumentNodeIterator >, scfImplementation1< MicroArchiveCache, iHierarchicalCache >, scfImplementation1< scfString, iString >, scfImplementation1< scfArrayWrap< IF, Backend >, IF >, scfImplementation1< csVerbosityManager, iVerbosityManager >, scfImplementation1< ThreadEvent3< T, A1, A2, A3 >, iJob >, scfImplementation1< csPhysicalFile, iFile >, scfImplementation1< csKeyComposer, iKeyComposer >, scfImplementation1< ThreadEvent14< T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14 >, iJob >, scfImplementation1< csCommonImageFileLoader, iImageFileLoader >, scfImplementation1< KDTree, iDebugHelper >, scfImplementation1< ThreadEvent2< T, A1, A2 >, iJob >, scfImplementation1< scfArray< IF, Backend >, IF >, scfImplementation1< ThreadEvent12< T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 >, iJob >, scfImplementation1< ThreadEvent8< T, A1, A2, A3, A4, A5, A6, A7, A8 >, iJob >, scfImplementation1< ThreadEvent4< T, A1, A2, A3, A4 >, iJob >, scfImplementation1< FontDeleteNotify, iFontDeleteNotify >, scfImplementation1< csVfsCacheManager, iCacheManager >, scfImplementation1< csEmptyDocumentAttributeIterator, iDocumentAttributeIterator >, scfImplementation1< csView, iView >, scfImplementation1< csEventNameRegistry, iEventNameRegistry >, scfImplementation1< ThreadEvent1< T, A1 >, iJob >, scfImplementation1< csConfigDocument, iConfigFile >, scfImplementation1< csCommandLineParser, iCommandLineParser >, scfImplementation1< csEventCord, iEventCord >, scfImplementation1< RenderView, iRenderView >, scfImplementation1< SimpleJobQueue, iJobQueue >, scfImplementation1< csOccluvis, iVisibilityCuller >, scfImplementation1< csPluginManager, iPluginManager >, scfImplementation1< csEventQueue, iEventQueue >, scfImplementation1< csEventOutlet, iEventOutlet >, scfImplementation1< ShaderProgramPluginGL, iShaderProgramPlugin >, scfImplementation1< ConfigListenerBase, iEventHandler >, scfImplementation1< ThreadEvent10< T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10 >, iJob >, scfImplementation1< csThreadReturn, iThreadReturn >, scfImplementation1< AllocatorImplementation< Allocator >, iAllocator >, scfImplementation1< LoaderJob, iJob >, scfImplementation1< csObjectRegistry, iObjectRegistry >, scfImplementation1< csScriptCommon, iScript >, scfImplementation1< csMeshFactory, iMeshObjectFactory >, scfImplementation1< EventHandlerImpl, iEventHandler >, scfImplementation1< ThreadEvent15< T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15 >, iJob >, scfImplementation1< csTriangleMesh, iTriangleMesh >, scfImplementation1< FilterDocumentNodeIterator< T >, iDocumentNodeIterator >, scfImplementation1< ThreadEvent7< T, A1, A2, A3, A4, A5, A6, A7 >, iJob >, scfImplementation1< csKDTree, iDebugHelper >, scfImplementation1< ConfigEventNotifier, iConfigListener >, scfImplementation1< csEventHandlerRegistry, iEventHandlerRegistry >, scfImplementation1< ThreadEvent5< T, A1, A2, A3, A4, A5 >, iJob >, scfImplementation1< scfArrayWrapConst< IF, Backend >, IF >, scfImplementation1< csParasiticDataBufferBase, iDataBuffer >, scfImplementation1< VfsHierarchicalCache, iHierarchicalCache >, scfImplementation1< ScfStringSet< IF >, IF >, scfImplementation1< csShaderVariableContext, scfFakeInterface< iShaderVariableContext > >, scfImplementation1< csDocumentAttributeCommon, iDocumentAttribute >, scfImplementation1< ThreadEvent11< T, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11 >, iJob >, scfImplementation1< csEventTimer, iEventTimer >, scfImplementation1< csTriangleMeshBox, iTriangleMesh >, scfImplementation1< csScriptObjectCommon, iScriptObject >, scfImplementation1< csWin32RegistryConfig, iConfigFile >, scfImplementation1< csLoaderReturn, iThreadReturn >, scfImplementation1< ViscullCallback< RenderTree >, iVisibilityCullerListener >, scfImplementation1< csEvent, iEvent >, scfImplementation1< csVirtualClock, iVirtualClock >, scfImplementation1< csGradient, iGradient >, scfImplementation1< FrameBegin3DDraw, iEventHandler >, scfImplementation1< csBaseTextureFactory, iTextureFactory >, and scfImplementation0< Class >.

Definition at line 335 of file scf_implementation.h.

template<class Class>

virtual void scfImplementation< Class >::RemoveRefOwner | ( | void ** | ref_owner | ) | `[inline, virtual]`

For weak references: remove a reference owner.

Thread-safe - it is possible to add reference owners from different threads at the same time. But the see comments in AddRefOwner() on weak references in a multithreaded environment.

Implements iBase.

Definition at line 298 of file scf_implementation.h.

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

- csutil/scf_implementation.h