PVData C++
misc/pv/event.h
00001 /* event.h */
00002 /*
00003  * Copyright information and license terms for this software can be
00004  * found in the file LICENSE that is included with the distribution
00005  */
00009 #ifndef EVENT_H
00010 #define EVENT_H
00011 
00012 #include <memory>
00013 #include <vector>
00014 
00015 #include <epicsEvent.h>
00016 #include <shareLib.h>
00017 
00018 #include <pv/pvType.h>
00019 #include <pv/sharedPtr.h>
00020 
00021 
00022 namespace epics { namespace pvData { 
00023 
00024 class Event;
00025 typedef std::tr1::shared_ptr<Event> EventPtr;
00026 
00031 class epicsShareClass Event {
00032 public:
00033     POINTER_DEFINITIONS(Event);
00037     explicit Event(bool = false);
00041     ~Event();
00045     void signal();
00051     bool wait (); /* blocks until full */
00057     bool wait ( double timeOut ); /* false if empty at time out */
00062     bool tryWait (); /* false if empty */
00063 private:
00064     epicsEventId id;
00065 };
00066 
00067 }}
00068 #endif  /* EVENT_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator