Changeset 7:a3d84407fb9a in xplcommon for src/xplcommon/Waiter.h


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

Added the public interfaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/xplcommon/Waiter.h

    r4 r7  
    3030#ifndef XPLCOMMON_WAITER_H
    3131#define XPLCOMMON_WAITER_H
     32//------------------------------------------------------------------------------
     33
     34// The public interface of the Waiter class common to all platforms
     35#if 0
     36
     37//------------------------------------------------------------------------------
     38
     39namespace xplcommon {
     40
     41//------------------------------------------------------------------------------
     42
     43/**
     44 * Class that can be used to register waitable objects and then wait
     45 * for them. The objects are registered when they created and a Waiter
     46 * instance is passed to them.
     47 */
     48class Waiter
     49{
     50public:
     51    /**
     52     * Wait for any if the waitables to become ready or until a
     53     * timeout expires.
     54     *
     55     * If any of the waitables are ready, the function returns immediately.
     56     *
     57     * @return true if any of the waitables has become ready, false if
     58     * the timeout occurs.
     59     */
     60    bool wait(int timeout = -1);
     61};
     62
     63//------------------------------------------------------------------------------
     64
     65} /* namespace xplcommon */
     66
     67//------------------------------------------------------------------------------
     68
     69#endif // 0, The public interface of the Waiter class common to all platforms
     70
    3271//------------------------------------------------------------------------------
    3372
Note: See TracChangeset for help on using the changeset viewer.