Changeset 3:e4ca2e057cec in xplcommon for src/xplcommon/posix/Waitable.h
- Timestamp:
- 12/27/12 13:01:22 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/xplcommon/posix/Waitable.h
r1 r3 28 28 // either expressed or implied, of the FreeBSD Project. 29 29 30 #ifndef XPLCOMMON_POSIX WAITABLE_H31 #define XPLCOMMON_POSIX WAITABLE_H30 #ifndef XPLCOMMON_POSIX_WAITABLE_H 31 #define XPLCOMMON_POSIX_WAITABLE_H 32 32 //------------------------------------------------------------------------------ 33 33 34 #include "config.h" 35 36 #ifdef HAVE_POLL_H 34 namespace xplcommon { namespace posix { 37 35 38 36 //------------------------------------------------------------------------------ 39 37 40 namespace xplcommon { 41 42 //------------------------------------------------------------------------------ 43 44 class POSIXWaiter; 38 class Waiter; 45 39 46 40 //------------------------------------------------------------------------------ 47 41 48 42 /** 49 * Base class of objects for which one can wait in a POSIXWaiter.43 * Base class of objects for which one can wait in a Waiter. 50 44 * 51 45 * It is basically a file descriptor. 52 46 */ 53 class POSIXWaitable47 class Waitable 54 48 { 55 49 protected: … … 57 51 * The waiter this waitable belongs to, if any. 58 52 */ 59 POSIXWaiter* waiter;53 Waiter* waiter; 60 54 61 55 /** … … 73 67 * Construct the waitable. 74 68 */ 75 POSIXWaitable(POSIXWaiter* waiter, int fd = -1, short events = 0);69 Waitable(Waiter* waiter, int fd = -1, short events = 0); 76 70 77 71 public: … … 79 73 * Destroy the waitable. It will be removed from the waiter. 80 74 */ 81 virtual ~ POSIXWaitable();75 virtual ~Waitable(); 82 76 83 77 /** … … 96 90 virtual void handleEvents(short events) = 0; 97 91 98 friend class POSIXWaiter;92 friend class Waiter; 99 93 }; 100 94 101 95 //------------------------------------------------------------------------------ 102 96 103 typedef POSIXWaitable Waitable; 97 } /* namespace xplcommon::posix */ } /* namespace xplcommon */ 104 98 105 99 //------------------------------------------------------------------------------ 106 107 } /* namespace xplcommon */108 109 //------------------------------------------------------------------------------110 #endif // HAVE_POLL_H111 112 100 #endif // XPLCOMMON_POSIXWAITABLE_H 113 101
Note:
See TracChangeset
for help on using the changeset viewer.