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


Ignore:
Timestamp:
12/27/12 13:01:22 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Reorganized the code a bit

File:
1 moved

Legend:

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

    r1 r3  
    2828// either expressed or implied, of the FreeBSD Project.
    2929
    30 #ifndef XPLCOMMON_POSIXWAITABLE_H
    31 #define XPLCOMMON_POSIXWAITABLE_H
     30#ifndef XPLCOMMON_POSIX_WAITABLE_H
     31#define XPLCOMMON_POSIX_WAITABLE_H
    3232//------------------------------------------------------------------------------
    3333
    34 #include "config.h"
    35 
    36 #ifdef HAVE_POLL_H
     34namespace xplcommon { namespace posix {
    3735
    3836//------------------------------------------------------------------------------
    3937
    40 namespace xplcommon {
    41 
    42 //------------------------------------------------------------------------------
    43 
    44 class POSIXWaiter;
     38class Waiter;
    4539
    4640//------------------------------------------------------------------------------
    4741
    4842/**
    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.
    5044 *
    5145 * It is basically a file descriptor.
    5246 */
    53 class POSIXWaitable
     47class Waitable
    5448{
    5549protected:
     
    5751     * The waiter this waitable belongs to, if any.
    5852     */
    59     POSIXWaiter* waiter;
     53    Waiter* waiter;
    6054
    6155    /**
     
    7367     * Construct the waitable.
    7468     */
    75     POSIXWaitable(POSIXWaiter* waiter, int fd = -1, short events = 0);
     69    Waitable(Waiter* waiter, int fd = -1, short events = 0);
    7670
    7771public:
     
    7973     * Destroy the waitable. It will be removed from the waiter.
    8074     */
    81     virtual ~POSIXWaitable();
     75    virtual ~Waitable();
    8276
    8377    /**
     
    9690    virtual void handleEvents(short events) = 0;
    9791
    98     friend class POSIXWaiter;
     92    friend class Waiter;
    9993};
    10094
    10195//------------------------------------------------------------------------------
    10296
    103 typedef POSIXWaitable Waitable;
     97} /* namespace xplcommon::posix */ } /* namespace xplcommon */
    10498
    10599//------------------------------------------------------------------------------
    106 
    107 } /* namespace xplcommon */
    108 
    109 //------------------------------------------------------------------------------
    110 #endif // HAVE_POLL_H
    111 
    112100#endif // XPLCOMMON_POSIXWAITABLE_H
    113101
Note: See TracChangeset for help on using the changeset viewer.