rpa::target< ResultType, Allocator >::holder< PresentType > Class Template Reference

Inheritance diagram for rpa::target< ResultType, Allocator >::holder< PresentType >:

rpa::target< ResultType, Allocator >::holder_base List of all members.

Public Member Functions

 holder (const PresentType &refPresent)
virtual const ResultType & result (void)
virtual ~holder ()

Private Types

typedef PresentType::future_type future_type

template<class ResultType, class Allocator = std::allocator< ResultType >>
template<class PresentType>
class rpa::target< ResultType, Allocator >::holder< PresentType >


Member Typedef Documentation

template<class ResultType, class Allocator = std::allocator< ResultType >>
template<class PresentType>
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'.


Constructor & Destructor Documentation

template<class ResultType, class Allocator = std::allocator< ResultType >>
template<class PresentType>
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.

template<class ResultType, class Allocator = std::allocator< ResultType >>
template<class PresentType>
virtual rpa::target< ResultType, Allocator >::holder< PresentType >::~holder (  )  [inline, virtual]


Member Function Documentation

template<class ResultType, class Allocator = std::allocator< ResultType >>
template<class PresentType>
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.


The documentation for this class was generated from the following file:
Generated on Tue Sep 25 10:20:38 2007 for rpa by  doxygen 1.4.7