YAPOG  0.0.1
Yet Another Pokemon Online Game
yap::Tile Class Reference

#include <Tile.hpp>

Inheritance diagram for yap::Tile:
Collaboration diagram for yap::Tile:

List of all members.

Public Member Functions

 Tile (const ID &id)
virtual ~Tile ()
const IDGetID () const
void SetID (const ID &id)
void SetSprite (ISprite *sprite)
void SetFamily (const TileFamily *family)
bool BelongsTo (const TileFamily &family) const
ISpatial members.
virtual const Vector2GetPosition () const
 Gets the coordinates in pixels of the origin of this ISpatial from the global origin.
virtual const Vector2GetSize () const
 Gets the size in pixels of this ISpatial.
virtual const Vector2GetTopLeft () const
virtual const Vector2GetBottomRight () const
virtual const Vector2GetCenter () const
virtual const sf::FloatRect & GetRectangle () const
virtual void Move (const Vector2 &offset)
virtual void Scale (const Vector2 &factor)
virtual void SetPosition (const Vector2 &position)
virtual void SetSize (const Vector2 &size)
IDrawable members.
virtual void Draw (IDrawingContext &context)
virtual bool IsVisible () const
virtual void Show (bool isVisible)
virtual void ChangeColor (const sf::Color &color)
IUpdateable members.
virtual void Update (const Time &dt)
 Makes the object evolve for one frame of the game.
ICloneable members.
virtual TileClone () const
- Public Member Functions inherited from yap::ISpatial
virtual ~ISpatial ()
- Public Member Functions inherited from yap::IDrawable
virtual ~IDrawable ()
- Public Member Functions inherited from yap::IUpdateable
virtual ~IUpdateable ()
- Public Member Functions inherited from yap::IIDLoadable
virtual ~IIDLoadable ()
- Public Member Functions inherited from yap::ICloneable
virtual ~ICloneable ()

Static Public Attributes

static const UInt32 DEFAULT_SIZE = 32

Protected Member Functions

 Tile (const Tile &copy)

Private Member Functions

 DISALLOW_ASSIGN (Tile)

Private Attributes

ID id_
ISpritesprite_
const TileFamilyfamily_
SpatialInfo spatialInfo_
bool isVisible_
sf::Color color_

Static Private Attributes

static const bool DEFAULT_VISIBLE_STATE = true
static const sf::Color DEFAULT_COLOR = sf::Color ()

Detailed Description

Definition at line 21 of file Tile.hpp.


Constructor & Destructor Documentation

yap::Tile::Tile ( const ID id)

Definition at line 10 of file Tile.cpp.

Here is the caller graph for this function:

yap::Tile::~Tile ( )
virtual

Definition at line 20 of file Tile.cpp.

yap::Tile::Tile ( const Tile copy)
protected

Definition at line 26 of file Tile.cpp.


Member Function Documentation

bool yap::Tile::BelongsTo ( const TileFamily family) const

Definition at line 61 of file Tile.cpp.

void yap::Tile::ChangeColor ( const sf::Color &  color)
virtual

Implements yap::IDrawable.

Definition at line 144 of file Tile.cpp.

Tile * yap::Tile::Clone ( ) const
virtual

Implements yap::ICloneable.

Definition at line 36 of file Tile.cpp.

Here is the call graph for this function:

yap::Tile::DISALLOW_ASSIGN ( Tile  )
private
void yap::Tile::Draw ( IDrawingContext context)
virtual

Implements yap::IDrawable.

Definition at line 126 of file Tile.cpp.

Here is the call graph for this function:

const Vector2 & yap::Tile::GetBottomRight ( ) const
virtual

Implements yap::ISpatial.

Definition at line 81 of file Tile.cpp.

Here is the call graph for this function:

const Vector2 & yap::Tile::GetCenter ( ) const
virtual

Implements yap::ISpatial.

Definition at line 86 of file Tile.cpp.

Here is the call graph for this function:

const ID & yap::Tile::GetID ( ) const

Definition at line 41 of file Tile.cpp.

const Vector2 & yap::Tile::GetPosition ( ) const
virtual

Gets the coordinates in pixels of the origin of this ISpatial from the global origin.

Returns:
The coordinates in pixels of the origin of this ISpatial from the global origin.

Implements yap::ISpatial.

Definition at line 66 of file Tile.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const sf::FloatRect & yap::Tile::GetRectangle ( ) const
virtual

Implements yap::ISpatial.

Definition at line 91 of file Tile.cpp.

Here is the call graph for this function:

const Vector2 & yap::Tile::GetSize ( ) const
virtual

Gets the size in pixels of this ISpatial.

Returns:
The size in pixels of this ISpatial.

Implements yap::ISpatial.

Definition at line 71 of file Tile.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const Vector2 & yap::Tile::GetTopLeft ( ) const
virtual

Implements yap::ISpatial.

Definition at line 76 of file Tile.cpp.

Here is the call graph for this function:

bool yap::Tile::IsVisible ( ) const
virtual

Implements yap::IDrawable.

Definition at line 134 of file Tile.cpp.

void yap::Tile::Move ( const Vector2 offset)
virtual

Implements yap::ISpatial.

Definition at line 96 of file Tile.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Tile::Scale ( const Vector2 factor)
virtual

Implements yap::ISpatial.

Definition at line 103 of file Tile.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Tile::SetFamily ( const TileFamily family)

Definition at line 56 of file Tile.cpp.

void yap::Tile::SetID ( const ID id)

Definition at line 46 of file Tile.cpp.

Here is the caller graph for this function:

void yap::Tile::SetPosition ( const Vector2 position)
virtual

Implements yap::ISpatial.

Definition at line 113 of file Tile.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::Tile::SetSize ( const Vector2 size)
virtual

Implements yap::ISpatial.

Definition at line 118 of file Tile.cpp.

Here is the call graph for this function:

void yap::Tile::SetSprite ( ISprite sprite)

Definition at line 51 of file Tile.cpp.

Here is the caller graph for this function:

void yap::Tile::Show ( bool  isVisible)
virtual

Implements yap::IDrawable.

Definition at line 139 of file Tile.cpp.

void yap::Tile::Update ( const Time dt)
virtual

Makes the object evolve for one frame of the game.

Parameters:
dtDelta time since the last frame.

Implements yap::IUpdateable.

Definition at line 149 of file Tile.cpp.

Here is the call graph for this function:


Member Data Documentation

sf::Color yap::Tile::color_
private

Definition at line 97 of file Tile.hpp.

const sf::Color yap::Tile::DEFAULT_COLOR = sf::Color ()
staticprivate

Definition at line 88 of file Tile.hpp.

const UInt32 yap::Tile::DEFAULT_SIZE = 32
static

Definition at line 30 of file Tile.hpp.

const bool yap::Tile::DEFAULT_VISIBLE_STATE = true
staticprivate

Definition at line 87 of file Tile.hpp.

const TileFamily* yap::Tile::family_
private

Definition at line 93 of file Tile.hpp.

ID yap::Tile::id_
private

Definition at line 90 of file Tile.hpp.

bool yap::Tile::isVisible_
private

Definition at line 96 of file Tile.hpp.

SpatialInfo yap::Tile::spatialInfo_
private

Definition at line 95 of file Tile.hpp.

ISprite* yap::Tile::sprite_
private

Definition at line 92 of file Tile.hpp.


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