#include <uinput.hpp>
Inheritance diagram for ubit::UInput:
Public Member Functions | |
UInput (int source) | |
virtual void | onAction (UCall &call) |
virtual void | onInput (UCall &call) |
adds a callback that is fired when data is received. | |
virtual void | onClose (UCall &call) |
adds a callback that is fired when source is closed. | |
virtual void | open (int source) |
starts listening to the source (a file, a socket, a pipe ID). | |
virtual void | close () |
stops listening to the source. | |
int | getSource () const |
bool | isOpened () const |
returns true if the UInput is opened. | |
Friends | |
class | UNatAppli |
Example:
int source = ...; uptr<UInput> i = new UInput(source); i->onAction( ucall(x, y, printArgs) ); i->onAction( ucall(obj, val, &Demo::doIt) );
See also: USocket (Ubit simple sockets).
virtual void ubit::UInput::onInput | ( | UCall & | call | ) | [virtual] |