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

#include <BaseSprite.hpp>

Inheritance diagram for yap::BaseSprite:
Collaboration diagram for yap::BaseSprite:

List of all members.

Public Member Functions

 BaseSprite ()
virtual ~BaseSprite ()
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 FloatRectGetRectangle () 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.
- Public Member Functions inherited from yap::ISprite
virtual ~ISprite ()
virtual ISpriteClone () 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::ILoadable
virtual ~ILoadable ()
- Public Member Functions inherited from yap::ICloneable
virtual ~ICloneable ()

Protected Member Functions

 BaseSprite (const BaseSprite &copy)
virtual Vector2 HandleGetSize () const
virtual void HandleMove (const Vector2 &offset)=0
virtual void HandleScale (const Vector2 &factor)=0
virtual void HandleDraw (IDrawingContext &context)=0
virtual void HandleShow (bool isVisible)=0
virtual void HandleChangeColor (const sf::Color &color)=0
virtual void HandleUpdate (const Time &dt)=0

Private Member Functions

 DISALLOW_ASSIGN (BaseSprite)

Private Attributes

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 11 of file BaseSprite.hpp.


Constructor & Destructor Documentation

yap::BaseSprite::BaseSprite ( )

Definition at line 8 of file BaseSprite.cpp.

yap::BaseSprite::~BaseSprite ( )
virtual

Definition at line 15 of file BaseSprite.cpp.

yap::BaseSprite::BaseSprite ( const BaseSprite copy)
protected

Definition at line 122 of file BaseSprite.cpp.


Member Function Documentation

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

Implements yap::IDrawable.

Definition at line 110 of file BaseSprite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements yap::IDrawable.

Definition at line 90 of file BaseSprite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const Vector2 & yap::BaseSprite::GetBottomRight ( ) const
virtual
Warning:
Temporary.

Implements yap::ISpatial.

Definition at line 36 of file BaseSprite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const Vector2 & yap::BaseSprite::GetCenter ( ) const
virtual
Warning:
Temporary.

Implements yap::ISpatial.

Definition at line 44 of file BaseSprite.cpp.

Here is the call graph for this function:

const Vector2 & yap::BaseSprite::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 19 of file BaseSprite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const sf::FloatRect & yap::BaseSprite::GetRectangle ( ) const
virtual
Warning:
Temporary.

Implements yap::ISpatial.

Definition at line 52 of file BaseSprite.cpp.

Here is the call graph for this function:

const Vector2 & yap::BaseSprite::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 24 of file BaseSprite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements yap::ISpatial.

Definition at line 31 of file BaseSprite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void yap::BaseSprite::HandleChangeColor ( const sf::Color &  color)
protectedpure virtual

Implemented in yap::AnimatedSprite, yap::SpriteSet< K >, yap::SpriteSet< yap::String >, yap::Sprite, and yap::ComposedSprite.

Here is the caller graph for this function:

virtual void yap::BaseSprite::HandleDraw ( IDrawingContext context)
protectedpure virtual

Implemented in yap::AnimatedSprite, yap::SpriteSet< K >, yap::SpriteSet< yap::String >, yap::Sprite, and yap::ComposedSprite.

Here is the caller graph for this function:

Vector2 yap::BaseSprite::HandleGetSize ( ) const
protectedvirtual

Reimplemented in yap::Sprite, yap::AnimatedSprite, yap::SpriteSet< K >, yap::SpriteSet< yap::String >, yap::SquareComposedSprite, yap::HorizontalComposedSprite, and yap::VerticalComposedSprite.

Definition at line 129 of file BaseSprite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void yap::BaseSprite::HandleMove ( const Vector2 offset)
protectedpure virtual

Implemented in yap::AnimatedSprite, yap::SpriteSet< K >, yap::SpriteSet< yap::String >, yap::Sprite, and yap::ComposedSprite.

Here is the caller graph for this function:

virtual void yap::BaseSprite::HandleScale ( const Vector2 factor)
protectedpure virtual

Implemented in yap::AnimatedSprite, yap::SpriteSet< K >, yap::SpriteSet< yap::String >, yap::Sprite, and yap::ComposedSprite.

Here is the caller graph for this function:

virtual void yap::BaseSprite::HandleShow ( bool  isVisible)
protectedpure virtual

Implemented in yap::AnimatedSprite, yap::SpriteSet< K >, yap::SpriteSet< yap::String >, yap::Sprite, and yap::ComposedSprite.

Here is the caller graph for this function:

virtual void yap::BaseSprite::HandleUpdate ( const Time dt)
protectedpure virtual

Implemented in yap::AnimatedSprite, yap::SpriteSet< K >, yap::SpriteSet< yap::String >, yap::Sprite, and yap::ComposedSprite.

Here is the caller graph for this function:

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

Implements yap::IDrawable.

Definition at line 98 of file BaseSprite.cpp.

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

Implements yap::ISpatial.

Definition at line 60 of file BaseSprite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements yap::ISpatial.

Definition at line 67 of file BaseSprite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements yap::ISpatial.

Definition at line 77 of file BaseSprite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements yap::ISpatial.

Definition at line 82 of file BaseSprite.cpp.

Here is the call graph for this function:

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

Implements yap::IDrawable.

Definition at line 103 of file BaseSprite.cpp.

Here is the call graph for this function:

void yap::BaseSprite::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 117 of file BaseSprite.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

sf::Color yap::BaseSprite::color_
private

Definition at line 76 of file BaseSprite.hpp.

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

Definition at line 72 of file BaseSprite.hpp.

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

Definition at line 71 of file BaseSprite.hpp.

bool yap::BaseSprite::isVisible_
private

Definition at line 75 of file BaseSprite.hpp.

SpatialInfo yap::BaseSprite::spatialInfo_
mutableprivate

Definition at line 74 of file BaseSprite.hpp.


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