SourceMod::IThreader Class Reference

Describes a threading system. More...

#include <public/IThreader.h>

Inherits SourceMod::SMInterface, and SourceMod::IThreadCreator.

Inheritance diagram for SourceMod::IThreader:

Inheritance graph
[legend]
Collaboration diagram for SourceMod::IThreader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual const char * GetInterfaceName ()
 Must return a string defining the interface's unique name.
virtual unsigned int GetInterfaceVersion ()
 Must return an integer defining the interface's version.
virtual bool IsVersionCompatible (unsigned int version)
 Must return whether the requested version number is backwards compatible. Note: This can be overridden for breaking changes or custom versioning.
virtual IMutexMakeMutex ()=0
 Creates a mutex (mutual exclusion lock).
virtual void ThreadSleep (unsigned int ms)=0
 Sleeps the calling thread for a number of milliseconds.
virtual IEventSignalMakeEventSignal ()=0
 Creates a non-signalled event.
virtual IThreadWorkerMakeWorker (IThreadWorkerCallbacks *hooks, bool threaded)=0
 Creates a thread worker.
virtual void DestroyWorker (IThreadWorker *pWorker)=0
 Destroys an IThreadWorker pointer.

Detailed Description

Describes a threading system.

Definition at line 395 of file IThreader.h.


Member Function Documentation

virtual bool SourceMod::IThreader::IsVersionCompatible ( unsigned int  version  )  [inline, virtual]

Must return whether the requested version number is backwards compatible. Note: This can be overridden for breaking changes or custom versioning.

Parameters:
version Version number to compare against.
Returns:
True if compatible, false otherwise.

Reimplemented from SourceMod::SMInterface.

Definition at line 406 of file IThreader.h.

virtual IMutex* SourceMod::IThreader::MakeMutex (  )  [pure virtual]

Creates a mutex (mutual exclusion lock).

Returns:
A new IMutex pointer (must be destroyed).

virtual void SourceMod::IThreader::ThreadSleep ( unsigned int  ms  )  [pure virtual]

Sleeps the calling thread for a number of milliseconds.

Parameters:
ms Millisecond count to sleep.

virtual IEventSignal* SourceMod::IThreader::MakeEventSignal (  )  [pure virtual]

Creates a non-signalled event.

Returns:
A new IEventSignal pointer (must be destroyed).

virtual IThreadWorker* SourceMod::IThreader::MakeWorker ( IThreadWorkerCallbacks hooks,
bool  threaded 
) [pure virtual]

Creates a thread worker.

Parameters:
hooks Optional pointer to callback interface.
threaded If true, the worker will be threaded. If false, the worker will require manual frame execution.
Returns:
A new IThreadWorker pointer (must be destroyed).

virtual void SourceMod::IThreader::DestroyWorker ( IThreadWorker pWorker  )  [pure virtual]

Destroys an IThreadWorker pointer.

Parameters:
pWorker IThreadWorker pointer to destroy.


The documentation for this class was generated from the following file:
Generated on Thu Mar 5 14:05:28 2009 for SourceMod SDK by  doxygen 1.5.1