SourceMod::ITimerSystem Class Reference

Inherits SourceMod::SMInterface.

Inheritance diagram for SourceMod::ITimerSystem:

[legend]
Collaboration diagram for SourceMod::ITimerSystem:
[legend]
List of all members.

Public Member Functions

const char * GetInterfaceName ()
 Must return a string defining the interface's unique name.
unsigned int GetInterfaceVersion ()
 Must return an integer defining the interface's version.
virtual ITimer * CreateTimer (ITimedEvent *pCallbacks, float fInterval, void *pData, int flags)=0
 Creates a timed event.
virtual void KillTimer (ITimer *pTimer)=0
 Kills a timer.
virtual void FireTimerOnce (ITimer *pTimer, bool delayExec=false)=0
 Arbitrarily fires a timer. If the timer is not a repeating timer, this will also kill the timer.
virtual IMapTimerSetMapTimer (IMapTimer *pTimer)=0
 Sets the interface for dealing with map time limits.
virtual void MapTimeLeftChanged ()=0
 Notification that the map's time left has changed via a change in the time limit or a change in the game rules ( such as mp_restartgame).
virtual float GetTickedTime ()=0
 Returns the current universal tick time. This replacement for gpGlobals->curtime and engine->Time() correctly keeps track of ticks.
virtual void NotifyOfGameStart (float offset=0.0f)=0
 Notification that the "starting point" in the game has has changed. This does not invoke MapTimeLeftChanged() automatically.
virtual bool GetMapTimeLeft (float *pTime)=0
 Returns the time left in the map.

Detailed Description

Definition at line 111 of file ITimerSystem.h.


Member Function Documentation

virtual ITimer* SourceMod::ITimerSystem::CreateTimer ( ITimedEvent pCallbacks,
float  fInterval,
void *  pData,
int  flags 
) [pure virtual]

Creates a timed event.

Parameters:
pCallbacks Pointer to ITimedEvent callbacks.
fInterval Interval, in seconds, of the timed event to occur. The smallest allowed interval is 0.1 seconds.
pData Private data to pass on to the timer.
flags Extra flags to pass on to the timer.
Returns:
An ITimer pointer on success, NULL on failure.

virtual void SourceMod::ITimerSystem::KillTimer ( ITimer *  pTimer  )  [pure virtual]

Kills a timer.

Parameters:
pTimer Pointer to the ITimer structure.
Returns:

virtual void SourceMod::ITimerSystem::FireTimerOnce ( ITimer *  pTimer,
bool  delayExec = false 
) [pure virtual]

Arbitrarily fires a timer. If the timer is not a repeating timer, this will also kill the timer.

Parameters:
pTimer Pointer to the ITimer structure.
delayExec If true, and the timer is repeating, the next execution will be delayed by its interval.
Returns:

virtual IMapTimer* SourceMod::ITimerSystem::SetMapTimer ( IMapTimer pTimer  )  [pure virtual]

Sets the interface for dealing with map time limits.

Parameters:
pMapTimer Map timer interface pointer.
Returns:
Old pointer.

virtual float SourceMod::ITimerSystem::GetTickedTime (  )  [pure virtual]

Returns the current universal tick time. This replacement for gpGlobals->curtime and engine->Time() correctly keeps track of ticks.

During simulation, it is incremented by the difference between gpGlobals->curtime and the last simulated tick. Otherwise, it is incremented by the interval per tick.

It is not reset past map changes.

Returns:
Universal ticked time.

virtual void SourceMod::ITimerSystem::NotifyOfGameStart ( float  offset = 0.0f  )  [pure virtual]

Notification that the "starting point" in the game has has changed. This does not invoke MapTimeLeftChanged() automatically.

Parameters:
offset Optional offset to add to the new time.

virtual bool SourceMod::ITimerSystem::GetMapTimeLeft ( float *  pTime  )  [pure virtual]

Returns the time left in the map.

Parameters:
pTime Pointer to store time left, in seconds. If there is no time limit, the number will be below 0.
Returns:
True on success, false if no support.


The documentation for this class was generated from the following file:
Generated on Fri Nov 21 05:10:05 2008 for SourceMod SDK by  doxygen 1.5.1