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

#include <User.hpp>

Inheritance diagram for ycl::User:
Collaboration diagram for ycl::User:

List of all members.

Public Member Functions

 User ()
virtual ~User ()
void ChangeMoney (int value)
void UpdatePlayTime (const yap::Time &dt)
Public getters.
PlayerTrainerGetTrainer () const
void SetTrainer (PlayerTrainer *trainer)
const yap::StringGetLogin () const
const yap::IDGetID () const
const PlayerDataGetPlayerData () const
BattleParametersGetBattleParameters () const
Public setters.
void SetLogin (const yap::String &login)
void SetWorld (World *world)
void SendGameMessage (const yap::GameMessage &message)
void SetBattleParameters (BattleParameters *value)
IPacketHandler members.
virtual bool HandlePacket (yap::IPacket &packet)
virtual bool SendPacket (yap::IPacket &packet)
virtual void AddRelay (yap::IPacketHandler *relay)
virtual void RemoveRelay (yap::IPacketHandler *relay)
virtual void SetParent (yap::IPacketHandler *parent)
- Public Member Functions inherited from yap::IPacketHandler
virtual ~IPacketHandler ()

Public Attributes

yap::Event< const User
&, Player * > 
OnPlayerCreated
yap::Event< const User
&, Player & > 
OnPlayerWarped
yap::Event< const User
&, const yap::GameMessage & > 
OnMessageReceived
yap::Event< User & > OnBattleTriggered
yap::Event< const User & > OnPokemonTeamReceived
yap::Event< User & > OnPlayerDataReceived

Private Member Functions

 DISALLOW_COPY (User)
void HandleServerInfoSetUserPlayer (yap::IPacket &packet)
void HandleServerInfoChangeMap (yap::IPacket &packet)
void HandleServerInfoAddObject (yap::IPacket &packet)
void HandleServerInfoRemoveObject (yap::IPacket &packet)
void HandleServerInfoGameMessage (yap::IPacket &packet)
void HandleServerInfoTriggerBattle (yap::IPacket &packet)
void HandlerServerInfoPokemonTeam (yap::IPacket &packet)
void HandlerServerInfoChangeMoney (yap::IPacket &packet)
Private getters.
WorldGetWorld ()
MapGetMap ()
PlayerGetPlayer ()
Private setters.
void SetPlayer (Player *player)

Private Attributes

yap::PacketHandler packetHandler_
yap::String login_
yap::ID id_
Worldworld_
Playerplayer_
PlayerData playerData_
PlayerTrainertrainer_

Detailed Description

Definition at line 24 of file User.hpp.


Constructor & Destructor Documentation

ycl::User::User ( )

Definition at line 25 of file User.cpp.

Here is the call graph for this function:

ycl::User::~User ( )
virtual

Definition at line 44 of file User.cpp.


Member Function Documentation

void ycl::User::AddRelay ( yap::IPacketHandler relay)
virtual

Implements yap::IPacketHandler.

Definition at line 112 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::User::ChangeMoney ( int  value)

Definition at line 92 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

ycl::User::DISALLOW_COPY ( User  )
private
BattleParameters & ycl::User::GetBattleParameters ( ) const

Definition at line 148 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const yap::ID & ycl::User::GetID ( ) const

Definition at line 63 of file User.cpp.

Here is the caller graph for this function:

const yap::String & ycl::User::GetLogin ( ) const

Definition at line 58 of file User.cpp.

Here is the caller graph for this function:

Map & ycl::User::GetMap ( )
private

Definition at line 133 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Player & ycl::User::GetPlayer ( )
private

Definition at line 138 of file User.cpp.

Here is the caller graph for this function:

const PlayerData & ycl::User::GetPlayerData ( ) const

Definition at line 143 of file User.cpp.

Here is the caller graph for this function:

PlayerTrainer & ycl::User::GetTrainer ( ) const

Definition at line 48 of file User.cpp.

Here is the caller graph for this function:

World & ycl::User::GetWorld ( )
private

Definition at line 128 of file User.cpp.

Here is the caller graph for this function:

bool ycl::User::HandlePacket ( yap::IPacket packet)
virtual

Implements yap::IPacketHandler.

Definition at line 102 of file User.cpp.

Here is the call graph for this function:

void ycl::User::HandlerServerInfoChangeMoney ( yap::IPacket packet)
private

Definition at line 449 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::User::HandlerServerInfoPokemonTeam ( yap::IPacket packet)
private

Definition at line 351 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::User::HandleServerInfoAddObject ( yap::IPacket packet)
private
Warning:
[TEMPORARY]
Todo:
use dedicated visitors

Definition at line 203 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::User::HandleServerInfoChangeMap ( yap::IPacket packet)
private

Definition at line 184 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::User::HandleServerInfoGameMessage ( yap::IPacket packet)
private

Definition at line 334 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::User::HandleServerInfoRemoveObject ( yap::IPacket packet)
private

Definition at line 319 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::User::HandleServerInfoSetUserPlayer ( yap::IPacket packet)
private

Definition at line 162 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::User::HandleServerInfoTriggerBattle ( yap::IPacket packet)
private

Definition at line 346 of file User.cpp.

Here is the caller graph for this function:

void ycl::User::RemoveRelay ( yap::IPacketHandler relay)
virtual

Implements yap::IPacketHandler.

Definition at line 117 of file User.cpp.

Here is the call graph for this function:

void ycl::User::SendGameMessage ( const yap::GameMessage message)

Definition at line 81 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool ycl::User::SendPacket ( yap::IPacket packet)
virtual

Implements yap::IPacketHandler.

Definition at line 107 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::User::SetBattleParameters ( BattleParameters value)

Definition at line 159 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::User::SetLogin ( const yap::String login)

Definition at line 68 of file User.cpp.

Here is the caller graph for this function:

void ycl::User::SetParent ( yap::IPacketHandler parent)
virtual

Implements yap::IPacketHandler.

Definition at line 122 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::User::SetPlayer ( Player player)
private

Definition at line 152 of file User.cpp.

Here is the caller graph for this function:

void ycl::User::SetTrainer ( PlayerTrainer trainer)

Definition at line 53 of file User.cpp.

void ycl::User::SetWorld ( World world)

Definition at line 73 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::User::UpdatePlayTime ( const yap::Time dt)

Definition at line 97 of file User.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

yap::ID ycl::User::id_
private

Definition at line 109 of file User.hpp.

yap::String ycl::User::login_
private

Definition at line 108 of file User.hpp.

yap::Event<User&> ycl::User::OnBattleTriggered

Definition at line 74 of file User.hpp.

yap::Event<const User&, const yap::GameMessage&> ycl::User::OnMessageReceived

Definition at line 72 of file User.hpp.

yap::Event<const User&, Player*> ycl::User::OnPlayerCreated

Definition at line 70 of file User.hpp.

yap::Event<User&> ycl::User::OnPlayerDataReceived

Definition at line 76 of file User.hpp.

yap::Event<const User&, Player&> ycl::User::OnPlayerWarped

Definition at line 71 of file User.hpp.

yap::Event<const User&> ycl::User::OnPokemonTeamReceived

Definition at line 75 of file User.hpp.

yap::PacketHandler ycl::User::packetHandler_
private

Definition at line 106 of file User.hpp.

Player* ycl::User::player_
private

Definition at line 113 of file User.hpp.

PlayerData ycl::User::playerData_
private

Definition at line 114 of file User.hpp.

PlayerTrainer* ycl::User::trainer_
private

Definition at line 116 of file User.hpp.

World* ycl::User::world_
private

Definition at line 111 of file User.hpp.


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