Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

event_trigger_generic.h

Go to the documentation of this file.
00001 
00002 #ifndef header_event_trigger_generic
00003 #define header_event_trigger_generic
00004 
00005 class CL_EventListener;
00006 
00007 class CL_EventTrigger_Generic
00008 {
00009 // Construction:
00010 public:
00011         CL_EventTrigger_Generic();
00012 
00013         virtual ~CL_EventTrigger_Generic();
00014 
00015 // Attributes:
00016 public:
00017         virtual bool get_flag() const=0;
00018 
00019 // Operations:
00020 public:
00021         virtual void reset() const=0;
00022         // Reset trigger flag.
00023 
00024         virtual void set_flag()=0;
00025         // Raise trigger flag.
00026 
00027         virtual bool wait(int timeout = -1) const=0;
00028         // Wait until one of the event triggers. The timeout is in milliseconds.
00029         // Returns true if the event triggered, false if it timed out.
00030 
00031         void add_ref();
00032         // Increase reference count.
00033 
00034         void release_ref();
00035         // Decrease reference count.
00036 
00037 // Implementation:
00038 private:
00039         int ref_count;
00040 };
00041 
00042 #endif

Generated at Wed Apr 4 19:54:00 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001