Changeset 3:e4ca2e057cec in xplcommon for src/xplcommon/posix/Waiter.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/Waiter.h
r1 r3 28 28 // either expressed or implied, of the FreeBSD Project. 29 29 30 #ifndef XPLCOMMON_POSIXWAITER_H 31 #define XPLCOMMON_POSIXWAITER_H 32 //------------------------------------------------------------------------------ 33 34 #include "config.h" 35 36 #ifdef HAVE_POLL_H 37 30 #ifndef XPLCOMMON_POSIX_WAITER_H 31 #define XPLCOMMON_POSIX_WAITER_H 38 32 //------------------------------------------------------------------------------ 39 33 … … 46 40 //------------------------------------------------------------------------------ 47 41 48 namespace xplcommon { 42 namespace xplcommon { namespace posix { 49 43 50 44 //------------------------------------------------------------------------------ 51 45 52 class POSIXWaitable;46 class Waitable; 53 47 54 48 //------------------------------------------------------------------------------ … … 58 52 * for them. 59 53 */ 60 class POSIXWaiter54 class Waiter 61 55 { 62 56 private: … … 64 58 * Type for the set of waitables. 65 59 */ 66 typedef std::map<int, POSIXWaitable*> waitables_t;60 typedef std::map<int, Waitable*> waitables_t; 67 61 68 62 /** … … 80 74 * Construct the waiter. 81 75 */ 82 POSIXWaiter();76 Waiter(); 83 77 84 78 /** … … 86 80 * modified to point to no waiter. 87 81 */ 88 ~ POSIXWaiter();82 ~Waiter(); 89 83 90 84 /** … … 103 97 * Add a waitable. 104 98 */ 105 void add( POSIXWaitable* waitable);99 void add(Waitable* waitable); 106 100 107 101 /** 108 102 * Remove a waitable. 109 103 */ 110 void remove( POSIXWaitable* waitable);104 void remove(Waitable* waitable); 111 105 112 106 private: … … 134 128 void processPollFDs(const pollfd* pollFDs, size_t size); 135 129 136 friend class POSIXWaitable;130 friend class Waitable; 137 131 }; 138 139 //------------------------------------------------------------------------------140 141 typedef POSIXWaiter Waiter;142 132 143 133 //------------------------------------------------------------------------------ … … 145 135 //------------------------------------------------------------------------------ 146 136 147 inline POSIXWaiter::POSIXWaiter() :137 inline Waiter::Waiter() : 148 138 numWaitables(0) 149 139 { … … 152 142 //------------------------------------------------------------------------------ 153 143 154 } /* namespace xplcommon */144 } /* namespace xplcommon::posix */ } /* namespace xplcommon */ 155 145 156 146 //------------------------------------------------------------------------------ 157 #endif // HAVE_POLL_H 158 159 #endif // XPLCOMMON_POSIXWAITABLE_H 147 #endif // XPLCOMMON_POSIX_WAITABLE_H 160 148 161 149 // Local Variables:
Note:
See TracChangeset
for help on using the changeset viewer.