#include <apibase.h>
ThreadReferencedError holds a pointer to an Error object which is referenced by the current thread (or referenced globally such that its lifetime is sufficiently long). It is used at some places of the API when an Error shall be passed in return values of functions: If Error was used instead, this would introduce overhead because of its reference counting and because it can't be passed in registers.
Public Member Functions | |
void | operator= (const Error *error) |
void | operator= (const ErrorPtr &error) |
const Error * | GetReferencedError () const |
operator ErrorPtr & () | |
operator NoErrorPtr & () | |
Static Public Member Functions | |
static ThreadReferencedError | CreateFromReferencedError (const Error *referencedError) |
Private Attributes | |
const Error * | _error |
Friends | |
template<typename > | |
class | ResultBase |
template<typename > | |
class | Result |
|
static |
Constructs a ThreadReferencedError from an error object which is referenced by the current thread (or referenced globally such that its lifetime is sufficiently long).
[in] | referencedError | Pointer to an error object, must not be nullptr or a pointer to a null reference. |
void operator= | ( | const Error * | error | ) |
void operator= | ( | const ErrorPtr & | error | ) |
const Error* GetReferencedError | ( | ) | const |
Returns a pointer to the wrapped Error object. This may be nullptr. If a non-null pointer is returned, then the Error itself is guaranteed to be a non-null reference.
operator ErrorPtr & | ( | ) |
operator NoErrorPtr & | ( | ) |
|
friend |
|
friend |
|
private |