Inheritance diagram for rpa::target< ResultType, Allocator >::holder< PresentType >:
Public Member Functions | |
holder (const PresentType &refPresent) | |
virtual const ResultType & | result (void) |
virtual | ~holder () |
Private Types | |
typedef PresentType::future_type | future_type |
typedef PresentType::future_type rpa::target< ResultType, Allocator >::holder< PresentType >::future_type [private] |
Copying of the 'Present' garanty that the functor cannot be lost. The internal functor contains the result being calculated by the thread. The 'target' creation starts the thread, after the 'present' and its functor are properly stored for ever in the 'holder'.
rpa::target< ResultType, Allocator >::holder< PresentType >::holder | ( | const PresentType & | refPresent | ) | [inline] |
The thread when started points on the private copy of the present, and therefore the functor. All the variables that the 'target' points to are stored in 'holder'. In the future, it will be possible to return a reference.
virtual rpa::target< ResultType, Allocator >::holder< PresentType >::~holder | ( | ) | [inline, virtual] |
virtual const ResultType& rpa::target< ResultType, Allocator >::holder< PresentType >::result | ( | void | ) | [inline, virtual] |
When all internal 'result' function will return const reference, this will retrun a reference too, which is excellent.
Implements rpa::target< ResultType, Allocator >::holder_base.