/[adonthell]/adonthell/src/event/types.h
ViewVC logotype

Diff of /adonthell/src/event/types.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by ksterker, Tue Mar 8 09:41:47 2005 UTC revision 1.2 by ksterker, Sun Aug 14 16:51:20 2005 UTC
# Line 30  Line 30 
30  #ifndef EVENT_TYPES_H  #ifndef EVENT_TYPES_H
31  #define EVENT_TYPES_H  #define EVENT_TYPES_H
32    
33  #include <event/manager_base.h>  #include "event/event.h"        
34  #include <base/hash_map.h>  #include <base/hash_map.h>
35    
36  namespace events {  namespace events {
37    
38    class manager_base;
39    
40  #ifndef SWIG  #ifndef SWIG
41  /**  /**
42   * Pointer to a function returning a newly allocated %event   * Pointer to a function returning a newly allocated %event
# Line 54  typedef events::event* (*new_event)(); Line 56  typedef events::event* (*new_event)();
56  class event_type  class event_type
57  {  {
58  public:  public:
     /**  
      * Destructor  
      */  
     ~event_type ()  
     {  
         delete Manager;  
     }  
59    
60      /**      /**
61       * Register a certain type of %event with the %event subsystem.       * Register a certain type of %event with the %event subsystem.
# Line 154  private: Line 149  private:
149  /**  /**
150   * A function that returns a new instance of an %event.   * A function that returns a new instance of an %event.
151   */   */
152  #define NEW_EVENT(evt)\  #define NEW_EVENT(nsp, evt)\
153      events::event* new_ ## evt () { return (events::event*) new events::evt; }      events::event* new_ ## evt () { return (events::event*) new nsp::evt; }
154  #endif // SWIG  #endif // SWIG
155    
156  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26