Changeset 14:3caa1d3122db in xplcommon for src/xplcommon/posix/Waitable.h


Ignore:
Timestamp:
12/29/12 10:03:12 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Moved the storage of the error code to where it belongs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/xplcommon/posix/Waitable.h

    r11 r14  
    3232//------------------------------------------------------------------------------
    3333
     34#include "../Failable.h"
     35
     36#include <cerrno>
     37
     38//------------------------------------------------------------------------------
     39
    3440namespace xplcommon { namespace posix {
    3541
     
    4551 * It is basically a file descriptor.
    4652 */
    47 class Waitable
     53class Waitable : public Failable
    4854{
    4955public:
     
    118124    virtual void handleEvents(short events) = 0;
    119125
     126    /**
     127     * Set the error code from errno.
     128     */
     129    void setErrorCodeFromErrno();
     130
    120131    friend class Waiter;
    121132};
     
    146157//------------------------------------------------------------------------------
    147158
     159inline void Waitable::setErrorCodeFromErrno()
     160{
     161    setErrorCode(errno);
     162}
     163
     164//------------------------------------------------------------------------------
     165
    148166} /* namespace xplcommon::posix */ } /* namespace xplcommon */
    149167
Note: See TracChangeset for help on using the changeset viewer.