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

#include <PacketHandler.hpp>

Inheritance diagram for yap::PacketHandler:
Collaboration diagram for yap::PacketHandler:

List of all members.

Public Types

typedef std::function< void(IPacket &)> HandlerType

Public Member Functions

 PacketHandler ()
virtual ~PacketHandler ()
void AddHandler (PacketType packetType, HandlerType action)
IPacketHandler members.
virtual bool HandlePacket (IPacket &packet)
virtual bool SendPacket (IPacket &packet)
virtual void AddRelay (IPacketHandler *relay)
virtual void RemoveRelay (IPacketHandler *relay)
virtual void SetParent (IPacketHandler *parent)
- Public Member Functions inherited from yap::IPacketHandler
virtual ~IPacketHandler ()

Private Member Functions

 DISALLOW_COPY (PacketHandler)

Private Attributes

collection::Map< PacketType,
HandlerType
handlers_
collection::List
< IPacketHandler * > 
relays_
IPacketHandlerparent_

Detailed Description

Definition at line 22 of file PacketHandler.hpp.


Member Typedef Documentation

typedef std::function<void (IPacket&)> yap::PacketHandler::HandlerType

Definition at line 28 of file PacketHandler.hpp.


Constructor & Destructor Documentation

yap::PacketHandler::PacketHandler ( )

Definition at line 8 of file PacketHandler.cpp.

yap::PacketHandler::~PacketHandler ( )
virtual

Definition at line 15 of file PacketHandler.cpp.


Member Function Documentation

void yap::PacketHandler::AddHandler ( PacketType  packetType,
HandlerType  action 
)

Definition at line 19 of file PacketHandler.cpp.

Here is the call graph for this function:

void yap::PacketHandler::AddRelay ( IPacketHandler relay)
virtual

Implements yap::IPacketHandler.

Definition at line 48 of file PacketHandler.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

yap::PacketHandler::DISALLOW_COPY ( PacketHandler  )
private
bool yap::PacketHandler::HandlePacket ( IPacket packet)
virtual

Implements yap::IPacketHandler.

Definition at line 24 of file PacketHandler.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::PacketHandler::RemoveRelay ( IPacketHandler relay)
virtual

Implements yap::IPacketHandler.

Definition at line 53 of file PacketHandler.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool yap::PacketHandler::SendPacket ( IPacket packet)
virtual

Implements yap::IPacketHandler.

Definition at line 40 of file PacketHandler.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::PacketHandler::SetParent ( IPacketHandler parent)
virtual

Implements yap::IPacketHandler.

Definition at line 58 of file PacketHandler.cpp.

Here is the caller graph for this function:


Member Data Documentation

collection::Map<PacketType, HandlerType> yap::PacketHandler::handlers_
private

Definition at line 47 of file PacketHandler.hpp.

IPacketHandler* yap::PacketHandler::parent_
private

Definition at line 50 of file PacketHandler.hpp.

collection::List<IPacketHandler*> yap::PacketHandler::relays_
private

Definition at line 49 of file PacketHandler.hpp.


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