Unity Scopes API
|
Allows query termination to be sent to the source of a query. More...
#include <unity/scopes/Reply.h>
Public Member Functions | |
virtual void | finished ()=0 |
Informs the source of a query that the query results are complete. More... | |
virtual void | error (std::exception_ptr ex)=0 |
Informs the source of a query that the query was terminated due to an error. More... | |
virtual | ~Reply () |
Destroys a Reply. More... | |
![]() | |
virtual std::string | endpoint ()=0 |
Returns the endpoint this proxy connects to. More... | |
virtual std::string | identity ()=0 |
Returns the identity of the target object of this proxy. More... | |
virtual std::string | category ()=0 |
Returns the category of the target object of this proxy. More... | |
virtual int64_t | timeout ()=0 |
Returns the timeout in milliseconds if this proxy is a twoway proxy. More... | |
virtual std::string | to_string ()=0 |
converts a proxy into its string representation. More... | |
Allows query termination to be sent to the source of a query.
|
virtual |
Destroys a Reply.
If a Reply goes out of scope without a prior call to finished(), the destructor implicitly calls finished(), provided QueryBase::run() has returned.
|
pure virtual |
Informs the source of a query that the query was terminated due to an error.
Multiple calls to error() and calls to finished() after error() was called are ignored.
ex | An exception_ptr indicating the cause of the error. If ex is a std::exception , the return value of what() is made available to the query source. Otherwise, the query source receives "unknown exception" . |
|
pure virtual |
Informs the source of a query that the query results are complete.
Calling finished() informs the source of a query that the final result for the query was sent, that is, that the query is complete. Multiple calls to finished() and calls to error() after finished() was called are ignored. The destructor implicitly calls finished() if a Reply goes out of scope without a prior call to finished(). Similarly, QueryBase::run() implicitly calls finished() when it returns, provided there are no more reply proxies in scope. In other words, calling finished() is optional. The scopes run time ensures that the call happens automatically, either when the last reply proxy goes out of scope, or when QueryBase::run() returns (whichever happens last).