WWCOMMON::ITask Interface Reference

Task Interface Class. More...

#include <interfaces/ITask.h>

Inherited by WWCLIENT::C3DSwapTask, WWCLIENT::C3DTask, WWCLIENT::CAnimateTask, WWCLIENT::CBackgroundTask, WWCLIENT::CCameraTask, WWCLIENT::CConfigTask, WWCLIENT::CGameTask, WWCLIENT::CGuiTask, WWCLIENT::CInputTask, WWCLIENT::CIntroTask, WWCLIENT::CLandscapeTask, WWCLIENT::CNetworkTask, WWCLIENT::CPacsTask, WWCLIENT::CPreGameTask, WWCLIENT::CResourceTask, WWCLIENT::CSkyTask, WWCLIENT::CTimeTask, and WWCLIENT::CWWTask.

List of all members.

Public Member Functions

 ITask ()
 ITask Constructor.
virtual void init ()=0
 Pure virtual init method.
virtual void update ()=0
 Pure virtual update method.
virtual void render ()=0
 Pure virtual render method.
virtual void release ()=0
 Pure virtual release method.
virtual std::string name ()=0
 Pure virtual name method.
virtual void stop ()
 Stops the task.
virtual void restart ()
 Restart the task.
virtual void remove ()
 Remove the task.

Private Attributes

sint32 m_Order
 Task priority.
NLMISC::CHTimer m_HTimerUpdate
 TODO Doc This.
NLMISC::CHTimer m_HTimerRender
 TODO Doc This.
char m_NameUpdate [256]
 TODO Doc This.
char m_NameRender [256]
 TODO Doc This.
bool m_Extract
 Set to true when CTaskManager is to extract it from service.
bool m_Execute
 Set to true when running, false when stopping.

Friends

class CTaskManager
struct commands_displayTasksClass

Detailed Description

Task Interface Class.

This is the interface used when designing new tasks that are manageable by the CTaskManager class.

Definition at line 57 of file ITask.h.


Constructor & Destructor Documentation

WWCOMMON::ITask::ITask (  )  [inline]

ITask Constructor.

Sets m_Extract and m_Execute values and preps the task to be started.

See also:
m_Extract
m_Execute

Definition at line 66 of file ITask.h.

References m_Execute, and m_Extract.


Member Function Documentation

virtual void WWCOMMON::ITask::init (  )  [pure virtual]
virtual std::string WWCOMMON::ITask::name (  )  [pure virtual]
virtual void WWCOMMON::ITask::release (  )  [pure virtual]
virtual void WWCOMMON::ITask::remove (  )  [inline, virtual]

Remove the task.

This method is called when something needs the implementing task to to be removed from the task manager. By default it sets m_Extract to true and m_Execute to false.

See also:
m_Extract
m_Execute

Definition at line 135 of file ITask.h.

References m_Execute, m_Extract, name(), and nlinfo.

Referenced by WWCLIENT::CPreGameTask::startGame().

virtual void WWCOMMON::ITask::render (  )  [pure virtual]
virtual void WWCOMMON::ITask::restart (  )  [inline, virtual]

Restart the task.

This method is called when something needs the implementing task to restart processing. By default it only sets m_Execute to true.

See also:
m_Execute

Definition at line 121 of file ITask.h.

References m_Execute, name(), and nlinfo.

virtual void WWCOMMON::ITask::stop ( void   )  [inline, virtual]

Stops the task.

This method is called when something needs the implementing task to stop processing. It sets m_Execute to false by default.

See also:
m_Execute

Implemented in WWCLIENT::CCameraTask, WWCLIENT::CGameTask, WWCLIENT::CNetworkTask, and WWCLIENT::CPreGameTask.

Definition at line 109 of file ITask.h.

References m_Execute, name(), and nlinfo.

Referenced by WWCLIENT::CIntroTask::handlePlayOffline().

virtual void WWCOMMON::ITask::update (  )  [pure virtual]

Friends And Related Function Documentation

friend struct commands_displayTasksClass [friend]

Definition at line 178 of file ITask.h.

friend class CTaskManager [friend]

Definition at line 177 of file ITask.h.


Member Data Documentation

Set to true when running, false when stopping.

Definition at line 175 of file ITask.h.

Referenced by WWCOMMON::CTaskManager::add(), ITask(), remove(), restart(), and stop().

Set to true when CTaskManager is to extract it from service.

Definition at line 174 of file ITask.h.

Referenced by WWCOMMON::CTaskManager::add(), ITask(), and remove().

TODO Doc This.

No documentation on this private member yet.

Definition at line 160 of file ITask.h.

Referenced by WWCOMMON::CTaskManager::add().

TODO Doc This.

No documentation on this private member yet.

Definition at line 154 of file ITask.h.

Referenced by WWCOMMON::CTaskManager::add().

char WWCOMMON::ITask::m_NameRender[256] [private]

TODO Doc This.

No documentation on this private member yet.

Definition at line 172 of file ITask.h.

Referenced by WWCOMMON::CTaskManager::add().

char WWCOMMON::ITask::m_NameUpdate[256] [private]

TODO Doc This.

No documentation on this private member yet.

Definition at line 166 of file ITask.h.

Referenced by WWCOMMON::CTaskManager::add().

Task priority.

This member defines the task's priority in the CTaskManager queue.

Definition at line 147 of file ITask.h.

Referenced by WWCOMMON::CTaskManager::add().


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

Generated on Mon Jan 11 12:04:40 2010 for Werewolf by  doxygen 1.6.1