23#ifdef ONIXS_BATS_BOE_CXX11
30 class FutureSharedState;
67 return state_ != ONIXS_BATS_BOE_NULLPTR;
116#ifdef ONIXS_BATS_BOE_CXX11
145 const
System::FutureSharedState *state_;
202 FutureBase::operator=(other);
206#ifdef ONIXS_BATS_BOE_CXX11
209 : FutureBase(std::move(other))
214 FutureBase::operator=(std::move(other));
227 return *
reinterpret_cast<const T *
>(
getValuePtr());
233 FutureBase::swap(other);
244 : FutureBase(state, t) {}
246 friend class Implementation::FutureHelper;
#define ONIXS_BATS_BOE_NOEXCEPT
Base implementation of SharedFuture<T>.
ONIXS_CBOE_CFE_BOE_API const void * getValuePtr() const
ONIXS_CBOE_CFE_BOE_API FutureBase(const System::FutureSharedState *state)
Initializes the instance with shared state.
ONIXS_CBOE_CFE_BOE_API ~FutureBase()
Destroys a future object.
friend class FutureHelper
bool valid() const
Check if a future instance is associated with an asynchronous result.
ONIXS_CBOE_CFE_BOE_API bool has_value() const
Returns true if the asynchronous result associated with this Future has a stored value,...
ONIXS_CBOE_CFE_BOE_API bool is_ready() const
Returns true if the asynchronous result associated with this Future is ready (has a value or exceptio...
ONIXS_CBOE_CFE_BOE_API void getVoid() const
ONIXS_CBOE_CFE_BOE_API FutureBase(const FutureBase &other)
ONIXS_CBOE_CFE_BOE_API FutureBase & operator=(const FutureBase &other)
ONIXS_CBOE_CFE_BOE_API FutureStatus::Enum wait(int timeoutInMs) const
Waits for the result to become available during the timeout.
ONIXS_CBOE_CFE_BOE_API void swap(FutureBase &other)
ONIXS_CBOE_CFE_BOE_API FutureBase(const System::FutureSharedState *state, moving_init_t)
Initializes the instance with shared state.
ONIXS_CBOE_CFE_BOE_API bool has_exception() const
Returns true if the asynchronous result associated with this Future has a stored exception,...
Represents a future result of an asynchronous operation - a result that will eventually appear in the...
SharedFuture(const SharedFuture< T > &other)
Copy constructor.
Implementation::FutureGetReturn< T >::Type get() const
Returns the result.
void swap(SharedFuture< T > &other)
swaps two SharedFuture objects
SharedFuture< T > & operator=(const SharedFuture< T > &other)
Copy assignment.
State of a SharedFuture object (similar to std::future_status,.
@ timeout
the shared state did not become ready before specified timeout duration has passed.
@ ready
the shared state is ready.
@ deferred
the shared state contains a deferred function, so the result will be computed only when explicitly re...