Changeset 7:a3d84407fb9a in xplcommon for src/xplcommon/Thread.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/Thread.h

    r3 r7  
    3232//------------------------------------------------------------------------------
    3333
     34// The public interface of the Thread class common to all platforms
     35#if 0
     36
     37//------------------------------------------------------------------------------
     38
     39namespace xplcommon {
     40
     41//------------------------------------------------------------------------------
     42
     43/**
     44 * A thread
     45 */
     46class Thread
     47{
     48public:
     49    /**
     50     * Virtual destructor.
     51     */
     52    virtual ~Thread();
     53
     54    /**
     55     * Start the thread.
     56     *
     57     * @return if the thread could be started
     58     */
     59    bool start();
     60
     61    /**
     62     * Perform the thread's real operation. To be implemented in children
     63     */
     64    virtual void run() = 0;
     65
     66    /**
     67     * Wait for the thread to quit.
     68     */
     69    void join();
     70};
     71
     72//------------------------------------------------------------------------------
     73
     74#endif // 0, The public interface of the Thread class common to all platforms
     75
     76//------------------------------------------------------------------------------
     77
    3478#include "config.h"
    3579
Note: See TracChangeset for help on using the changeset viewer.