Go to the documentation of this file.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
00027
00028
00031
00032
00033 #pragma once
00034
00035
00036 #include "../api_core.h"
00037 #include "sharedptr.h"
00038 #include "mutex.h"
00039 #include <vector>
00040
00041 class CL_EventProvider;
00042 class CL_Event_Impl;
00043
00047 class CL_API_CORE CL_Event
00048 {
00051
00052 public:
00054 CL_Event(bool manual_reset = true, bool initial_state = false);
00055
00056 CL_Event(CL_EventProvider *event_provider);
00057
00058 ~CL_Event();
00059
00060
00064
00065 public:
00067 CL_EventProvider *get_event_provider() const;
00068
00069
00073
00074 public:
00078 bool wait(int timeout = -1);
00079
00080 static int wait(int count, CL_Event const * const * events, int timeout = -1);
00081
00082 static int wait(const std::vector<CL_Event *> &events, int timeout = -1);
00083
00084 static int wait(const std::vector<CL_Event> &events, int timeout = -1);
00085
00086 static int wait(CL_Event &event1, int timeout = -1);
00087
00088 static int wait(CL_Event &event1, CL_Event &event2, int timeout = -1);
00089
00090 static int wait(CL_Event &event1, CL_Event &event2, CL_Event &event3, int timeout = -1);
00091
00092 static int wait(CL_Event &event1, CL_Event &event2, CL_Event &event3, CL_Event &event4, int timeout = -1);
00093
00094 static int wait(CL_Event &event1, CL_Event &event2, CL_Event &event3, CL_Event &event4, CL_Event &event5, int timeout = -1);
00095
00096 static int wait(CL_Event &event1, CL_Event &event2, CL_Event &event3, CL_Event &event4, CL_Event &event5, CL_Event &event6, int timeout = -1);
00097
00098 static int wait(CL_Event &event1, CL_Event &event2, CL_Event &event3, CL_Event &event4, CL_Event &event5, CL_Event &event6, CL_Event &event7, int timeout = -1);
00099
00100 static int wait(CL_Event &event1, CL_Event &event2, CL_Event &event3, CL_Event &event4, CL_Event &event5, CL_Event &event6, CL_Event &event7, CL_Event &event8, int timeout = -1);
00101
00103 void set();
00104
00106 void reset();
00107
00108
00112
00113 private:
00114 CL_SharedPtr<CL_Event_Impl> impl;
00115
00117 };
00118
00119