Atlas-C++
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Atlas::Objects::Dispatcher Class Reference

Objects hierarchy dispatcher. More...

#include <Dispatcher.h>

Inheritance diagram for Atlas::Objects::Dispatcher:
Atlas::Objects::ObjectsDecoder Atlas::Message::DecoderBase Atlas::Bridge

Public Member Functions

virtual ~Dispatcher ()
 Default destructor.
 
void addMethod (int, objectArrivedPtr method)
 Add a new method for Objects class defined by application.
 
- Public Member Functions inherited from Atlas::Objects::ObjectsDecoder
 ObjectsDecoder (Factories *f=0)
 Constructor.
 
virtual ~ObjectsDecoder ()
 Default destructor.
 
Factoriesfactories () const
 Factories accessor.
 
- Public Member Functions inherited from Atlas::Message::DecoderBase
virtual void streamBegin ()
 Begin an Atlas stream.
 
virtual void streamMessage ()
 Start a message in an Atlas stream.
 
virtual void streamEnd ()
 Ends the Atlas stream.
 
virtual void mapMapItem (const std::string &name)
 Starts a map object to the currently streamed map.
 
virtual void mapListItem (const std::string &name)
 Starts a list object to the currently streamed map.
 
virtual void mapIntItem (const std::string &name, long)
 Adds an integer to the currently streames map.
 
virtual void mapFloatItem (const std::string &name, double)
 Adds a float to the currently streamed map.
 
virtual void mapStringItem (const std::string &name, const std::string &)
 Adds a string to the currently streamed map.
 
virtual void mapEnd ()
 Ends the currently streamed map.
 
virtual void listMapItem ()
 Starts a map object in the currently streamed list.
 
virtual void listListItem ()
 Starts a list object in the currently streamed list.
 
virtual void listIntItem (long)
 Adds an integer to the currently streames list.
 
virtual void listFloatItem (double)
 Adds a float to the currently streamed list.
 
virtual void listStringItem (const std::string &)
 Adds a string to the currently streamed list.
 
virtual void listEnd ()
 Ends the currently streamed list.
 

Protected Member Functions

virtual void unknownObjectArrived (const Root &)
 An unknown object has arrived.
 
virtual void objectArrived (const Root &)
 An object has arrived for dispatch.
 
virtual void dispatchObject (const Root &obj)
 call right object*Arrived method
 
virtual void objectRootArrived (const Root &)
 Override this to get called when a Root object arrives.
 
virtual void objectRootEntityArrived (const Entity::RootEntity &)
 Override this to get called when a RootEntity object arrives.
 
virtual void objectAdminEntityArrived (const Entity::AdminEntity &)
 Override this to get called when a AdminEntity object arrives.
 
virtual void objectAccountArrived (const Entity::Account &)
 Override this to get called when a Account object arrives.
 
virtual void objectPlayerArrived (const Entity::Player &)
 Override this to get called when a Player object arrives.
 
virtual void objectAdminArrived (const Entity::Admin &)
 Override this to get called when a Admin object arrives.
 
virtual void objectGameArrived (const Entity::Game &)
 Override this to get called when a Game object arrives.
 
virtual void objectGameEntityArrived (const Entity::GameEntity &)
 Override this to get called when a GameEntity object arrives.
 
virtual void objectRootOperationArrived (const Operation::RootOperation &)
 Override this to get called when a RootOperation object arrives.
 
virtual void objectActionArrived (const Operation::Action &)
 Override this to get called when a Action object arrives.
 
virtual void objectCreateArrived (const Operation::Create &)
 Override this to get called when a Create object arrives.
 
virtual void objectCombineArrived (const Operation::Combine &)
 Override this to get called when a Combine object arrives.
 
virtual void objectDivideArrived (const Operation::Divide &)
 Override this to get called when a Divide object arrives.
 
virtual void objectCommunicateArrived (const Operation::Communicate &)
 Override this to get called when a Communicate object arrives.
 
virtual void objectTalkArrived (const Operation::Talk &)
 Override this to get called when a Talk object arrives.
 
virtual void objectDeleteArrived (const Operation::Delete &)
 Override this to get called when a Delete object arrives.
 
virtual void objectSetArrived (const Operation::Set &)
 Override this to get called when a Set object arrives.
 
virtual void objectAffectArrived (const Operation::Affect &)
 Override this to get called when a Affect object arrives.
 
virtual void objectMoveArrived (const Operation::Move &)
 Override this to get called when a Move object arrives.
 
virtual void objectWieldArrived (const Operation::Wield &)
 Override this to get called when a Wield object arrives.
 
virtual void objectGetArrived (const Operation::Get &)
 Override this to get called when a Get object arrives.
 
virtual void objectPerceiveArrived (const Operation::Perceive &)
 Override this to get called when a Perceive object arrives.
 
virtual void objectLookArrived (const Operation::Look &)
 Override this to get called when a Look object arrives.
 
virtual void objectListenArrived (const Operation::Listen &)
 Override this to get called when a Listen object arrives.
 
virtual void objectSniffArrived (const Operation::Sniff &)
 Override this to get called when a Sniff object arrives.
 
virtual void objectTouchArrived (const Operation::Touch &)
 Override this to get called when a Touch object arrives.
 
virtual void objectLoginArrived (const Operation::Login &)
 Override this to get called when a Login object arrives.
 
virtual void objectLogoutArrived (const Operation::Logout &)
 Override this to get called when a Logout object arrives.
 
virtual void objectImaginaryArrived (const Operation::Imaginary &)
 Override this to get called when a Imaginary object arrives.
 
virtual void objectUseArrived (const Operation::Use &)
 Override this to get called when a Use object arrives.
 
virtual void objectInfoArrived (const Operation::Info &)
 Override this to get called when a Info object arrives.
 
virtual void objectPerceptionArrived (const Operation::Perception &)
 Override this to get called when a Perception object arrives.
 
virtual void objectSightArrived (const Operation::Sight &)
 Override this to get called when a Sight object arrives.
 
virtual void objectAppearanceArrived (const Operation::Appearance &)
 Override this to get called when a Appearance object arrives.
 
virtual void objectDisappearanceArrived (const Operation::Disappearance &)
 Override this to get called when a Disappearance object arrives.
 
virtual void objectSoundArrived (const Operation::Sound &)
 Override this to get called when a Sound object arrives.
 
virtual void objectSmellArrived (const Operation::Smell &)
 Override this to get called when a Smell object arrives.
 
virtual void objectFeelArrived (const Operation::Feel &)
 Override this to get called when a Feel object arrives.
 
virtual void objectErrorArrived (const Operation::Error &)
 Override this to get called when a Error object arrives.
 
virtual void objectAnonymousArrived (const Entity::Anonymous &)
 Override this to get called when a Anonymous object arrives.
 
virtual void objectGenericArrived (const Operation::Generic &)
 Override this to get called when a Generic object arrives.
 
- Protected Member Functions inherited from Atlas::Objects::ObjectsDecoder
virtual void messageArrived (const Atlas::Message::MapType &)
 Overridden by to retrieve the message from DecoderBase.
 

Protected Attributes

methodMap_t m_methods
 Store extension methods for Objects classes defined by application.
 
- Protected Attributes inherited from Atlas::Objects::ObjectsDecoder
Factoriesm_factories
 
- Protected Attributes inherited from Atlas::Message::DecoderBase
std::stack< Statem_state
 The state stack.
 
std::stack< MapType > m_maps
 The map stack.
 
std::stack< ListType > m_lists
 The list stack.
 
std::stack< std::string > m_names
 Names for maps and lists.
 

Additional Inherited Members

- Protected Types inherited from Atlas::Message::DecoderBase
enum  State { STATE_STREAM, STATE_MAP, STATE_LIST }
 Our current decoding state.
 

Detailed Description

Objects hierarchy dispatcher.

This dispatcher can be bound to a codec, will assemble incoming messages, check their type, convert them into the appropriate instance in the Objects hierarchy and call the relevant member functions, which subclasses can conveniently override to pick up the object.

See also
Atlas::Objects::Encoder
Author
Stefanus Du Toit sdt@g.nosp@m.mx.n.nosp@m.et

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

Copyright 2000-2004 the respective authors.

This document can be licensed under the terms of the GNU Free Documentation License or the GNU General Public License and may be freely distributed under the terms given by one of these licenses.