dtGame::GMComponent Class Reference

#include <gmcomponent.h>

Inheritance diagram for dtGame::GMComponent:

dtCore::Base dtAnim::AnimationComponent dtDIS::MasterComponent dtGame::BaseInputComponent dtGame::DeadReckoningComponent dtGame::DefaultMessageProcessor dtGame::DefaultNetworkPublishingComponent dtGame::LogController dtGame::ServerLoggerComponent dtGame::TaskComponent dtHLAGM::HLAComponent dtNetGM::NetworkComponent

List of all members.

Public Member Functions

 GMComponent (const std::string &name)
 Constructor.
virtual void DispatchNetworkMessage (const Message &message)
 handles a sent a message
virtual void ProcessMessage (const Message &message)
 handles a processed a message
const GameManagerGetGameManager () const
 Gets the game manager that owns this component.
GameManagerGetGameManager ()
 Gets the game manager that owns this component.
const
GameManager::ComponentPriority
GetComponentPriority () const
 Get the priority of this component.
virtual void OnAddedToGM ()
 Called immediately after a component is added to the GM.
virtual void OnRemovedFromGM ()
 Called immediately after a component is removed from the GM.

Protected Member Functions

virtual ~GMComponent ()
 Destructor.

Friends

class GameManager


Constructor & Destructor Documentation

dtGame::GMComponent::GMComponent ( const std::string &  name  ) 

Constructor.

Parameters:
name client code must supply a unique name for this instance.

dtGame::GMComponent::~GMComponent (  )  [protected, virtual]

Destructor.


Member Function Documentation

void dtGame::GMComponent::DispatchNetworkMessage ( const Message message  )  [virtual]

handles a sent a message

Parameters:
The message

Reimplemented in dtGame::DefaultNetworkPublishingComponent, dtHLAGM::HLAComponent, and dtNetGM::NetworkComponent.

void dtGame::GMComponent::ProcessMessage ( const Message message  )  [virtual]

handles a processed a message

Parameters:
The message

Reimplemented in dtAnim::AnimationComponent, dtDIS::MasterComponent, dtGame::DeadReckoningComponent, dtGame::DefaultMessageProcessor, dtGame::DefaultNetworkPublishingComponent, dtGame::LogController, dtGame::ServerLoggerComponent, dtGame::TaskComponent, dtHLAGM::HLAComponent, dtLMS::LmsComponent, and dtNetGM::NetworkComponent.

const GameManager* dtGame::GMComponent::GetGameManager (  )  const [inline]

Gets the game manager that owns this component.

Returns:
The game manager
See also:
dtGame::GameManager

GameManager* dtGame::GMComponent::GetGameManager (  )  [inline]

Gets the game manager that owns this component.

Returns:
The game manager
See also:
dtGame::GameManager

const GameManager::ComponentPriority& dtGame::GMComponent::GetComponentPriority (  )  const [inline]

Get the priority of this component.

Returns:
the value of the priority. It is only valid when GetGameManager() is not NULL.

virtual void dtGame::GMComponent::OnAddedToGM (  )  [inline, virtual]

Called immediately after a component is added to the GM.

Override this to do init type behavior that needs access to the GameManager.

Reimplemented in dtDIS::MasterComponent, dtGame::BaseInputComponent, and dtNetGM::NetworkComponent.

virtual void dtGame::GMComponent::OnRemovedFromGM (  )  [inline, virtual]

Called immediately after a component is removed from the GM.

This is where any previously allocated memory should be deallocated, files unloaded, resources free'd, etc. This gets called when the GMComponent gets removed from the GameManager and when the GameManager gets shut down.

See also:
GameManager::RemoveComponent()

GameManager::Shutdown()

Reimplemented in dtDIS::MasterComponent, and dtGame::BaseInputComponent.


Friends And Related Function Documentation

friend class GameManager [friend]


http://www.delta3d.org
2.0.0 generated 14 Feb 2008