39 #ifndef ORO_CORELIB_SEND_HANDLE_HPP 40 #define ORO_CORELIB_SEND_HANDLE_HPP 48 #include <boost/type_traits.hpp> 57 template<
class Signature>
59 :
public internal::CollectSignature<boost::function_traits<typename internal::CollectType<Signature>::Ft>::arity,
60 typename internal::CollectType<Signature>::Ft,
61 internal::CollectBase<Signature>* >,
62 public internal::ReturnSignature<boost::function_traits<Signature>::arity,
64 typename internal::CollectBase<Signature>::shared_ptr >
67 typedef internal::CollectSignature<boost::function_traits<typename internal::CollectType<Signature>::Ft>::arity,
94 if (this->RBase::impl && this->RBase::impl == implementation)
97 if ( !this->RBase::impl && implementation ) {
98 log(
Error) <<
"Tried to assign SendHandle from incompatible type."<< endlog();
101 if ( !this->CBase::cimpl && implementation ) {
102 log(
Error) <<
"Tried to assign SendHandle from incompatible type."<< endlog();
111 operator bool()
const {
return ready();}
117 bool ready()
const {
return this->CBase::cimpl && this->RBase::impl ;}
119 using CBase::collect;
127 return this->impl->collect();
This is the base class that defines the interface of returning data from method invocations.
SendStatus collect()
Collect this operator if the method has no arguments.
SendHandle(const SendHandle &hs)
Create a copy-equivalent SendHandle.
ft::function_type< fttype >::type Ft
internal::ReturnSignature< boost::function_traits< Signature >::arity, Signature, typename internal::CollectBase< Signature >::shared_ptr > RBase
~SendHandle()
No-op destructor, does not change signal/slot state.
boost::shared_ptr< CollectBase< F > > shared_ptr
SendHandle()
Create an empty SendHandle.
SendStatus
Returns the status of a send() or collect() invocation.
The SendHandle is used to collect the result values of an asynchronous invocation.
Returned when the result of the send() could not be collected.
An object that is executable and is freed after execution.
SendHandle & operator=(base::DisposableInterface *implementation)
This struct takes the user's Function signature F and transforms it to the form required in the Colle...
Defines ret(), given a Signature.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
internal::CollectSignature< boost::function_traits< typename internal::CollectType< Signature >::Ft >::arity, typename internal::CollectType< Signature >::Ft, internal::CollectBase< Signature > * > CBase
bool ready() const
Inspect if this SendHandle is pointing to valid (existing) invocation.
SendHandle(typename internal::CollectBase< Signature >::shared_ptr coll)