RTT::detail::DataSourceArgsEvent< SignatureT, FunctorT > Class Template Reference

A event which gets its arguments from a data source and is an action object. More...

#include <rtt/DataSourceArgsEvent.hpp>

Inheritance diagram for RTT::detail::DataSourceArgsEvent< SignatureT, FunctorT >:
RTT::ActionInterface

List of all members.

Public Types

typedef boost::function_traits
< SignatureT > 
traits
typedef SignatureT Signature
typedef boost::function_traits
< Signature >::result_type 
result_type
typedef ActionInterface Base
typedef boost::shared_ptr
< ActionInterface
shared_ptr
 Use this type for shared pointer storage of an ActionInterface object.

Public Member Functions

 DataSourceArgsEvent (boost::function< Signature > meth)
 DataSourceArgsEvent (typename FunctorT::shared_ptr ds)
DataSourceArgsEvent< Signature,
FunctorT > * 
create () const
template<class Arg1T >
DataSourceArgsEvent< Signature,
FunctorT > * 
create (DataSource< Arg1T > *a1) const
template<class Arg1T , class Arg2T >
DataSourceArgsEvent< Signature,
FunctorT > * 
create (DataSource< Arg1T > *a1, DataSource< Arg2T > *a2) const
template<class Arg1T , class Arg2T , class Arg3T >
DataSourceArgsEvent< Signature,
FunctorT > * 
create (DataSource< Arg1T > *a1, DataSource< Arg2T > *a2, DataSource< Arg3T > *a3) const
template<class Arg1T , class Arg2T , class Arg3T , class Arg4T >
DataSourceArgsEvent< Signature,
FunctorT > * 
create (DataSource< Arg1T > *a1, DataSource< Arg2T > *a2, DataSource< Arg3T > *a3, DataSource< Arg4T > *a4) const
template<class Arg1T , class Arg2T , class Arg3T , class Arg4T , class Arg5T >
DataSourceArgsEvent< Signature,
FunctorT > * 
create (DataSource< Arg1T > *a1, DataSource< Arg2T > *a2, DataSource< Arg3T > *a3, DataSource< Arg4T > *a4, DataSource< Arg5T > *a5) const
template<class Arg1T , class Arg2T , class Arg3T , class Arg4T , class Arg5T , class Arg6T >
DataSourceArgsEvent< Signature,
FunctorT > * 
create (DataSource< Arg1T > *a1, DataSource< Arg2T > *a2, DataSource< Arg3T > *a3, DataSource< Arg4T > *a4, DataSource< Arg5T > *a5, DataSource< Arg6T > *a6) const
bool execute ()
 Execute the functionality of this action.
void readArguments ()
 This is invoked some time before execute() at a time when the action may read its function arguments.
virtual DataSourceArgsEvent
< Signature, FunctorT > * 
clone () const
 The Clone Software Pattern.
virtual ActionInterfacecopy (std::map< const DataSourceBase *, DataSourceBase * > &alreadyCloned) const
 When copying an Orocos program, we want identical DataSource's to be mapped to identical DataSources, in order for the program to work correctly.
boost::function< Signature > getEventFunction () const
virtual void reset ()
 Reset this action.
virtual bool valid () const
 Inspect if this action was executed and valid.

Detailed Description

template<class SignatureT, class FunctorT = detail::FunctorDataSource<boost::function<SignatureT> >>
class RTT::detail::DataSourceArgsEvent< SignatureT, FunctorT >

A event which gets its arguments from a data source and is an action object.

Definition at line 55 of file DataSourceArgsEvent.hpp.


Member Function Documentation

template<class SignatureT, class FunctorT = detail::FunctorDataSource<boost::function<SignatureT> >>
virtual ActionInterface* RTT::detail::DataSourceArgsEvent< SignatureT, FunctorT >::copy ( std::map< const DataSourceBase *, DataSourceBase * > &  alreadyCloned  )  const [inline, virtual]

When copying an Orocos program, we want identical DataSource's to be mapped to identical DataSources, in order for the program to work correctly.

This is different from the clone function, where we simply want a new Action that can replace the old one directly.

This function takes a map that maps the old DataSource's onto their new replacements. This way, it is possible to check before cloning a DataSource, whether it has already been copied, and if so, reuse the existing copy.

To keep old source working, the standard implementation of this function simply calls the clone function. If your ActionInterface uses a DataSource, it is important that you reimplement this function correctly though.

Reimplemented from RTT::ActionInterface.

Definition at line 143 of file DataSourceArgsEvent.hpp.

template<class SignatureT, class FunctorT = detail::FunctorDataSource<boost::function<SignatureT> >>
bool RTT::detail::DataSourceArgsEvent< SignatureT, FunctorT >::execute (  )  [inline, virtual]

Execute the functionality of this action.

Returns:
true if the action was accepted, false otherwise

Implements RTT::ActionInterface.

Definition at line 130 of file DataSourceArgsEvent.hpp.

virtual void RTT::ActionInterface::reset (  )  [virtual, inherited]

Reset this action.

Must be used after execute() failed.

Reimplemented in RTT::DispatchAction.

virtual bool RTT::ActionInterface::valid (  )  const [virtual, inherited]

Inspect if this action was executed and valid.

This method may not be called before execute(). The default implementation returns always true, i.e. after execute(), it was executed. Override this method if it has more complex state semantics.

Reimplemented in RTT::DispatchAction.


The documentation for this class was generated from the following file:
Generated on Thu Dec 23 13:22:46 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3