syBR::map2syBR::EntityBase Class Reference

Base class for all entities. More...

#include <EntityBase.hpp>

Inheritance diagram for syBR::map2syBR::EntityBase:

syBR::map2syBR::EntitySolid syBR::map2syBR::EntityWorld

List of all members.

Public Types

enum  EntityType { ET_UNSPECIFIED = 0, ET_SOLID = 1, ET_WORLD = 2 }
 Various types of entities. More...

Public Member Functions

 EntityBase ()
 Constructor.
virtual ~EntityBase ()
 Destructor.
const EntityType getType () const
 Get the entity type.
virtual void compile ()=0
virtual void releaseMAP ()
 Delete MAP-based content from memory.
virtual void save ()=0
void setProperties (const PropertyList &properties)
 Set the properties of the entity.
const PropertyList & getProperties () const
 Get the properties of the entity.

Protected Member Functions

 EntityBase (const EntityType type)
 Constructor with the entity type specified.

Protected Attributes

EntityType m_type
 Entity type.
PropertyList m_properties
 MAP-based properties.

Static Protected Attributes

static const float sm_scaleFactor = 1.0f
 Scale factor used when saving.


Detailed Description

Base class for all entities.

Member Enumeration Documentation

enum syBR::map2syBR::EntityBase::EntityType

Various types of entities.

Enumerator:
ET_UNSPECIFIED  Unspecified entity type.
ET_SOLID  Solid entity i.e. entity with polygons.
ET_WORLD  World entity.


Constructor & Destructor Documentation

syBR::map2syBR::EntityBase::EntityBase (  ) 

Constructor.

syBR::map2syBR::EntityBase::~EntityBase (  )  [virtual]

Destructor.

syBR::map2syBR::EntityBase::EntityBase ( const EntityType  type  )  [protected]

Constructor with the entity type specified.

Parameters:
type Type of the entity


Member Function Documentation

const EntityBase::EntityType syBR::map2syBR::EntityBase::getType (  )  const

Get the entity type.

Returns:
Entity type

virtual void syBR::map2syBR::EntityBase::compile (  )  [pure virtual]

Implemented in syBR::map2syBR::EntityWorld.

void syBR::map2syBR::EntityBase::releaseMAP (  )  [virtual]

Delete MAP-based content from memory.

Reimplemented in syBR::map2syBR::EntitySolid, and syBR::map2syBR::EntityWorld.

virtual void syBR::map2syBR::EntityBase::save (  )  [pure virtual]

Implemented in syBR::map2syBR::EntityWorld.

void syBR::map2syBR::EntityBase::setProperties ( const PropertyList &  properties  ) 

Set the properties of the entity.

Parameters:
properties 

const PropertyList & syBR::map2syBR::EntityBase::getProperties (  )  const

Get the properties of the entity.


Member Data Documentation

const float syBR::map2syBR::EntityBase::sm_scaleFactor = 1.0f [static, protected]

Scale factor used when saving.

EntityType syBR::map2syBR::EntityBase::m_type [protected]

Entity type.

PropertyList syBR::map2syBR::EntityBase::m_properties [protected]

MAP-based properties.


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

Copyright © 2008 by Sebastien Frippiat
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008