#include <Pt/Lua/AsyncCall.h>
Asynchronous native call with result type R. More...
Inherits AsyncCall.
Public Member Functions | |
| void | bind (Pt::Reflex::TypeManager &tm) |
| Binds the result type from tm. | |
| Pt::Reflex::Type * | rtype () const |
| Returns the Reflex result type, or a null pointer before bind. | |
| void | beginCall (Pt::System::EventLoop &loop) |
| Starts the call on loop. | |
| Pt::Any | getResult () |
| Returns the result after the call has finished. | |
| Pt::Signal & | finished () |
| Signal emitted when the call is ready or has failed. | |
| void | cancel () |
| Cancels the call. | |
| bool | hasError () const |
| Returns true when the call stored an error. | |
| const std::string & | errorMessage () const |
| Returns the stored error text. | |
BasicAsyncCall looks up typeid(R) at bind time. Override onBeginCall() to start work on the loop, onResult() to produce R, and onCancel() to abort. Call setReady() or setError() when the work ends.