YAPOG  0.0.1
Yet Another Pokemon Online Game
ycl::MapElement Class Reference

#include <MapElement.hpp>

Inheritance diagram for ycl::MapElement:
Collaboration diagram for ycl::MapElement:

List of all members.

Public Member Functions

 MapElement (const yap::ID &id)
virtual ~MapElement ()
void SetSprite (yap::ISprite *sprite)
void SetLayerDepth (int layerDepth)
ICloneable members.
virtual MapElementClone () const
IDrawable members.
virtual void Draw (yap::IDrawingContext &context)
virtual bool IsVisible () const
virtual void Show (bool isVisible)
virtual void ChangeColor (const sf::Color &color)
IDrawableWorldObject members.
virtual float GetComparisonPoint () const
 Specifies the point from which to make comparison.
virtual int GetLayerDepth () const
 Specifies the layer depth whose this IDrawableWorldObject belongs to. The layer depth is a prioritary factor for drawing order.
virtual void ChangeWorldDrawingPolicy (const yap::IWorldDrawingPolicy &worldDrawingPolicy)
 Changes the way that instance of IDrawableWorldObject is represented on the screen from its world position.
- Public Member Functions inherited from yap::MapElement
virtual void Accept (IStaticWorldObjectVisitor &visitor)
virtual void Accept (IStaticWorldObjectConstVisitor &visitor) const
- Public Member Functions inherited from yap::StaticWorldObject
virtual ~StaticWorldObject ()
virtual void Update (const Time &dt)
 Makes the object evolve for one frame of the game.
- Public Member Functions inherited from yap::WorldObject
virtual ~WorldObject ()
const IDGetID () const
void SetID (const ID &id)
void SetCollidableArea (CollidableArea *collidableArea)
void AddPhysicsBoundingBox (BoundingBox *boundingBox)
void RemovePhysicsBoundingBox (BoundingBox *boundingBox)
bool CollidesWith (const CollidableArea &collidableArea, const Vector2 &offset) const
void AdjustCollidablePosition (ICollidable &collidable) const
 Moves the ICollidable collidable to this WorldObject position. To call once when adding the ICollidable to this WorldObject.
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 const int & GetZ () const
 Gets the highness of this ISpatial3.
virtual void SetZ (int z)
 Sets the highness of this ISpatial3.
virtual const int & GetH () const
 Gets the height of this ISpatial3.
virtual void SetH (int h)
 Sets the height of this ISpatial3.
virtual bool CollidesWith (const ICollidable &other) const
virtual bool CollidesWith (const ICollidable &other, const Vector2 &offset) const
- Public Member Functions inherited from yap::ICollidable
virtual ~ICollidable ()
- Public Member Functions inherited from yap::ISpatial3
virtual ~ISpatial3 ()
- Public Member Functions inherited from yap::ISpatial
virtual ~ISpatial ()
- Public Member Functions inherited from yap::IIDLoadable
virtual ~IIDLoadable ()
- Public Member Functions inherited from yap::ICloneable
virtual ~ICloneable ()
- Public Member Functions inherited from yap::IUpdateable
virtual ~IUpdateable ()
- Public Member Functions inherited from yap::IDrawableWorldObject
virtual ~IDrawableWorldObject ()
- Public Member Functions inherited from yap::IDrawable
virtual ~IDrawable ()

Protected Member Functions

 MapElement (const MapElement &copy)
virtual void HandleUpdate (const yap::Time &dt)
virtual yap::Vector2 HandleGetSize () const
virtual void HandleMove (const yap::Vector2 &offset)
virtual void HandleDraw (yap::IDrawingContext &context)
virtual void HandleChangeColor (const sf::Color &color)
virtual float HandleGetComparisonPoint () const
virtual int HandleGetLayerDepth () const
virtual void HandleChangeWorldDrawingPolicy (const yap::IWorldDrawingPolicy &worldDrawingPolicy)
- Protected Member Functions inherited from yap::MapElement
 MapElement (const MapElement &copy)
- Protected Member Functions inherited from yap::StaticWorldObject
 StaticWorldObject (const ID &id)
 StaticWorldObject (const StaticWorldObject &copy)
- Protected Member Functions inherited from yap::WorldObject
 WorldObject (const ID &id)
 WorldObject (const WorldObject &copy)
const
PhysicsBoundingBoxCollection
GetPhysicsBoundingBoxes () const
virtual void HandleSetCollidableArea (CollidableArea *collidableArea)
virtual void HandleScale (const Vector2 &factor)
virtual void HandleSetZ (int z)
virtual void HandleSetH (int h)

Private Member Functions

 DISALLOW_ASSIGN (MapElement)

Private Attributes

bool isVisible_
sf::Color color_
int layerDepth_
const yap::IWorldDrawingPolicyworldDrawingPolicy_
yap::ISpritesprite_

Static Private Attributes

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

Detailed Description

Definition at line 15 of file MapElement.hpp.


Constructor & Destructor Documentation

ycl::MapElement::MapElement ( const yap::ID id)
explicit

Reimplemented from yap::MapElement.

Definition at line 13 of file MapElement.cpp.

Here is the caller graph for this function:

ycl::MapElement::~MapElement ( )
virtual

Reimplemented from yap::MapElement.

Definition at line 23 of file MapElement.cpp.

ycl::MapElement::MapElement ( const MapElement copy)
protected

Definition at line 29 of file MapElement.cpp.

Here is the call graph for this function:


Member Function Documentation

void ycl::MapElement::ChangeColor ( const sf::Color &  color)
virtual

Implements yap::IDrawable.

Definition at line 74 of file MapElement.cpp.

Here is the call graph for this function:

void ycl::MapElement::ChangeWorldDrawingPolicy ( const yap::IWorldDrawingPolicy worldDrawingPolicy)
virtual

Changes the way that instance of IDrawableWorldObject is represented on the screen from its world position.

Parameters:
NewIWorldDrawingPolicy to be applied.

Implements yap::IDrawableWorldObject.

Definition at line 91 of file MapElement.cpp.

Here is the call graph for this function:

MapElement * ycl::MapElement::Clone ( ) const
virtual

Reimplemented from yap::MapElement.

Definition at line 41 of file MapElement.cpp.

Here is the call graph for this function:

ycl::MapElement::DISALLOW_ASSIGN ( MapElement  )
private
void ycl::MapElement::Draw ( yap::IDrawingContext context)
virtual

Implements yap::IDrawable.

Definition at line 56 of file MapElement.cpp.

Here is the call graph for this function:

float ycl::MapElement::GetComparisonPoint ( ) const
virtual

Specifies the point from which to make comparison.

Returns:
The point from which to make comparison.

Implements yap::IDrawableWorldObject.

Definition at line 81 of file MapElement.cpp.

Here is the call graph for this function:

int ycl::MapElement::GetLayerDepth ( ) const
virtual

Specifies the layer depth whose this IDrawableWorldObject belongs to. The layer depth is a prioritary factor for drawing order.

Returns:
Layer depth

Implements yap::IDrawableWorldObject.

Definition at line 86 of file MapElement.cpp.

Here is the call graph for this function:

void ycl::MapElement::HandleChangeColor ( const sf::Color &  color)
protectedvirtual

Definition at line 134 of file MapElement.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::MapElement::HandleChangeWorldDrawingPolicy ( const yap::IWorldDrawingPolicy worldDrawingPolicy)
protectedvirtual

Definition at line 150 of file MapElement.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::MapElement::HandleDraw ( yap::IDrawingContext context)
protectedvirtual

Definition at line 128 of file MapElement.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

float ycl::MapElement::HandleGetComparisonPoint ( ) const
protectedvirtual

Definition at line 140 of file MapElement.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int ycl::MapElement::HandleGetLayerDepth ( ) const
protectedvirtual

Definition at line 145 of file MapElement.cpp.

Here is the caller graph for this function:

yap::Vector2 ycl::MapElement::HandleGetSize ( ) const
protectedvirtual

Reimplemented from yap::WorldObject.

Definition at line 107 of file MapElement.cpp.

Here is the call graph for this function:

void ycl::MapElement::HandleMove ( const yap::Vector2 offset)
protectedvirtual

Reimplemented from yap::WorldObject.

Definition at line 115 of file MapElement.cpp.

Here is the call graph for this function:

void ycl::MapElement::HandleUpdate ( const yap::Time dt)
protectedvirtual

Reimplemented from yap::StaticWorldObject.

Definition at line 99 of file MapElement.cpp.

Here is the call graph for this function:

bool ycl::MapElement::IsVisible ( ) const
virtual

Implements yap::IDrawable.

Definition at line 64 of file MapElement.cpp.

Here is the caller graph for this function:

void ycl::MapElement::SetLayerDepth ( int  layerDepth)

Definition at line 51 of file MapElement.cpp.

Here is the caller graph for this function:

void ycl::MapElement::SetSprite ( yap::ISprite sprite)

Definition at line 46 of file MapElement.cpp.

Here is the caller graph for this function:

void ycl::MapElement::Show ( bool  isVisible)
virtual

Implements yap::IDrawable.

Definition at line 69 of file MapElement.cpp.


Member Data Documentation

sf::Color ycl::MapElement::color_
private

Definition at line 83 of file MapElement.hpp.

const sf::Color ycl::MapElement::DEFAULT_COLOR = sf::Color ()
staticprivate

Definition at line 78 of file MapElement.hpp.

const int ycl::MapElement::DEFAULT_LAYER_DEPTH = 1
staticprivate

Definition at line 80 of file MapElement.hpp.

const bool ycl::MapElement::DEFAULT_VISIBLE_STATE = true
staticprivate

Definition at line 77 of file MapElement.hpp.

bool ycl::MapElement::isVisible_
private

Definition at line 82 of file MapElement.hpp.

int ycl::MapElement::layerDepth_
private

Definition at line 85 of file MapElement.hpp.

yap::ISprite* ycl::MapElement::sprite_
private

Definition at line 88 of file MapElement.hpp.

const yap::IWorldDrawingPolicy* ycl::MapElement::worldDrawingPolicy_
private

Definition at line 86 of file MapElement.hpp.


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