VCF::DelegateR< ReturnType > Class Template Reference
The base calss for delegates that return a value from a function.
More...
#include <vcf/FoundationKit/Delegates.h>
Inheritance diagram for VCF::DelegateR< ReturnType >:
List of all members.
Detailed Description
template<typename ReturnType>
class VCF::DelegateR< ReturnType >
The base calss for delegates that return a value from a function.
This delegate returns a value of type ReturnType but has no arguments.
The delegate stores all the return values in a vector of type ReturnType. You can access the values via the results member variable which is marked as public.
When the invoke() method returns the results vector will have been populated with all the return values from the callbacks, stored in the order the callbacks were called in. The return result for invoke() is the return value of the last callback.
If the delegate is invoked asynchronously with beingInvoke() then if you want to get the return value(s) you need ot call either endInvoke(), or endInvokeWithResults() to get all the return values.
Member Typedef Documentation
Constructor & Destructor Documentation
Member Function Documentation
|
|
Gets the result for the AsyncResult instance that was returned by the previous call to beginInvoke().
- Returns:
- ReturnType returns the return value of the last callback.
|
|
|
Gets the results for the AsyncResult instance that was returned by the previous call to beginInvoke().
- Returns:
- Results returns an a array of results, reprepresenting all the return values for each callback that was called. The collection is a vector of ReturnType.
|
|
template<typename ReturnType> |
| virtual TypeArray VCF::DelegateR< ReturnType >::getArgumentTypes |
( |
|
) |
const [inline, virtual] |
|
|
template<typename ReturnType> |
| virtual const std::type_info& VCF::DelegateR< ReturnType >::getReturnType |
( |
|
) |
const [inline, virtual] |
|
|
|
Returns a type_info that represents the return type defined by ReturnType.
Reimplemented from VCF::FunctionTypeInfo. |
|
template<typename ReturnType> |
| ReturnType VCF::DelegateR< ReturnType >::invoke |
( |
|
) |
[inline] |
|
|
|
invokes the delegate and iterates through it's list of callbacks.
- Returns:
- ReturnType returns the return value of the last callback.
|
|
template<typename ReturnType> |
| ReturnType VCF::DelegateR< ReturnType >::operator() |
( |
|
) |
[inline] |
|
Member Data Documentation
The documentation for this class was generated from the following file: