CppWAMP
C++11 client library for the WAMP protocol
|
Contains the outcome of an RPC invocation. More...
#include <cppwamp/peerdata.hpp>
Public Types | |
enum | Type { Type::deferred, Type::result, Type::error } |
Enumerators representing the type of outcome being held by this object. More... | |
Public Member Functions | |
Outcome () | |
Default-constructs an outcome containing an empty Result object. More... | |
Outcome (Result result) | |
Converting constructor taking a Result object. More... | |
Outcome (std::initializer_list< Variant > args) | |
Converting constructor taking a braced initializer list of positional arguments to be stored in a Result. More... | |
Outcome (Error error) | |
Converting constructor taking an Error object. More... | |
Outcome (Deferment) | |
Converting constructor taking a deferment. More... | |
Outcome (const Outcome &other) | |
Copy constructor. More... | |
Outcome (Outcome &&other) | |
Move constructor. More... | |
~Outcome () | |
Destructor. | |
Type | type () const |
Obtains the object type being contained. | |
const Result & | asResult () const & |
Accesses the stored Result object. More... | |
Result && | asResult () && |
Steals the stored Result object. | |
const Error & | asError () const & |
Accesses the stored Error object. More... | |
Error && | asError () && |
Steals the stored Error object. | |
Outcome & | operator= (const Outcome &other) |
Copy-assignment operator. More... | |
Outcome & | operator= (Outcome &&other) |
Move-assignment operator. More... | |
Static Public Member Functions | |
static Outcome | deferred () |
Constructs an Outcome having Type::deferred. More... | |
Contains the outcome of an RPC invocation.
|
strong |
Enumerators representing the type of outcome being held by this object.
Enumerator | |
---|---|
deferred | A |
result | Contains a wamp::Result to be yielded back to the caller. |
error | Contains a wamp::Error to be yielded back to the caller. |
wamp::Outcome::Outcome | ( | ) |
Default-constructs an outcome containing an empty Result object.
this->type() == Type::result
wamp::Outcome::Outcome | ( | Result | result | ) |
Converting constructor taking a Result object.
this->type() == Type::result
wamp::Outcome::Outcome | ( | std::initializer_list< Variant > | args | ) |
Converting constructor taking a braced initializer list of positional arguments to be stored in a Result.
this->type() == Type::result
wamp::Outcome::Outcome | ( | Error | error | ) |
Converting constructor taking an Error object.
this->type() == Type::error
wamp::Outcome::Outcome | ( | Deferment | ) |
Converting constructor taking a deferment.
this->type() == Type::deferred
wamp::Outcome::Outcome | ( | const Outcome & | other | ) |
Copy constructor.
this->type() == other.type()
wamp::Outcome::Outcome | ( | wamp::Outcome && | other | ) |
Move constructor.
this->type() == other.type()
other.type() == Type::deferred
|
static |
Constructs an Outcome having Type::deferred.
Result && wamp::Outcome::asResult | ( | ) | const & |
Accesses the stored Result object.
Error && wamp::Outcome::asError | ( | ) | const & |
Accesses the stored Error object.
Copy-assignment operator.
this->type() == other.type()
Move-assignment operator.
this->type() == other.type()
other.type() == Type::deferred