00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _CEGUIEventSet_h_
00027 #define _CEGUIEventSet_h_
00028
00029 #include "CEGUIBase.h"
00030 #include "CEGUIString.h"
00031 #include "CEGUIEvent.h"
00032 #include "CEGUIIteratorBase.h"
00033 #include <map>
00034
00035 #if defined (_MSC_VER)
00036 # pragma warning(push)
00037 # pragma warning(disable : 4251)
00038 #endif
00039
00040
00041
00042 namespace CEGUI
00043 {
00051 class CEGUIBASE_API EventSet
00052 {
00053 public:
00058 EventSet();
00059
00060
00065 virtual ~EventSet(void);
00066
00067
00080 void addEvent(const String& name);
00081
00082
00093 void removeEvent(const String& name);
00094
00095
00103 void removeAllEvents(void);
00104
00105
00113 bool isEventPresent(const String& name);
00114
00115
00131 virtual Event::Connection subscribeEvent(const String& name, Event::Subscriber subscriber);
00132
00133
00152 virtual Event::Connection subscribeEvent(const String& name, Event::Group group, Event::Subscriber subscriber);
00153
00154
00174 virtual void fireEvent(const String& name, EventArgs& args, const String& eventNamespace = "");
00175
00176
00185 bool isMuted(void) const;
00186
00187
00199 void setMutedState(bool setting);
00200
00201
00202 protected:
00203
00204 EventSet(EventSet& e) {}
00205 EventSet& operator=(EventSet& e) {return *this;}
00206
00207 typedef std::map<String, Event*> EventMap;
00208 EventMap d_events;
00209
00210 bool d_muted;
00211
00212 public:
00213
00214
00215
00216 typedef ConstBaseIterator<EventMap> EventIterator;
00217
00222 EventIterator getIterator(void) const;
00223 };
00224
00225 }
00226
00227
00228 #if defined(_MSC_VER)
00229 # pragma warning(pop)
00230 #endif
00231
00232 #endif // end of guard _CEGUIEventSet_h_