YAPOG  0.0.1
Yet Another Pokemon Online Game
yap::SpriteSet< K > Class Template Reference

Maps ISprite with keys. Represents an ISprite that changes of state over the time. More...

#include <SpriteSet.hpp>

Inheritance diagram for yap::SpriteSet< K >:
Collaboration diagram for yap::SpriteSet< K >:

List of all members.

Public Types

typedef K KeyType

Public Member Functions

 SpriteSet ()
virtual ~SpriteSet ()
void AddSprite (const KeyType &key, ISprite *sprite)
void RemoveSprite (const KeyType &key)
void SetCurrentSprite (const KeyType &key)
void SetDefaultKey (const KeyType &key)
void SetDefaultSprite ()
ICloneable members.
virtual SpriteSetClone () const
- Public Member Functions inherited from yap::BaseSprite
 BaseSprite ()
virtual ~BaseSprite ()
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)
virtual void Draw (IDrawingContext &context)
virtual bool IsVisible () const
virtual void Show (bool isVisible)
virtual void ChangeColor (const sf::Color &color)
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 ()
- 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

 SpriteSet (const SpriteSet &copy)
virtual Vector2 HandleGetSize () const
virtual void HandleMove (const Vector2 &offset)
virtual void HandleScale (const Vector2 &factor)
virtual void HandleDraw (IDrawingContext &context)
virtual void HandleShow (bool isVisible)
virtual void HandleChangeColor (const sf::Color &color)
virtual void HandleUpdate (const Time &dt)
- Protected Member Functions inherited from yap::BaseSprite
 BaseSprite (const BaseSprite &copy)

Private Member Functions

 DISALLOW_ASSIGN (SpriteSet)

Private Attributes

KeyType currentKey_
KeyType defaultKey_
ISpritecurrentSprite_
collection::Map< KeyType,
ISprite * > 
sprites_

Detailed Description

template<typename K>
class yap::SpriteSet< K >

Maps ISprite with keys. Represents an ISprite that changes of state over the time.

Definition at line 13 of file SpriteSet.hpp.


Member Typedef Documentation

template<typename K>
typedef K yap::SpriteSet< K >::KeyType

Definition at line 19 of file SpriteSet.hpp.


Constructor & Destructor Documentation

template<typename K >
yap::SpriteSet< K >::SpriteSet ( )
inline

Definition at line 7 of file SpriteSet.hxx.

template<typename K >
yap::SpriteSet< K >::~SpriteSet ( )
inlinevirtual

Definition at line 32 of file SpriteSet.hxx.

template<typename K >
yap::SpriteSet< K >::SpriteSet ( const SpriteSet< K > &  copy)
inlineprotected

Definition at line 17 of file SpriteSet.hxx.

Here is the call graph for this function:


Member Function Documentation

template<typename K >
void yap::SpriteSet< K >::AddSprite ( const KeyType key,
ISprite sprite 
)
inline

Definition at line 45 of file SpriteSet.hxx.

Here is the caller graph for this function:

template<typename K >
SpriteSet< K > * yap::SpriteSet< K >::Clone ( ) const
inlinevirtual

Reimplemented from yap::ISprite.

Definition at line 39 of file SpriteSet.hxx.

template<typename K>
yap::SpriteSet< K >::DISALLOW_ASSIGN ( SpriteSet< K >  )
private
template<typename K >
void yap::SpriteSet< K >::HandleChangeColor ( const sf::Color &  color)
inlineprotectedvirtual

Implements yap::BaseSprite.

Definition at line 122 of file SpriteSet.hxx.

template<typename K >
void yap::SpriteSet< K >::HandleDraw ( IDrawingContext context)
inlineprotectedvirtual

Implements yap::BaseSprite.

Definition at line 111 of file SpriteSet.hxx.

template<typename K >
Vector2 yap::SpriteSet< K >::HandleGetSize ( ) const
inlineprotectedvirtual

Reimplemented from yap::BaseSprite.

Definition at line 91 of file SpriteSet.hxx.

template<typename K >
void yap::SpriteSet< K >::HandleMove ( const Vector2 offset)
inlineprotectedvirtual

Implements yap::BaseSprite.

Definition at line 97 of file SpriteSet.hxx.

template<typename K >
void yap::SpriteSet< K >::HandleScale ( const Vector2 factor)
inlineprotectedvirtual

Implements yap::BaseSprite.

Definition at line 104 of file SpriteSet.hxx.

template<typename K >
void yap::SpriteSet< K >::HandleShow ( bool  isVisible)
inlineprotectedvirtual

Implements yap::BaseSprite.

Definition at line 117 of file SpriteSet.hxx.

template<typename K >
void yap::SpriteSet< K >::HandleUpdate ( const Time dt)
inlineprotectedvirtual

Implements yap::BaseSprite.

Definition at line 129 of file SpriteSet.hxx.

template<typename K >
void yap::SpriteSet< K >::RemoveSprite ( const KeyType key)
inline

Definition at line 60 of file SpriteSet.hxx.

template<typename K >
void yap::SpriteSet< K >::SetCurrentSprite ( const KeyType key)
inline

Definition at line 69 of file SpriteSet.hxx.

Here is the caller graph for this function:

template<typename K >
void yap::SpriteSet< K >::SetDefaultKey ( const KeyType key)
inline

Definition at line 79 of file SpriteSet.hxx.

Here is the caller graph for this function:

template<typename K >
void yap::SpriteSet< K >::SetDefaultSprite ( )
inline

Definition at line 85 of file SpriteSet.hxx.


Member Data Documentation

template<typename K>
KeyType yap::SpriteSet< K >::currentKey_
private

Definition at line 54 of file SpriteSet.hpp.

template<typename K>
ISprite* yap::SpriteSet< K >::currentSprite_
private

Definition at line 56 of file SpriteSet.hpp.

template<typename K>
KeyType yap::SpriteSet< K >::defaultKey_
private

Definition at line 55 of file SpriteSet.hpp.

template<typename K>
collection::Map<KeyType, ISprite*> yap::SpriteSet< K >::sprites_
private

Definition at line 57 of file SpriteSet.hpp.


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