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
 
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
1396  : _State(_State_ptr, false),
1397  _Future_retrieved(false)
1398  { // construct from associated asynchronous state object
1399  }
bool _Future_retrieved
Definition: future:1467
_State_manager< _Ty > _State
Definition: future:1466
template<class _Ty>
_Promise< _Ty >::_Promise ( _Promise< _Ty > &&  _Other)
inline
1402  : _State(_STD forward<_State_manager<_Ty> >(_Other._State)),
1404  { // construct from rvalue _Promise object
1405  }
Definition: future:932
bool _Future_retrieved
Definition: future:1467
_State_manager< _Ty > _State
Definition: future:1466
template<class _Ty>
_Promise< _Ty >::~_Promise ( )
inline
1415  { // destroy
1416  }
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
1425  { // return reference to associated asynchronous state object
1426  return (_State);
1427  }
_State_manager< _Ty > _State
Definition: future:1466
template<class _Ty>
_State_manager<_Ty>& _Promise< _Ty >::_Get_state ( )
inline
1429  { // return reference to associated asynchronous state object
1430  return (_State);
1431  }
_State_manager< _Ty > _State
Definition: future:1466
template<class _Ty>
_State_manager<_Ty>& _Promise< _Ty >::_Get_state_for_future ( )
inline
1443  { // return reference to associated asynchronous state object, or
1444  // throw exception if not valid for retrieving future
1445  if (!_State.valid())
1446  _Throw_future_error(
1448  if (_Future_retrieved)
1449  _Throw_future_error(
1451  _Future_retrieved = true;
1452  return (_State);
1453  }
error_code make_error_code(_Future_errc _Errno) _NOEXCEPT
Definition: future:120
bool _Future_retrieved
Definition: future:1467
_State_manager< _Ty > _State
Definition: future:1466
template<class _Ty>
_State_manager<_Ty>& _Promise< _Ty >::_Get_state_for_set ( )
inline
1434  { // return reference to associated asynchronous state object, or
1435  // throw exception if not valid for setting state
1436  if (!_State.valid())
1437  _Throw_future_error(
1439  return (_State);
1440  }
error_code make_error_code(_Future_errc _Errno) _NOEXCEPT
Definition: future:120
_State_manager< _Ty > _State
Definition: future:1466
template<class _Ty>
bool _Promise< _Ty >::_Is_ready ( ) const
inline
1461  { // return status
1462  return (_State._Is_ready());
1463  }
_State_manager< _Ty > _State
Definition: future:1466
template<class _Ty>
bool _Promise< _Ty >::_Is_valid ( ) const
inline
1456  { // return status
1457  return (_State.valid());
1458  }
_State_manager< _Ty > _State
Definition: future:1466
template<class _Ty>
void _Promise< _Ty >::_Swap ( _Promise< _Ty > &  _Other)
inline
1419  { // exchange with _Other
1420  _State._Swap(_Other._State);
1422  }
void swap(promise< _Ty > &_Left, promise< _Ty > &_Right) _NOEXCEPT
Definition: future:1697
bool _Future_retrieved
Definition: future:1467
_State_manager< _Ty > _State
Definition: future:1466
template<class _Ty>
_Promise& _Promise< _Ty >::operator= ( _Promise< _Ty > &&  _Other)
inline
1408  { // assign from rvalue _Promise object
1409  _State = _STD move(_Other._State);
1411  return (*this);
1412  }
_OutIt move(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2447
bool _Future_retrieved
Definition: future:1467
_State_manager< _Ty > _State
Definition: future:1466
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: