#include <rtt/DataSourceArgsMethod.hpp>

Definition at line 55 of file DataSourceArgsMethod.hpp.
Public Types | |
|
typedef boost::function_traits < SignatureT > | traits |
| typedef SignatureT | Signature |
|
typedef boost::function_traits < Signature > ::result_type | result_type |
|
typedef DataSource < result_type > | Base |
|
typedef boost::remove_const < typename boost::remove_reference < T >::type >::type | value_t |
| The bare type of T is extracted into value_t. | |
| typedef T | result_t |
|
typedef boost::intrusive_ptr < DataSource< T > > | shared_ptr |
| Use this type to store a pointer to a DataSourceBase. | |
|
typedef boost::intrusive_ptr < const DataSource < T > > | const_ptr |
| Use this type to store a const pointer to a DataSourceBase. | |
Public Member Functions | |
| DataSourceArgsMethod (boost::function< Signature > meth) | |
| DataSourceArgsMethod (typename FunctorT::shared_ptr ds) | |
|
DataSourceArgsMethod < Signature, FunctorT > * | create () const |
| template<class Arg1T> | |
| DataSourceArgsMethod < Signature, FunctorT > * | create (DataSource< Arg1T > *a1) const |
| template<class Arg1T, class Arg2T> | |
| DataSourceArgsMethod < Signature, FunctorT > * | create (DataSource< Arg1T > *a1, DataSource< Arg2T > *a2) const |
| template<class Arg1T, class Arg2T, class Arg3T> | |
| DataSourceArgsMethod < Signature, FunctorT > * | create (DataSource< Arg1T > *a1, DataSource< Arg2T > *a2, DataSource< Arg3T > *a3) const |
| template<class Arg1T, class Arg2T, class Arg3T, class Arg4T> | |
| DataSourceArgsMethod < 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> | |
| DataSourceArgsMethod < 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> | |
| DataSourceArgsMethod < Signature, FunctorT > * | create (DataSource< Arg1T > *a1, DataSource< Arg2T > *a2, DataSource< Arg3T > *a3, DataSource< Arg4T > *a4, DataSource< Arg5T > *a5, DataSource< Arg6T > *a6) const |
| result_type | operator() () |
| virtual result_type | get () const |
| Return the data as type T. | |
| virtual result_type | value () const |
| Return the result of the last evaluate() function. | |
| virtual DataSourceArgsMethod < Signature, FunctorT > * | clone () const |
| Return a shallow clone of this DataSource. | |
| virtual DataSource < result_type > * | copy (std::map< const DataSourceBase *, DataSourceBase * > &alreadyCloned) const |
| Create a deep copy of this DataSource, unless it is already cloned. | |
|
boost::function < Signature > | getMethodFunction () const |
| virtual bool | evaluate () const |
| Force an evaluation of the DataSourceBase. | |
| virtual std::string | getType () const |
| Return useful type info in a human readable format. | |
| virtual const TypeInfo * | getTypeInfo () const |
| Return the Orocos type info object. | |
| virtual std::string | getTypeName () const |
| Return the Orocos type name, without const, pointer or reference qualifiers. | |
| void | ref () const |
| Increase the reference count by one. | |
| void | deref () const |
| Decrease the reference count by one and delete this on zero. | |
| virtual void | reset () |
| Reset the data to initial values. | |
| virtual void | updated () |
| In case the DataSource returns a 'reference' type, call this method to notify it that the data was updated in the course of an invocation of get(). | |
| virtual bool | update (DataSourceBase *other) |
| Update the value of this DataSource with the value of an other DataSource. | |
| virtual CommandInterface * | updateCommand (DataSourceBase *other) |
| Generate a CommandInterface object which will update this DataSource with the value of another DataSource when execute()'ed. | |
| virtual bool | updatePart (DataSourceBase *part, DataSourceBase *other) |
| Update part of the value of this DataSource with the value of an other DataSource. | |
| virtual CommandInterface * | updatePartCommand (DataSourceBase *part, DataSourceBase *other) |
| Generate a CommandInterface object which will partially update this DataSource with the value of another DataSource when execute()'ed. | |
| std::ostream & | write (std::ostream &os) |
| Stream the contents of this object. | |
| std::string | toString () |
| Get the contents of this object as a string. | |
| bool | decomposeType (PropertyBag &targetbag) |
| Decompose the contents of this object into properties. | |
| bool | composeType (DataSourceBase::shared_ptr source) |
| Compose the contents of this object from another datasource. | |
| virtual void * | createBlob (int protocol) |
| Creates a transportable data object with the current value of this DataSource. | |
| virtual void * | getBlob (int protocol) |
| Creates a transportable data object with the current value of this DataSource. | |
| virtual bool | updateBlob (int protocol, const void *data) |
| Updates the value of this DataSource with the value of a transportable data object. | |
| virtual int | serverProtocol () const |
| Inspect if this DataSource is a proxy for a remote server object. | |
| virtual void * | server (int protocol, void *arg) |
| Create an object server which 'mirrors' this DataSource. | |
| virtual void * | method (int protocol, MethodC *orig, void *arg) |
| Create an object server which 'mirrors' this DataSource. | |
Static Public Member Functions | |
| static std::string | GetType () |
| Return usefull type info in a human readable format. | |
| static const TypeInfo * | GetTypeInfo () |
| Return the Orocos type info. | |
| static std::string | GetTypeName () |
| Return the Orocos type name, without const, pointer or reference qualifiers. | |
| static DataSource< T > * | narrow (DataSourceBase *db) |
| This method narrows a DataSourceBase to a typeded DataSource, possibly returning a new object. | |
Protected Attributes | |
| oro_atomic_t | refcount |
| We keep the refcount ourselves. | |
| virtual DataSourceArgsMethod<Signature,FunctorT>* clone | ( | ) | const [inline, virtual] |
Return a shallow clone of this DataSource.
This method returns a duplicate of this instance which re-uses the DataSources this DataSource holds reference to. The clone() function is thus a non-deep copy.
Implements DataSource.
Definition at line 142 of file DataSourceArgsMethod.hpp.
References DataSourceArgsMethod::DataSourceArgsMethod().
Referenced by DataSourceArgsMethod::create().
| virtual DataSource<result_type>* copy | ( | std::map< const DataSourceBase *, DataSourceBase * > & | alreadyCloned | ) | const [inline, virtual] |
Create a deep copy of this DataSource, unless it is already cloned.
Places the association (parent, clone) in alreadyCloned. If the DataSource is non-copyable (for example it represents the Property of a Task ), this may be returned.
Implements DataSource.
Definition at line 146 of file DataSourceArgsMethod.hpp.
| bool evaluate | ( | ) | const [inline, virtual, inherited] |
Force an evaluation of the DataSourceBase.
Implements DataSourceBase.
Definition at line 52 of file DataSource.inl.
Referenced by EvalCommand::readArguments(), FunctorImpl< 4, FunctionT >::readArguments(), FunctorImpl< 3, FunctionT >::readArguments(), FunctorImpl< 2, FunctionT >::readArguments(), FunctorImpl< 1, FunctionT >::readArguments(), FunctorDS1::readArguments(), and CommandDataSourceBool::readArguments().
| bool update | ( | DataSourceBase * | other | ) | [virtual, inherited] |
Update the value of this DataSource with the value of an other DataSource.
Update does a full update of the value, adding extra information if necessary.
Reimplemented in AssignableDataSource, AssignableDataSource< DataSourceType >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, AssignableDataSource< EventT::SlotFunction::arg2_type >, AssignableDataSource< R >, AssignableDataSource< A >, AssignableDataSource< boost::function_traits< DataType >::arg3_type >, AssignableDataSource< RTT::ProgramInterface * >, AssignableDataSource< boost::function_traits< DataType >::arg1_type >, AssignableDataSource< boost::weak_ptr< RTT::ProgramInterface > >, AssignableDataSource< boost::function_traits< DataType >::arg2_type >, AssignableDataSource< boost::weak_ptr< RTT::StateMachine > >, AssignableDataSource< EventT::SlotFunction::arg1_type >, AssignableDataSource< bool >, AssignableDataSource< value_t >, AssignableDataSource< boost::function_traits< DataType >::result_type >, AssignableDataSource< EventT::SlotFunction::arg3_type >, AssignableDataSource< boost::function_traits< DataType >::arg4_type >, and AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >.
Definition at line 89 of file DataSource.cpp.
| CommandInterface * updateCommand | ( | DataSourceBase * | other | ) | [virtual, inherited] |
Generate a CommandInterface object which will update this DataSource with the value of another DataSource when execute()'ed.
Reimplemented in CORBAAssignableExpression, AssignableDataSource, IndexedValueDataSource, AssignableDataSource< DataSourceType >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, AssignableDataSource< EventT::SlotFunction::arg2_type >, AssignableDataSource< R >, AssignableDataSource< A >, AssignableDataSource< boost::function_traits< DataType >::arg3_type >, AssignableDataSource< RTT::ProgramInterface * >, AssignableDataSource< boost::function_traits< DataType >::arg1_type >, AssignableDataSource< boost::weak_ptr< RTT::ProgramInterface > >, AssignableDataSource< boost::function_traits< DataType >::arg2_type >, AssignableDataSource< boost::weak_ptr< RTT::StateMachine > >, AssignableDataSource< EventT::SlotFunction::arg1_type >, AssignableDataSource< bool >, AssignableDataSource< value_t >, AssignableDataSource< boost::function_traits< DataType >::result_type >, AssignableDataSource< EventT::SlotFunction::arg3_type >, AssignableDataSource< boost::function_traits< DataType >::arg4_type >, and AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >.
Definition at line 97 of file DataSource.cpp.
| bool updatePart | ( | DataSourceBase * | part, | |
| DataSourceBase * | other | |||
| ) | [virtual, inherited] |
Update part of the value of this DataSource with the value of an other DataSource.
Update does a partial update of the value, according to part, which is most likely an index or hash value of some type.
Definition at line 101 of file DataSource.cpp.
| CommandInterface * updatePartCommand | ( | DataSourceBase * | part, | |
| DataSourceBase * | other | |||
| ) | [virtual, inherited] |
Generate a CommandInterface object which will partially update this DataSource with the value of another DataSource when execute()'ed.
part is an index or hash value of some type.
Reimplemented in CORBAAssignableExpression, and IndexedValueDataSource.
Definition at line 105 of file DataSource.cpp.
Referenced by CORBAAssignableExpression::updatePartCommand().
| std::ostream & write | ( | std::ostream & | os | ) | [inherited] |
| std::string toString | ( | ) | [inherited] |
Get the contents of this object as a string.
Definition at line 71 of file DataSource.cpp.
| bool decomposeType | ( | PropertyBag & | targetbag | ) | [inherited] |
Decompose the contents of this object into properties.
Definition at line 77 of file DataSource.cpp.
| bool composeType | ( | DataSourceBase::shared_ptr | source | ) | [inherited] |
Compose the contents of this object from another datasource.
Definition at line 83 of file DataSource.cpp.
| void * createBlob | ( | int | protocol | ) | [virtual, inherited] |
Creates a transportable data object with the current value of this DataSource.
This does not trigger the evaluation() of this data source.
Reimplemented in ExpressionProxy.
Definition at line 116 of file DataSource.cpp.
References TypeTransporter::createBlob(), TypeInfo::getProtocol(), and DataSourceBase::getTypeInfo().
Referenced by CorbaBufferProxy::Push(), CORBAAssignableExpression::set(), and CorbaDataObjectProxy::Set().
| void * getBlob | ( | int | protocol | ) | [virtual, inherited] |
Creates a transportable data object with the current value of this DataSource.
This does trigger the evaluation() of this data source. Equivalent to this->evaluate(); this->createBlob();
Reimplemented in ExpressionProxy.
Definition at line 126 of file DataSource.cpp.
References TypeTransporter::createBlob(), DataSourceBase::evaluate(), TypeInfo::getProtocol(), and DataSourceBase::getTypeInfo().
| bool updateBlob | ( | int | protocol, | |
| const void * | data | |||
| ) | [virtual, inherited] |
Updates the value of this DataSource with the value of a transportable data object.
| any | The value to update to. |
Reimplemented in AssignableDataSource, AssignableDataSource< DataSourceType >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, AssignableDataSource< EventT::SlotFunction::arg2_type >, AssignableDataSource< R >, AssignableDataSource< A >, AssignableDataSource< boost::function_traits< DataType >::arg3_type >, AssignableDataSource< RTT::ProgramInterface * >, AssignableDataSource< boost::function_traits< DataType >::arg1_type >, AssignableDataSource< boost::weak_ptr< RTT::ProgramInterface > >, AssignableDataSource< boost::function_traits< DataType >::arg2_type >, AssignableDataSource< boost::weak_ptr< RTT::StateMachine > >, AssignableDataSource< EventT::SlotFunction::arg1_type >, AssignableDataSource< bool >, AssignableDataSource< value_t >, AssignableDataSource< boost::function_traits< DataType >::result_type >, AssignableDataSource< EventT::SlotFunction::arg3_type >, AssignableDataSource< boost::function_traits< DataType >::arg4_type >, and AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >.
Definition at line 137 of file DataSource.cpp.
| int serverProtocol | ( | ) | const [virtual, inherited] |
Inspect if this DataSource is a proxy for a remote server object.
Reimplemented in AnyDataSource, CORBAExpression, CORBAExpression< void >, CORBAAssignableExpression, and ExpressionProxy.
Definition at line 142 of file DataSource.cpp.
Referenced by AssignableDataSource::narrow(), DataSource::narrow(), CorbaTemplateProtocol::narrowAssignableDataSource(), and CorbaTemplateProtocol::narrowDataSource().
| void * server | ( | int | protocol, | |
| void * | arg | |||
| ) | [virtual, inherited] |
Create an object server which 'mirrors' this DataSource.
Reimplemented in CORBAExpression, CORBAExpression< void >, CORBAAssignableExpression, ExpressionProxy, AssignableDataSource, AssignableDataSource< DataSourceType >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 1 >::type >, AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 0 >::type >, AssignableDataSource< EventT::SlotFunction::arg2_type >, AssignableDataSource< R >, AssignableDataSource< A >, AssignableDataSource< boost::function_traits< DataType >::arg3_type >, AssignableDataSource< RTT::ProgramInterface * >, AssignableDataSource< boost::function_traits< DataType >::arg1_type >, AssignableDataSource< boost::weak_ptr< RTT::ProgramInterface > >, AssignableDataSource< boost::function_traits< DataType >::arg2_type >, AssignableDataSource< boost::weak_ptr< RTT::StateMachine > >, AssignableDataSource< EventT::SlotFunction::arg1_type >, AssignableDataSource< bool >, AssignableDataSource< value_t >, AssignableDataSource< boost::function_traits< DataType >::result_type >, AssignableDataSource< EventT::SlotFunction::arg3_type >, AssignableDataSource< boost::function_traits< DataType >::arg4_type >, and AssignableDataSource< boost::function_types::function_type_parameter_c< Function, 2 >::type >.
Definition at line 147 of file DataSource.cpp.
References TypeInfo::getProtocol(), DataSourceBase::getTypeInfo(), and TypeTransporter::server().
Referenced by CorbaTemplateProtocol::narrowAssignableDataSource(), and CorbaTemplateProtocol::narrowDataSource().
| void * method | ( | int | protocol, | |
| MethodC * | orig, | |||
| void * | arg | |||
| ) | [virtual, inherited] |
Create an object server which 'mirrors' this DataSource.
Reimplemented in ExpressionProxy.
Definition at line 157 of file DataSource.cpp.
References TypeInfo::getProtocol(), DataSourceBase::getTypeInfo(), and TypeTransporter::method().
oro_atomic_t refcount [mutable, protected, inherited] |
We keep the refcount ourselves.
We aren't using boost::shared_ptr, because boost::intrusive_ptr is better, exactly because it can be used with refcounts that are stored in the class itself. Advantages are that the shared_ptr's for derived classes use the same refcount, which is of course very much desired, and that refcounting happens in an efficient way, which is also nice :)
Definition at line 89 of file DataSourceBase.hpp.
Referenced by DataSourceBase::DataSourceBase(), DataSourceBase::deref(), and DataSourceBase::ref().
1.5.3