CElement Class Reference

The base class for every element of the arena. More...

#include <CElement.h>

Inheritance diagram for CElement:

Inheritance graph
[legend]
Collaboration diagram for CElement:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 CElement ()
 Base constructor. Some member initializations.
virtual ~CElement ()
 Base destructor. Does nothing.
virtual void SetArena (CArena *pArena)
 Set link to the parent arena in which this element is.
virtual void SetDisplay (CDisplay *pDisplay)
 Set link to the display object to use.
virtual void SetSound (CSound *pSound)
 Set link to the sound object to use.
virtual bool Update (float DeltaTime)=0
 Update the element. Return whether the element should be deleted by the arena.
virtual void Display (void)=0
 Display the element.
void WriteSnapshot (CArenaSnapshot &Snapshot)
void ReadSnapshot (CArenaSnapshot &Snapshot)
bool Exist (void)
 Return whether the element exists (i.e. should be updated and displayed).

Protected Member Functions

void Create (void)
 Initialize the element. You need to call this on creation ( Create() )of the inherited class.
void Destroy (void)
 Uninitialize the element. You need to call this on destruction ( Destroy() ) of the inherited class.
virtual void OnWriteSnapshot (CArenaSnapshot &Snapshot)=0
virtual void OnReadSnapshot (CArenaSnapshot &Snapshot)=0

Protected Attributes

CArenam_pArena
 Link to the parent arena in which this element is.
CDisplaym_pDisplay
 Link to the display object to use.
CSoundm_pSound
 Link to the sound object to use.

Private Attributes

bool m_Exist
 Does the element exist? (is it created?).


Detailed Description

The base class for every element of the arena.

Constructor & Destructor Documentation

CElement::CElement ( void   ) 

Base constructor. Some member initializations.

CElement::~CElement ( void   )  [virtual]

Base destructor. Does nothing.


Member Function Documentation

void CElement::Create ( void   )  [protected]

Initialize the element. You need to call this on creation ( Create() )of the inherited class.

Here is the caller graph for this function:

void CElement::Destroy ( void   )  [protected]

Uninitialize the element. You need to call this on destruction ( Destroy() ) of the inherited class.

Reimplemented in CBomb, CBomber, CExplosion, CFloor, CItem, and CWall.

Here is the caller graph for this function:

virtual void CElement::OnWriteSnapshot ( CArenaSnapshot Snapshot  )  [protected, pure virtual]

Implemented in CBomb, CBomber, CExplosion, CFloor, CItem, and CWall.

Here is the caller graph for this function:

virtual void CElement::OnReadSnapshot ( CArenaSnapshot Snapshot  )  [protected, pure virtual]

Implemented in CBomb, CBomber, CExplosion, CFloor, CItem, and CWall.

Here is the caller graph for this function:

void CElement::SetArena ( CArena pArena  )  [inline, virtual]

Set link to the parent arena in which this element is.

Reimplemented in CBomber.

Here is the caller graph for this function:

void CElement::SetDisplay ( CDisplay pDisplay  )  [inline, virtual]

Set link to the display object to use.

Here is the caller graph for this function:

void CElement::SetSound ( CSound pSound  )  [inline, virtual]

Set link to the sound object to use.

Here is the caller graph for this function:

virtual bool CElement::Update ( float  DeltaTime  )  [pure virtual]

Update the element. Return whether the element should be deleted by the arena.

Implemented in CBomb, CBomber, CExplosion, CFloor, CItem, and CWall.

virtual void CElement::Display ( void   )  [pure virtual]

Display the element.

Implemented in CBomb, CBomber, CExplosion, CFloor, CItem, and CWall.

void CElement::WriteSnapshot ( CArenaSnapshot Snapshot  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

void CElement::ReadSnapshot ( CArenaSnapshot Snapshot  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

bool CElement::Exist ( void   )  [inline]

Return whether the element exists (i.e. should be updated and displayed).


Member Data Documentation

bool CElement::m_Exist [private]

Does the element exist? (is it created?).

CArena* CElement::m_pArena [protected]

Link to the parent arena in which this element is.

Link to the display object to use.

CSound* CElement::m_pSound [protected]

Link to the sound object to use.


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

Generated on Sat Oct 18 12:26:44 2008 for Bombermaaan by  doxygen 1.5.5
Visit the Bombermaaan project page
SourceForge.net Logo