Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CEGUIEventSet.h

Go to the documentation of this file.
00001 /************************************************************************
00002         filename:       CEGUIEventSet.h
00003         created:        21/2/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Defines class for a named collection of Event objects
00007 *************************************************************************/
00008 /*************************************************************************
00009     Crazy Eddie's GUI System (http://www.cegui.org.uk)
00010     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
00011 
00012     This library is free software; you can redistribute it and/or
00013     modify it under the terms of the GNU Lesser General Public
00014     License as published by the Free Software Foundation; either
00015     version 2.1 of the License, or (at your option) any later version.
00016 
00017     This library is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020     Lesser General Public License for more details.
00021 
00022     You should have received a copy of the GNU Lesser General Public
00023     License along with this library; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 // Start of CEGUI namespace section
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         // Do not allow copying, assignment, or any other usage than simple creation.
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                 Iterator stuff
00215         *************************************************************************/
00216         typedef ConstBaseIterator<EventMap>     EventIterator;
00217 
00222         EventIterator   getIterator(void) const;
00223 };
00224 
00225 } // End of  CEGUI namespace section
00226 
00227 
00228 #if defined(_MSC_VER)
00229 #       pragma warning(pop)
00230 #endif
00231 
00232 #endif  // end of guard _CEGUIEventSet_h_

Generated on Wed Feb 16 12:41:06 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1