Changeset 14:3caa1d3122db in xplcommon for src/xplcommon/posix/Acceptor.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/Acceptor.h

    r11 r14  
    3434#include "../Failable.h"
    3535
     36#include "ServerSocket.h"
     37
    3638#include <cstdlib>
    3739
     
    4244//------------------------------------------------------------------------------
    4345
    44 class ServerSocket;
    45 
    46 //------------------------------------------------------------------------------
    47 
    4846/**
    4947 * Class representing the accepting of an incoming connection on a
    5048 * socket.
    5149 */
    52 class Acceptor : public ::xplcommon::Failable
     50class Acceptor : public ::xplcommon::FailableReference<Acceptor>
    5351{
    5452protected:
     
    106104     */
    107105    void connectionProcessed();
     106
     107private:
     108    /**
     109     * Get the failable object.
     110     */
     111    const ::xplcommon::Failable& getFailable() const;
     112
     113    /**
     114     * Get the failable object.
     115     */
     116    ::xplcommon::Failable& getFailable();
     117
     118    friend class FailableReference<Acceptor>;
    108119};
    109120
     
    129140//------------------------------------------------------------------------------
    130141
     142inline const ::xplcommon::Failable& Acceptor::getFailable() const
     143{
     144    return socket;
     145}
     146
     147//------------------------------------------------------------------------------
     148
     149inline ::xplcommon::Failable& Acceptor::getFailable()
     150{
     151    return socket;
     152}
     153
     154//------------------------------------------------------------------------------
     155
    131156} /* namespace xplcommon::posix */ } /* namespace xplcommon */
    132157
Note: See TracChangeset for help on using the changeset viewer.