#include <Pt/System/Selectable.h>
Dispatches operations through an event loop.
Inherits NonCopyable.
Inherited by TcpServer, and IODevice.
Public Member Functions | |
| virtual | ~Selectable () |
| Destructor. | |
| void | cancel () |
| Cancels all operations. | |
| void | detach () |
| Remove from event loop and cancels outstanding operations. | |
| bool | run () |
| Run operation if it is ready. | |
| void | setActive (EventLoop &parent) |
| Sets the parent loop, so that operations can be run. | |
Protected Member Functions | |
| Selectable () | |
| Default Constructor. | |
| virtual void | onAttach (EventLoop &loop)=0 |
| Attached to loop. | |
| virtual void | onCancel ()=0 |
| Blocks until operation has cancelled. | |
| virtual void | onDetach (EventLoop &loop)=0 |
| Detached from loop. | |
| virtual bool | onRun ()=0 |
| Check if ready and run. | |