Changeset 24:efa33e16e135 in xplcommon
- Timestamp:
- 01/02/13 06:53:35 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/xplcommon/win32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/xplcommon/win32/Completer.h
r22 r24 32 32 //------------------------------------------------------------------------------ 33 33 34 #include "../Failable.h" 35 34 36 #include "Overlapped.h" 35 37 #include "Overlappable.h" … … 47 49 * object is created and stored in this object. 48 50 */ 49 class Completer 51 class Completer : public ::xplcommon::FailableReference<Completer> 50 52 { 51 53 protected: … … 110 112 */ 111 113 virtual void handleWaitedResult(DWORD size) = 0; 114 115 private: 116 /** 117 * Get the failable object. 118 */ 119 const ::xplcommon::Failable& getFailable() const; 120 121 /** 122 * Get the failable object. 123 */ 124 ::xplcommon::Failable& getFailable(); 125 126 friend class FailableReference<Completer>; 112 127 }; 113 128 … … 180 195 //------------------------------------------------------------------------------ 181 196 197 inline const ::xplcommon::Failable& Completer::getFailable() const 198 { 199 return overlappable; 200 } 201 202 //------------------------------------------------------------------------------ 203 204 inline ::xplcommon::Failable& Completer::getFailable() 205 { 206 return overlappable; 207 } 208 209 //------------------------------------------------------------------------------ 210 182 211 } /* namespace xplcommon::win32 */ } /* namespace xplcommon */ 183 212 -
src/xplcommon/win32/LocalAcceptor.h
r23 r24 47 47 * local server socket, i.e. named pipe. 48 48 */ 49 class LocalAcceptor : public Completer, 50 public FailableReference<LocalAcceptor> 49 class LocalAcceptor : public Completer 51 50 { 52 51 private: … … 114 113 virtual void handleWaitedResult(DWORD size); 115 114 116 private:117 /**118 * Get the failable object.119 */120 const ::xplcommon::Failable& getFailable() const;121 122 /**123 * Get the failable object.124 */125 ::xplcommon::Failable& getFailable();126 127 friend class FailableReference<LocalAcceptor>;128 115 friend class LocalServerSocket; 129 116 }; … … 163 150 //------------------------------------------------------------------------------ 164 151 165 inline const ::xplcommon::Failable& LocalAcceptor::getFailable() const166 {167 return overlappable;168 }169 170 //------------------------------------------------------------------------------171 172 inline ::xplcommon::Failable& LocalAcceptor::getFailable()173 {174 return overlappable;175 }176 177 //------------------------------------------------------------------------------178 179 152 } /* namespace xplcommon::win32 */ } /* namespace xplcommon */ 180 153 -
src/xplcommon/win32/StreamBuffer.h
r23 r24 47 47 * Base class for stream reading and writing buffers. 48 48 */ 49 class StreamBuffer : public ::xplcommon::Buffer, public Completer, 50 public ::xplcommon::FailableReference<StreamBuffer> 49 class StreamBuffer : public ::xplcommon::Buffer, public Completer 51 50 { 52 51 protected: … … 64 63 */ 65 64 BufferedStream& getStream() const; 66 67 private:68 /**69 * Get the failable object.70 */71 const ::xplcommon::Failable& getFailable() const;72 73 /**74 * Get the failable object.75 */76 ::xplcommon::Failable& getFailable();77 78 friend class FailableReference<StreamBuffer>;79 65 }; 80 66 … … 98 84 //------------------------------------------------------------------------------ 99 85 100 inline const ::xplcommon::Failable& StreamBuffer::getFailable() const101 {102 return overlappable;103 }104 105 //------------------------------------------------------------------------------106 107 inline ::xplcommon::Failable& StreamBuffer::getFailable()108 {109 return overlappable;110 }111 112 //------------------------------------------------------------------------------113 114 86 } /* namespace xplcommon::win32 */ } /* namespace xplcommon */ 115 87
Note:
See TracChangeset
for help on using the changeset viewer.