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
virtual void objectTouchArrived(const Operation::Touch &)
Override this to get called when a Touch object arrives.
Definition: Dispatcher.h:103
virtual void objectImaginaryArrived(const Operation::Imaginary &)
Override this to get called when a Imaginary object arrives.
Definition: Dispatcher.h:109
virtual void unknownObjectArrived(const Root &)
An unknown object has arrived.
Definition: Dispatcher.h:44
virtual void objectRootArrived(const Root &)
Override this to get called when a Root object arrives.
Definition: Dispatcher.h:53
virtual void objectPerceptionArrived(const Operation::Perception &)
Override this to get called when a Perception object arrives.
Definition: Dispatcher.h:115
virtual void objectAdminEntityArrived(const Entity::AdminEntity &)
Override this to get called when a AdminEntity object arrives.
Definition: Dispatcher.h:57
virtual void dispatchObject(const Root &obj)
call right object*Arrived method
virtual void objectAffectArrived(const Operation::Affect &)
Override this to get called when a Affect object arrives.
Definition: Dispatcher.h:87
virtual void objectDeleteArrived(const Operation::Delete &)
Override this to get called when a Delete object arrives.
Definition: Dispatcher.h:83
virtual void objectWieldArrived(const Operation::Wield &)
Override this to get called when a Wield object arrives.
Definition: Dispatcher.h:91
virtual void objectAppearanceArrived(const Operation::Appearance &)
Override this to get called when a Appearance object arrives.
Definition: Dispatcher.h:119
virtual void objectRootOperationArrived(const Operation::RootOperation &)
Override this to get called when a RootOperation object arrives.
Definition: Dispatcher.h:69
virtual void objectUseArrived(const Operation::Use &)
Override this to get called when a Use object arrives.
Definition: Dispatcher.h:111
virtual void objectSmellArrived(const Operation::Smell &)
Override this to get called when a Smell object arrives.
Definition: Dispatcher.h:125
virtual void objectPerceiveArrived(const Operation::Perceive &)
Override this to get called when a Perceive object arrives.
Definition: Dispatcher.h:95
virtual void objectActionArrived(const Operation::Action &)
Override this to get called when a Action object arrives.
Definition: Dispatcher.h:71
virtual void objectInfoArrived(const Operation::Info &)
Override this to get called when a Info object arrives.
Definition: Dispatcher.h:113
virtual void objectLogoutArrived(const Operation::Logout &)
Override this to get called when a Logout object arrives.
Definition: Dispatcher.h:107
virtual void objectCommunicateArrived(const Operation::Communicate &)
Override this to get called when a Communicate object arrives.
Definition: Dispatcher.h:79
virtual void objectSniffArrived(const Operation::Sniff &)
Override this to get called when a Sniff object arrives.
Definition: Dispatcher.h:101
virtual void objectMoveArrived(const Operation::Move &)
Override this to get called when a Move object arrives.
Definition: Dispatcher.h:89
virtual void objectAccountArrived(const Entity::Account &)
Override this to get called when a Account object arrives.
Definition: Dispatcher.h:59
virtual void objectDisappearanceArrived(const Operation::Disappearance &)
Override this to get called when a Disappearance object arrives.
Definition: Dispatcher.h:121
Objects hierarchy dispatcher.
Definition: Dispatcher.h:29
virtual void objectFeelArrived(const Operation::Feel &)
Override this to get called when a Feel object arrives.
Definition: Dispatcher.h:127
The Atlas namespace.
Definition: Bridge.h:20
virtual ~Dispatcher()
Default destructor.
virtual void objectCombineArrived(const Operation::Combine &)
Override this to get called when a Combine object arrives.
Definition: Dispatcher.h:75
virtual void objectRootEntityArrived(const Entity::RootEntity &)
Override this to get called when a RootEntity object arrives.
Definition: Dispatcher.h:55
virtual void objectLookArrived(const Operation::Look &)
Override this to get called when a Look object arrives.
Definition: Dispatcher.h:97
void addMethod(int, objectArrivedPtr method)
Add a new method for Objects class defined by application.
virtual void objectDivideArrived(const Operation::Divide &)
Override this to get called when a Divide object arrives.
Definition: Dispatcher.h:77
virtual void objectGameEntityArrived(const Entity::GameEntity &)
Override this to get called when a GameEntity object arrives.
Definition: Dispatcher.h:67
virtual void objectGenericArrived(const Operation::Generic &)
Override this to get called when a Generic object arrives.
Definition: Dispatcher.h:133
Objects hierarchy decoder.
Definition: Decoder.h:31
virtual void objectAdminArrived(const Entity::Admin &)
Override this to get called when a Admin object arrives.
Definition: Dispatcher.h:63
virtual void objectListenArrived(const Operation::Listen &)
Override this to get called when a Listen object arrives.
Definition: Dispatcher.h:99
virtual void objectSightArrived(const Operation::Sight &)
Override this to get called when a Sight object arrives.
Definition: Dispatcher.h:117
Definition: Decoder.h:15
virtual void objectErrorArrived(const Operation::Error &)
Override this to get called when a Error object arrives.
Definition: Dispatcher.h:129
virtual void objectSoundArrived(const Operation::Sound &)
Override this to get called when a Sound object arrives.
Definition: Dispatcher.h:123
virtual void objectSetArrived(const Operation::Set &)
Override this to get called when a Set object arrives.
Definition: Dispatcher.h:85
virtual void objectLoginArrived(const Operation::Login &)
Override this to get called when a Login object arrives.
Definition: Dispatcher.h:105
methodMap_t m_methods
Store extension methods for Objects classes defined by application.
Definition: Dispatcher.h:41
virtual void objectAnonymousArrived(const Entity::Anonymous &)
Override this to get called when a Anonymous object arrives.
Definition: Dispatcher.h:131
virtual void objectTalkArrived(const Operation::Talk &)
Override this to get called when a Talk object arrives.
Definition: Dispatcher.h:81
virtual void objectGameArrived(const Entity::Game &)
Override this to get called when a Game object arrives.
Definition: Dispatcher.h:65
virtual void objectArrived(const Root &)
An object has arrived for dispatch.
virtual void objectPlayerArrived(const Entity::Player &)
Override this to get called when a Player object arrives.
Definition: Dispatcher.h:61
virtual void objectCreateArrived(const Operation::Create &)
Override this to get called when a Create object arrives.
Definition: Dispatcher.h:73
virtual void objectGetArrived(const Operation::Get &)
Override this to get called when a Get object arrives.
Definition: Dispatcher.h:93

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.