Atlas-C++
Dispatcher.h
1 // This file may be redistributed and modified only under the terms of
2 // the GNU Lesser General Public License (See COPYING for details).
3 // Copyright 2000-2001 Stefanus Du Toit and Aloril.
4 // Copyright 2001-2005 Alistair Riddoch.
5 // Automatically generated using gen_cpp.py.
6 
7 #ifndef ATLAS_OBJECTS_DISPATCHER_H
8 #define ATLAS_OBJECTS_DISPATCHER_H
9 
10 
11 #include <Atlas/Objects/Decoder.h>
12 
13 #include <Atlas/Objects/Root.h>
14 #include <Atlas/Objects/Entity.h>
15 #include <Atlas/Objects/Operation.h>
16 
17 namespace Atlas { namespace Objects {
18 
30 {
31  typedef void (Dispatcher::*objectArrivedPtr)(const Root&);
32  typedef std::map<int, objectArrivedPtr> methodMap_t;
33 public:
35  virtual ~Dispatcher();
36 
38  void addMethod(int, objectArrivedPtr method);
39 protected:
41  methodMap_t m_methods;
42 
44  virtual void unknownObjectArrived(const Root&) { }
45 
47  virtual void objectArrived(const Root&);
48 
50  virtual void dispatchObject(const Root& obj);
51 
53  virtual void objectRootArrived(const Root&) { }
59  virtual void objectAccountArrived(const Entity::Account&) { }
61  virtual void objectPlayerArrived(const Entity::Player&) { }
63  virtual void objectAdminArrived(const Entity::Admin&) { }
65  virtual void objectGameArrived(const Entity::Game&) { }
71  virtual void objectActionArrived(const Operation::Action&) { }
73  virtual void objectCreateArrived(const Operation::Create&) { }
75  virtual void objectCombineArrived(const Operation::Combine&) { }
77  virtual void objectDivideArrived(const Operation::Divide&) { }
81  virtual void objectTalkArrived(const Operation::Talk&) { }
83  virtual void objectDeleteArrived(const Operation::Delete&) { }
85  virtual void objectSetArrived(const Operation::Set&) { }
87  virtual void objectAffectArrived(const Operation::Affect&) { }
89  virtual void objectMoveArrived(const Operation::Move&) { }
91  virtual void objectWieldArrived(const Operation::Wield&) { }
93  virtual void objectGetArrived(const Operation::Get&) { }
95  virtual void objectPerceiveArrived(const Operation::Perceive&) { }
97  virtual void objectLookArrived(const Operation::Look&) { }
99  virtual void objectListenArrived(const Operation::Listen&) { }
101  virtual void objectSniffArrived(const Operation::Sniff&) { }
103  virtual void objectTouchArrived(const Operation::Touch&) { }
105  virtual void objectLoginArrived(const Operation::Login&) { }
107  virtual void objectLogoutArrived(const Operation::Logout&) { }
111  virtual void objectUseArrived(const Operation::Use&) { }
113  virtual void objectInfoArrived(const Operation::Info&) { }
117  virtual void objectSightArrived(const Operation::Sight&) { }
123  virtual void objectSoundArrived(const Operation::Sound&) { }
125  virtual void objectSmellArrived(const Operation::Smell&) { }
127  virtual void objectFeelArrived(const Operation::Feel&) { }
129  virtual void objectErrorArrived(const Operation::Error&) { }
131  virtual void objectAnonymousArrived(const Entity::Anonymous&) { }
133  virtual void objectGenericArrived(const Operation::Generic&) { }
134 };
135 
136 } } // namespace Atlas::Objects
137 
138 #endif // ATLAS_OBJECTS_DISPATCHER_H
Atlas::Objects::Dispatcher::objectDisappearanceArrived
virtual void objectDisappearanceArrived(const Operation::Disappearance &)
Override this to get called when a Disappearance object arrives.
Definition: Dispatcher.h:121
Atlas::Objects::Dispatcher::addMethod
void addMethod(int, objectArrivedPtr method)
Add a new method for Objects class defined by application.
Atlas::Objects::Dispatcher::objectTalkArrived
virtual void objectTalkArrived(const Operation::Talk &)
Override this to get called when a Talk object arrives.
Definition: Dispatcher.h:81
Atlas::Objects::Dispatcher::objectRootOperationArrived
virtual void objectRootOperationArrived(const Operation::RootOperation &)
Override this to get called when a RootOperation object arrives.
Definition: Dispatcher.h:69
Atlas::Objects::Dispatcher::objectPlayerArrived
virtual void objectPlayerArrived(const Entity::Player &)
Override this to get called when a Player object arrives.
Definition: Dispatcher.h:61
Atlas::Objects::Dispatcher::objectDivideArrived
virtual void objectDivideArrived(const Operation::Divide &)
Override this to get called when a Divide object arrives.
Definition: Dispatcher.h:77
Atlas::Objects::Dispatcher::objectSoundArrived
virtual void objectSoundArrived(const Operation::Sound &)
Override this to get called when a Sound object arrives.
Definition: Dispatcher.h:123
Atlas::Objects::Dispatcher
Objects hierarchy dispatcher.
Definition: Dispatcher.h:30
Atlas::Objects::Dispatcher::objectSightArrived
virtual void objectSightArrived(const Operation::Sight &)
Override this to get called when a Sight object arrives.
Definition: Dispatcher.h:117
Atlas::Objects::Dispatcher::objectMoveArrived
virtual void objectMoveArrived(const Operation::Move &)
Override this to get called when a Move object arrives.
Definition: Dispatcher.h:89
Atlas::Objects::Dispatcher::objectAffectArrived
virtual void objectAffectArrived(const Operation::Affect &)
Override this to get called when a Affect object arrives.
Definition: Dispatcher.h:87
Atlas::Objects::ObjectsDecoder
Objects hierarchy decoder.
Definition: Decoder.h:32
Atlas::Objects::Dispatcher::objectAccountArrived
virtual void objectAccountArrived(const Entity::Account &)
Override this to get called when a Account object arrives.
Definition: Dispatcher.h:59
Atlas::Objects::Dispatcher::objectDeleteArrived
virtual void objectDeleteArrived(const Operation::Delete &)
Override this to get called when a Delete object arrives.
Definition: Dispatcher.h:83
Atlas::Objects::SmartPtr
Definition: Decoder.h:15
Atlas::Objects::Dispatcher::objectPerceiveArrived
virtual void objectPerceiveArrived(const Operation::Perceive &)
Override this to get called when a Perceive object arrives.
Definition: Dispatcher.h:95
Atlas::Objects::Dispatcher::objectListenArrived
virtual void objectListenArrived(const Operation::Listen &)
Override this to get called when a Listen object arrives.
Definition: Dispatcher.h:99
Atlas::Objects::Dispatcher::objectUseArrived
virtual void objectUseArrived(const Operation::Use &)
Override this to get called when a Use object arrives.
Definition: Dispatcher.h:111
Atlas::Objects::Dispatcher::objectLoginArrived
virtual void objectLoginArrived(const Operation::Login &)
Override this to get called when a Login object arrives.
Definition: Dispatcher.h:105
Atlas::Objects::Dispatcher::m_methods
methodMap_t m_methods
Store extension methods for Objects classes defined by application.
Definition: Dispatcher.h:41
Atlas::Objects::Dispatcher::objectImaginaryArrived
virtual void objectImaginaryArrived(const Operation::Imaginary &)
Override this to get called when a Imaginary object arrives.
Definition: Dispatcher.h:109
Atlas::Objects::Dispatcher::~Dispatcher
virtual ~Dispatcher()
Default destructor.
Atlas::Objects::Dispatcher::objectLookArrived
virtual void objectLookArrived(const Operation::Look &)
Override this to get called when a Look object arrives.
Definition: Dispatcher.h:97
Atlas::Objects::Dispatcher::objectPerceptionArrived
virtual void objectPerceptionArrived(const Operation::Perception &)
Override this to get called when a Perception object arrives.
Definition: Dispatcher.h:115
Atlas::Objects::Dispatcher::objectErrorArrived
virtual void objectErrorArrived(const Operation::Error &)
Override this to get called when a Error object arrives.
Definition: Dispatcher.h:129
Atlas::Objects::Dispatcher::objectCombineArrived
virtual void objectCombineArrived(const Operation::Combine &)
Override this to get called when a Combine object arrives.
Definition: Dispatcher.h:75
Atlas::Objects::Dispatcher::objectGenericArrived
virtual void objectGenericArrived(const Operation::Generic &)
Override this to get called when a Generic object arrives.
Definition: Dispatcher.h:133
Atlas::Objects::Dispatcher::objectGameEntityArrived
virtual void objectGameEntityArrived(const Entity::GameEntity &)
Override this to get called when a GameEntity object arrives.
Definition: Dispatcher.h:67
Atlas::Objects::Dispatcher::objectSetArrived
virtual void objectSetArrived(const Operation::Set &)
Override this to get called when a Set object arrives.
Definition: Dispatcher.h:85
Atlas::Objects::Dispatcher::objectArrived
virtual void objectArrived(const Root &)
An object has arrived for dispatch.
Atlas::Objects::Dispatcher::objectSmellArrived
virtual void objectSmellArrived(const Operation::Smell &)
Override this to get called when a Smell object arrives.
Definition: Dispatcher.h:125
Atlas::Objects::Dispatcher::objectTouchArrived
virtual void objectTouchArrived(const Operation::Touch &)
Override this to get called when a Touch object arrives.
Definition: Dispatcher.h:103
Atlas::Objects::Dispatcher::objectSniffArrived
virtual void objectSniffArrived(const Operation::Sniff &)
Override this to get called when a Sniff object arrives.
Definition: Dispatcher.h:101
Atlas::Objects::Dispatcher::dispatchObject
virtual void dispatchObject(const Root &obj)
call right object*Arrived method
Atlas::Objects::Dispatcher::objectAppearanceArrived
virtual void objectAppearanceArrived(const Operation::Appearance &)
Override this to get called when a Appearance object arrives.
Definition: Dispatcher.h:119
Atlas::Objects::Dispatcher::objectWieldArrived
virtual void objectWieldArrived(const Operation::Wield &)
Override this to get called when a Wield object arrives.
Definition: Dispatcher.h:91
Atlas::Objects::Dispatcher::objectActionArrived
virtual void objectActionArrived(const Operation::Action &)
Override this to get called when a Action object arrives.
Definition: Dispatcher.h:71
Atlas::Objects::Dispatcher::objectInfoArrived
virtual void objectInfoArrived(const Operation::Info &)
Override this to get called when a Info object arrives.
Definition: Dispatcher.h:113
Atlas::Objects::Dispatcher::objectCommunicateArrived
virtual void objectCommunicateArrived(const Operation::Communicate &)
Override this to get called when a Communicate object arrives.
Definition: Dispatcher.h:79
Atlas
The Atlas namespace.
Definition: Bridge.h:20
Atlas::Objects::Dispatcher::objectGameArrived
virtual void objectGameArrived(const Entity::Game &)
Override this to get called when a Game object arrives.
Definition: Dispatcher.h:65
Atlas::Objects::Dispatcher::objectCreateArrived
virtual void objectCreateArrived(const Operation::Create &)
Override this to get called when a Create object arrives.
Definition: Dispatcher.h:73
Atlas::Objects::Dispatcher::objectFeelArrived
virtual void objectFeelArrived(const Operation::Feel &)
Override this to get called when a Feel object arrives.
Definition: Dispatcher.h:127
Atlas::Objects::Dispatcher::objectGetArrived
virtual void objectGetArrived(const Operation::Get &)
Override this to get called when a Get object arrives.
Definition: Dispatcher.h:93
Atlas::Objects::Dispatcher::objectAdminArrived
virtual void objectAdminArrived(const Entity::Admin &)
Override this to get called when a Admin object arrives.
Definition: Dispatcher.h:63
Atlas::Objects::Dispatcher::unknownObjectArrived
virtual void unknownObjectArrived(const Root &)
An unknown object has arrived.
Definition: Dispatcher.h:44
Atlas::Objects::Dispatcher::objectRootArrived
virtual void objectRootArrived(const Root &)
Override this to get called when a Root object arrives.
Definition: Dispatcher.h:53
Atlas::Objects::Dispatcher::objectAnonymousArrived
virtual void objectAnonymousArrived(const Entity::Anonymous &)
Override this to get called when a Anonymous object arrives.
Definition: Dispatcher.h:131
Atlas::Objects::Dispatcher::objectLogoutArrived
virtual void objectLogoutArrived(const Operation::Logout &)
Override this to get called when a Logout object arrives.
Definition: Dispatcher.h:107
Atlas::Objects::Dispatcher::objectAdminEntityArrived
virtual void objectAdminEntityArrived(const Entity::AdminEntity &)
Override this to get called when a AdminEntity object arrives.
Definition: Dispatcher.h:57
Atlas::Objects::Dispatcher::objectRootEntityArrived
virtual void objectRootEntityArrived(const Entity::RootEntity &)
Override this to get called when a RootEntity object arrives.
Definition: Dispatcher.h:55

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.