STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Attributes | List of all members
_Promise< _Ty > Class Template Reference

Public Member Functions

 _Promise (_Associated_state< _Ty > *_State_ptr)
 
 _Promise (_Promise &&_Other)
 
_Promiseoperator= (_Promise &&_Other)
 
 ~_Promise () _NOEXCEPT
 
void _Swap (_Promise &_Other)
 
const _State_manager< _Ty > & _Get_state () const
 
_State_manager< _Ty > & _Get_state ()
 
_State_manager< _Ty > & _Get_state_for_set ()
 
_State_manager< _Ty > & _Get_state_for_future ()
 
bool _Is_valid () const _NOEXCEPT
 
bool _Is_ready () const
 
 _Promise (const _Promise &)=delete
 
_Promiseoperator= (const _Promise &)=delete
 

Private Attributes

_State_manager< _Ty > _State
 
bool _Future_retrieved
 

Constructor & Destructor Documentation

template<class _Ty>
_Promise< _Ty >::_Promise ( _Associated_state< _Ty > *  _State_ptr)
inline
1408  : _State(_State_ptr, false),
1409  _Future_retrieved(false)
1410  { // construct from associated asynchronous state object
1411  }
bool _Future_retrieved
Definition: future:1482
_State_manager< _Ty > _State
Definition: future:1481
template<class _Ty>
_Promise< _Ty >::_Promise ( _Promise< _Ty > &&  _Other)
inline
1416  { // construct from rvalue _Promise object
1417  }
Definition: future:938
constexpr _Ty && forward(typename remove_reference< _Ty >::type &_Arg) _NOEXCEPT
Definition: type_traits:1273
bool _Future_retrieved
Definition: future:1482
_State_manager< _Ty > _State
Definition: future:1481
template<class _Ty>
_Promise< _Ty >::~_Promise ( )
inline
1427  { // destroy
1428  }
template<class _Ty>
_Promise< _Ty >::_Promise ( const _Promise< _Ty > &  )
delete

Member Function Documentation

template<class _Ty>
const _State_manager<_Ty>& _Promise< _Ty >::_Get_state ( ) const
inline
1437  { // return reference to associated asynchronous state object
1438  return (_State);
1439  }
_State_manager< _Ty > _State
Definition: future:1481
template<class _Ty>
_State_manager<_Ty>& _Promise< _Ty >::_Get_state ( )
inline
1441  { // return reference to associated asynchronous state object
1442  return (_State);
1443  }
_State_manager< _Ty > _State
Definition: future:1481
template<class _Ty>
_State_manager<_Ty>& _Promise< _Ty >::_Get_state_for_future ( )
inline
1455  { // return reference to associated asynchronous state object, or
1456  // throw exception if not valid for retrieving future
1457  if (!_State.valid())
1460  if (_Future_retrieved)
1463  _Future_retrieved = true;
1464  return (_State);
1465  }
error_code make_error_code(_Future_errc _Errno) _NOEXCEPT
Definition: future:120
_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Throw_future_error(const error_code &_Code)
bool _Future_retrieved
Definition: future:1482
_State_manager< _Ty > _State
Definition: future:1481
template<class _Ty>
_State_manager<_Ty>& _Promise< _Ty >::_Get_state_for_set ( )
inline
1446  { // return reference to associated asynchronous state object, or
1447  // throw exception if not valid for setting state
1448  if (!_State.valid())
1451  return (_State);
1452  }
error_code make_error_code(_Future_errc _Errno) _NOEXCEPT
Definition: future:120
_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Throw_future_error(const error_code &_Code)
_State_manager< _Ty > _State
Definition: future:1481
template<class _Ty>
bool _Promise< _Ty >::_Is_ready ( ) const
inline
1473  { // return status
1474  return (_State._Is_ready());
1475  }
_State_manager< _Ty > _State
Definition: future:1481
template<class _Ty>
bool _Promise< _Ty >::_Is_valid ( ) const
inline
1468  { // return status
1469  return (_State.valid());
1470  }
_State_manager< _Ty > _State
Definition: future:1481
template<class _Ty>
void _Promise< _Ty >::_Swap ( _Promise< _Ty > &  _Other)
inline
1431  { // exchange with _Other
1432  _State._Swap(_Other._State);
1434  }
void swap(promise< _Ty > &_Left, promise< _Ty > &_Right) _NOEXCEPT
Definition: future:1721
bool _Future_retrieved
Definition: future:1482
_State_manager< _Ty > _State
Definition: future:1481
template<class _Ty>
_Promise& _Promise< _Ty >::operator= ( _Promise< _Ty > &&  _Other)
inline
1420  { // assign from rvalue _Promise object
1421  _State = _STD move(_Other._State);
1423  return (*this);
1424  }
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
bool _Future_retrieved
Definition: future:1482
_State_manager< _Ty > _State
Definition: future:1481
template<class _Ty>
_Promise& _Promise< _Ty >::operator= ( const _Promise< _Ty > &  )
delete

Member Data Documentation

template<class _Ty>
bool _Promise< _Ty >::_Future_retrieved
private
template<class _Ty>
_State_manager<_Ty> _Promise< _Ty >::_State
private

The documentation for this class was generated from the following file: