Orocos Real-Time Toolkit
2.9.0
|
DataSource is a base class representing a generic way to read data of type T. More...
#include <rtt/internal/DataSource.hpp>
Public Types | |
typedef T | value_t |
The bare type of T is extracted into value_t. More... | |
typedef T | result_t |
typedef details::GetConstRef< T >::type | const_reference_t |
typedef boost::intrusive_ptr< DataSource< T > > | shared_ptr |
typedef boost::intrusive_ptr< const DataSource< T > > | const_ptr |
Public Member Functions | |
BOOST_STATIC_ASSERT (!details::HasConst< T >::value) | |
If you get a compile error here, it means T has const or reference qualifiers, which is not allowed for DataSource<T> More... | |
virtual result_t | get () const =0 |
Return the data as type T. More... | |
virtual result_t | value () const =0 |
Return the result of the last evaluate() function. More... | |
virtual const_reference_t | rvalue () const =0 |
Get a const reference to the value of this DataSource. More... | |
void const * | getRawConstPointer () |
Generic implementation of getRawConstPointer() based on rvalue() More... | |
virtual bool | evaluate () const |
Force an evaluation of the DataSourceBase. More... | |
virtual DataSource< T > * | clone () const =0 |
Return a shallow clone of this DataSource. More... | |
virtual DataSource< T > * | copy (std::map< const base::DataSourceBase *, base::DataSourceBase * > &alreadyCloned) const =0 |
Create a deep copy of this internal::DataSource, unless it is already cloned. More... | |
virtual std::string | getType () const |
Return useful type info in a human readable format. More... | |
virtual const types::TypeInfo * | getTypeInfo () const |
Return the Orocos type info object. More... | |
virtual std::string | getTypeName () const |
Return the Orocos type name, without const, pointer or reference qualifiers. More... | |
template<> | |
void const * | getRawConstPointer () |
Returns a const pointer to the sample contained in this data source, if there is any. More... | |
void | ref () const |
Increase the reference count by one. More... | |
void | deref () const |
Decrease the reference count by one and delete this on zero. More... | |
virtual void | reset () |
Reset the data to initial values. More... | |
virtual bool | isAssignable () const |
Returns true if this object can be cast to an AssignableDataSource. More... | |
virtual void | updated () |
In case the internal::DataSource returns a 'reference' type, call this method to notify it that the data was updated in the course of an invocation of get(). More... | |
virtual bool | update (DataSourceBase *other) |
Update the value of this internal::DataSource with the value of an other DataSource. More... | |
virtual ActionInterface * | updateAction (DataSourceBase *other) |
Generate a ActionInterface object which will update this internal::DataSource with the value of another internal::DataSource when execute()'ed. More... | |
virtual shared_ptr | getMember (const std::string &member_name) |
Get a (const) reference data source to a member of the structure of this data source. More... | |
virtual shared_ptr | getMember (DataSourceBase::shared_ptr member_id, DataSourceBase::shared_ptr offset) |
Same as above, but with run-time lookup of the member to use. More... | |
virtual std::vector< std::string > | getMemberNames () const |
Returns the names of all members of the structure contained in this data source, or an empty list if none. More... | |
virtual shared_ptr | getParent () |
Returns the top level data source that contains the full data structure this data source refers to. More... | |
std::ostream & | write (std::ostream &os) |
Stream the contents of this object. More... | |
std::string | toString () |
Get the contents of this object as a string. More... | |
virtual void * | getRawPointer () |
Returns a pointer to the sample contained in this data source, if there is any, and if it is an lvalue. More... | |
Static Public Member Functions | |
static std::string | GetType () |
Return usefull type info in a human readable format. More... | |
static const types::TypeInfo * | GetTypeInfo () |
Return the Orocos type info. More... | |
static std::string | GetTypeName () |
Return the Orocos type name, without const, pointer or reference qualifiers. More... | |
static DataSource< T > * | narrow (base::DataSourceBase *db) |
This method narrows a base::DataSourceBase to a typeded DataSource, possibly returning a new object. More... | |
static shared_ptr | stack_shared_ptr (DataSourceBase *dsb) |
Returns a shared ptr to a DataSourceBase living on the stack. More... | |
static const_ptr | stack_const_ptr (const DataSourceBase *dsb) |
Returns a const shared_ptr to a DataSourceBase living on the stack. More... | |
Protected Member Functions | |
virtual | ~DataSource () |
Protected Attributes | |
os::AtomicInt | refcount |
We keep the refcount ourselves. More... | |
DataSource is a base class representing a generic way to read data of type T.
T | The type of data returned. |
Definition at line 94 of file DataSource.hpp.
typedef boost::intrusive_ptr<const DataSource<T> > RTT::internal::DataSource< T >::const_ptr |
Definition at line 117 of file DataSource.hpp.
typedef details::GetConstRef<T>::type RTT::internal::DataSource< T >::const_reference_t |
Definition at line 107 of file DataSource.hpp.
typedef T RTT::internal::DataSource< T >::result_t |
Definition at line 106 of file DataSource.hpp.
typedef boost::intrusive_ptr<DataSource<T> > RTT::internal::DataSource< T >::shared_ptr |
Definition at line 115 of file DataSource.hpp.
typedef T RTT::internal::DataSource< T >::value_t |
The bare type of T is extracted into value_t.
Definition at line 105 of file DataSource.hpp.
|
protectedvirtual |
Definition at line 15 of file DataSource.inl.
RTT::internal::DataSource< T >::BOOST_STATIC_ASSERT | ( | !details::HasConst< T >::value | ) |
If you get a compile error here, it means T has const or reference qualifiers, which is not allowed for DataSource<T>
|
pure virtual |
Return a shallow clone of this DataSource.
This method returns a duplicate of this instance which re-uses the DataSources this internal::DataSource holds reference to. The clone() function is thus a non-deep copy.
Implements RTT::base::DataSourceBase.
Implemented in RTT::internal::NArityDataSource< function >, RTT::internal::UnaryDataSource< function >, RTT::internal::BinaryDataSource< function >, RTT::internal::ActionAliasAssignableDataSource< T >, RTT::internal::ActionAliasDataSource< T >, RTT::internal::LateConstReferenceDataSource< T >, RTT::internal::LateConstReferenceDataSource< A >, RTT::internal::FusedMCollectDataSource< Signature >, CorbaOperationCallerCollect, RTT::internal::LateReferenceDataSource< T >, RTT::internal::LateReferenceDataSource< ds_type >, RTT::internal::FusedMSendDataSource< Signature >, RTT::internal::ArrayDataSource< T >, RTT::internal::FusedMCallDataSource< Signature >, RTT::internal::AliasDataSource< T >, RTT::internal::ReferenceDataSource< T >, RTT::internal::ReferenceDataSource< ds_type >, RTT::internal::AssignableDataSource< T >, RTT::internal::AssignableDataSource< DataSourceType >, RTT::internal::AssignableDataSource< SendHandle< Signature > >, RTT::internal::AssignableDataSource< types::carray< T > >, RTT::internal::AssignableDataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::AssignableDataSource< ds_type >, RTT::internal::AssignableDataSource< value_t >, RTT::internal::AssignableDataSource< bool >, RTT::internal::FusedFunctorDataSource< Signature, typename boost::enable_if< is_pure_reference< typename boost::function_traits< Signature >::result_type > >::type >, RTT::corba::ValueDataSourceProxy< T >, RTT::internal::PartDataSource< types::carray< T > >, RTT::internal::ConstReferenceDataSource< T >, RTT::internal::ConstantDataSource< T >, RTT::internal::FusedFunctorDataSource< Signature, Enable >, RTT::internal::ArrayPartDataSource< T >, RTT::corba::DataSourceProxy< T >, RTT::internal::PartDataSource< T >, RTT::scripting::CmdFunction, RTT::internal::InputPortSource< T >, RTT::internal::ValueDataSource< T >, RTT::internal::ValueDataSource< ProgramInterfacePtr >, RTT::internal::ValueDataSource< ds_type >, RTT::internal::ValueDataSource< StateMachinePtr >, RTT::CmdFunctionWrapper, RTT::corba::AnyDataSource, RTT::scripting::DataSourceTime, RTT::internal::DataSourceCommand, RTT::scripting::DataSourceCondition, and RTT::internal::DataObjectDataSource< T >.
|
pure virtual |
Create a deep copy of this internal::DataSource, unless it is already cloned.
Places the association (parent, clone) in alreadyCloned. If the internal::DataSource is non-copyable (for example it represents the Property of a Task ), this may be returned.
Implements RTT::base::DataSourceBase.
Implemented in RTT::internal::NArityDataSource< function >, RTT::internal::UnaryDataSource< function >, RTT::internal::BinaryDataSource< function >, RTT::internal::ActionAliasAssignableDataSource< T >, RTT::internal::ActionAliasDataSource< T >, RTT::internal::LateConstReferenceDataSource< T >, RTT::internal::LateConstReferenceDataSource< A >, RTT::internal::FusedMCollectDataSource< Signature >, RTT::internal::LateReferenceDataSource< T >, RTT::internal::LateReferenceDataSource< ds_type >, RTT::internal::FusedMSendDataSource< Signature >, RTT::internal::ArrayDataSource< T >, RTT::internal::FusedMCallDataSource< Signature >, RTT::internal::AliasDataSource< T >, RTT::internal::ReferenceDataSource< T >, RTT::internal::ReferenceDataSource< ds_type >, RTT::internal::AssignableDataSource< T >, RTT::internal::AssignableDataSource< DataSourceType >, RTT::internal::AssignableDataSource< SendHandle< Signature > >, RTT::internal::AssignableDataSource< types::carray< T > >, RTT::internal::AssignableDataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::AssignableDataSource< ds_type >, RTT::internal::AssignableDataSource< value_t >, RTT::internal::AssignableDataSource< bool >, RTT::internal::FusedFunctorDataSource< Signature, typename boost::enable_if< is_pure_reference< typename boost::function_traits< Signature >::result_type > >::type >, RTT::corba::ValueDataSourceProxy< T >, RTT::internal::PartDataSource< types::carray< T > >, RTT::internal::ConstReferenceDataSource< T >, RTT::internal::ConstantDataSource< T >, RTT::internal::FusedFunctorDataSource< Signature, Enable >, RTT::internal::ArrayPartDataSource< T >, RTT::corba::DataSourceProxy< T >, RTT::internal::PartDataSource< T >, RTT::scripting::CmdFunction, RTT::internal::InputPortSource< T >, RTT::internal::ValueDataSource< T >, RTT::CmdFunctionWrapper, RTT::internal::ValueDataSource< ProgramInterfacePtr >, RTT::internal::ValueDataSource< ds_type >, RTT::internal::ValueDataSource< StateMachinePtr >, RTT::corba::AnyDataSource, RTT::scripting::DataSourceTime, RTT::internal::DataSourceCommand, RTT::scripting::DataSourceCondition, and RTT::internal::DataObjectDataSource< T >.
Referenced by RTT::scripting::ConditionBoolDataSource::copy(), RTT::scripting::ConditionCompare< T, compare_op >::copy(), RTT::scripting::ConditionDSDuration::copy(), RTT::CmdFunctionWrapper::copy(), RTT::scripting::CommandDataSourceBool::copy(), RTT::scripting::TryCommandResult::copy(), RTT::internal::ArrayPartDataSource< T >::copy(), RTT::scripting::EvalCommand::copy(), RTT::scripting::CmdCollectCondition::copy(), RTT::scripting::EvalCommandResult::copy(), RTT::internal::AliasDataSource< T >::copy(), CorbaOperationCallerCollect::copy(), RTT::internal::ActionAliasDataSource< T >::copy(), RTT::internal::BinaryDataSource< function >::copy(), and RTT::internal::UnaryDataSource< function >::copy().
|
inherited |
Decrease the reference count by one and delete this on zero.
Definition at line 81 of file DataSource.cpp.
References RTT::os::AtomicInt::dec_and_test(), and RTT::base::DataSourceBase::refcount.
Referenced by RTT::base::intrusive_ptr_release().
|
virtual |
Force an evaluation of the DataSourceBase.
Implements RTT::base::DataSourceBase.
Reimplemented in RTT::internal::ActionAliasAssignableDataSource< T >, RTT::internal::ActionAliasDataSource< T >, RTT::internal::FusedMCallDataSource< Signature >, RTT::internal::AliasDataSource< T >, RTT::internal::FusedFunctorDataSource< Signature, typename boost::enable_if< is_pure_reference< typename boost::function_traits< Signature >::result_type > >::type >, RTT::internal::FusedFunctorDataSource< Signature, Enable >, RTT::scripting::CmdFunction, RTT::internal::InputPortSource< T >, RTT::CmdFunctionWrapper, and RTT::internal::DataObjectDataSource< T >.
Definition at line 52 of file DataSource.inl.
Referenced by RTT::corba::CorbaTemplateProtocol< T >::createAny(), RTT::CmdFunctionWrapper::evaluate(), RTT::internal::AliasDataSource< T >::evaluate(), RTT::internal::ActionAliasDataSource< T >::evaluate(), RTT::internal::ActionAliasAssignableDataSource< T >::evaluate(), RTT::scripting::CommandDataSourceBool::execute(), RTT::scripting::EvalCommand::execute(), RTT::Attribute< T >::get(), RTT::Property< bool >::Property(), RTT::internal::ReferenceDataSource< ds_type >::setReference(), RTT::internal::AssignableDataSource< T >::update(), RTT::corba::CorbaTemplateProtocol< T >::updateAny(), and RTT::SendHandleC::E::OperationKeeper::~OperationKeeper().
|
pure virtual |
Return the data as type T.
Implemented in RTT::internal::NArityDataSource< function >, RTT::internal::UnaryDataSource< function >, RTT::internal::BinaryDataSource< function >, RTT::internal::ActionAliasAssignableDataSource< T >, RTT::internal::ActionAliasDataSource< T >, RTT::internal::LateConstReferenceDataSource< T >, RTT::internal::LateConstReferenceDataSource< A >, RTT::internal::FusedMCollectDataSource< Signature >, CorbaOperationCallerCollect, RTT::internal::LateReferenceDataSource< T >, RTT::internal::LateReferenceDataSource< ds_type >, RTT::internal::FusedMSendDataSource< Signature >, RTT::internal::ArrayDataSource< T >, RTT::internal::FusedMCallDataSource< Signature >, RTT::internal::AliasDataSource< T >, RTT::internal::ReferenceDataSource< T >, RTT::internal::ReferenceDataSource< ds_type >, RTT::internal::FusedFunctorDataSource< Signature, typename boost::enable_if< is_pure_reference< typename boost::function_traits< Signature >::result_type > >::type >, RTT::corba::ValueDataSourceProxy< T >, RTT::internal::ConstReferenceDataSource< T >, RTT::internal::PartDataSource< types::carray< T > >, RTT::internal::ConstantDataSource< T >, RTT::internal::FusedFunctorDataSource< Signature, Enable >, RTT::corba::DataSourceProxy< T >, RTT::internal::InputPortSource< T >, RTT::internal::ArrayPartDataSource< T >, RTT::internal::PartDataSource< T >, RTT::CmdFunctionWrapper, RTT::corba::AnyDataSource, RTT::internal::ValueDataSource< T >, RTT::internal::ValueDataSource< ProgramInterfacePtr >, RTT::internal::ValueDataSource< ds_type >, RTT::internal::ValueDataSource< StateMachinePtr >, RTT::internal::DataSourceCommand, RTT::scripting::DataSourceCondition, RTT::scripting::DataSourceTime, RTT::scripting::CmdFunction, and RTT::internal::DataObjectDataSource< T >.
Referenced by RTT::types::TemplateValueFactory< bool >::buildActionAlias(), RTT::types::TemplateValueFactory< bool >::buildConstant(), RTT::scripting::ConditionCompare< T, compare_op >::clone(), RTT::scripting::ConditionBoolDataSource::clone(), RTT::CmdFunctionWrapper::clone(), RTT::Attribute< T >::clone(), RTT::internal::AliasDataSource< T >::clone(), RTT::Constant< T >::clone(), RTT::internal::ActionAliasDataSource< T >::clone(), RTT::internal::ActionAliasAssignableDataSource< T >::clone(), RTT::internal::BinaryDataSource< function >::clone(), RTT::internal::UnaryDataSource< function >::clone(), RTT::types::EnumTypeInfo< T >::composeType(), RTT::Attribute< T >::copy(), RTT::Constant< T >::copy(), RTT::scripting::DataCallParser::DataCallParser(), RTT::types::EnumTypeInfo< T >::decomposeType(), RTT::StatementProcessor::D::doPrint(), RTT::scripting::ConditionBoolDataSource::evaluate(), RTT::scripting::ConditionDSDuration::evaluate(), RTT::scripting::ConditionCompare< T, compare_op >::evaluate(), RTT::scripting::TryCommandResult::evaluate(), RTT::scripting::EvalCommandResult::evaluate(), RTT::scripting::TryCommand::execute(), RTT::CmdFunctionWrapper::get(), RTT::internal::ArrayPartDataSource< T >::get(), RTT::Property< bool >::get(), RTT::internal::AliasDataSource< T >::get(), RTT::Constant< T >::get(), RTT::internal::FusedMCollectDataSource< Signature >::get(), RTT::internal::ActionAliasDataSource< T >::get(), RTT::internal::ActionAliasAssignableDataSource< T >::get(), RTT::internal::BinaryDataSource< function >::get(), RTT::internal::UnaryDataSource< function >::get(), RTT::types::StructTypeInfo< T, has_ostream >::getMember(), RTT::types::BoostArrayTypeInfo< T, has_ostream >::getMember(), RTT::types::CArrayTypeInfo< T, has_ostream >::getMember(), RTT::types::SequenceTypeInfoBase< std::vector< double > >::getMember(), RTT::scripting::ConditionParser::getParseResult(), RTT::mqueue::MQSerializationProtocol< T >::getSampleSize(), RTT::Property< bool >::operator value_t(), RTT::scripting::FunctionFactory::produceCollect(), RTT::internal::ArrayPartDataSource< T >::rvalue(), RTT::internal::ArrayPartDataSource< T >::set(), RTT::types::typeDecomposition(), RTT::scripting::TryCommand::valid(), RTT::internal::ArrayPartDataSource< T >::value(), and RTT::OutputPort< T >::write().
|
virtualinherited |
Get a (const) reference data source to a member of the structure of this data source.
You must call getMember() in turn on the returned member to access sub-members.
member_name | The name of the member to get access to. |
Definition at line 124 of file DataSource.cpp.
References RTT::types::TypeInfo::getMember(), and RTT::base::DataSourceBase::getTypeInfo().
|
virtualinherited |
Same as above, but with run-time lookup of the member to use.
Also takes an optional offset argument which can be used to offset the member in memory. This is necessary when using sequences of sequences. DataSources which are a sequence/offset member themselves must override this function to let the returned member take the offset into account.
Definition at line 130 of file DataSource.cpp.
References RTT::types::TypeInfo::getMember(), and RTT::base::DataSourceBase::getTypeInfo().
|
virtualinherited |
Returns the names of all members of the structure contained in this data source, or an empty list if none.
If this data source is a sequence, it will not return the allowed index numbers.
Definition at line 134 of file DataSource.cpp.
References RTT::types::TypeInfo::getMemberNames(), and RTT::base::DataSourceBase::getTypeInfo().
|
virtualinherited |
Returns the top level data source that contains the full data structure this data source refers to.
Defaults to returning this.
Definition at line 138 of file DataSource.cpp.
|
inlinevirtual |
Returns a const pointer to the sample contained in this data source, if there is any.
Returns 0 otherwise
Reimplemented from RTT::base::DataSourceBase.
Definition at line 59 of file DataSource.inl.
|
inlinevirtual |
Generic implementation of getRawConstPointer() based on rvalue()
Reimplemented from RTT::base::DataSourceBase.
Definition at line 141 of file DataSource.hpp.
|
virtualinherited |
Returns a pointer to the sample contained in this data source, if there is any, and if it is an lvalue.
Returns 0 otherwise
Reimplemented in RTT::internal::AssignableDataSource< T >, RTT::internal::AssignableDataSource< DataSourceType >, RTT::internal::AssignableDataSource< SendHandle< Signature > >, RTT::internal::AssignableDataSource< types::carray< T > >, RTT::internal::AssignableDataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::AssignableDataSource< ds_type >, RTT::internal::AssignableDataSource< value_t >, and RTT::internal::AssignableDataSource< bool >.
Definition at line 115 of file DataSource.cpp.
|
virtual |
Return useful type info in a human readable format.
Implements RTT::base::DataSourceBase.
Reimplemented in RTT::corba::DataSourceProxy< T >.
Definition at line 20 of file DataSource.inl.
References RTT::internal::DataSource< T >::GetType().
|
static |
Return usefull type info in a human readable format.
Definition at line 32 of file DataSource.inl.
References RTT::internal::DataSourceTypeInfo< T >::getQualifier(), and RTT::internal::DataSourceTypeInfo< T >::getTypeName().
Referenced by RTT::extras::composeProperty(), RTT::corba::DataSourceProxy< T >::getType(), RTT::internal::DataSource< T >::getType(), and RTT::Property< bool >::getType().
|
virtual |
Return the Orocos type info object.
Implements RTT::base::DataSourceBase.
Definition at line 46 of file DataSource.inl.
|
static |
Definition at line 49 of file DataSource.inl.
References RTT::internal::DataSourceTypeInfo< T >::getTypeInfo().
Referenced by RTT::Property< bool >::getTypeInfo(), and RTT::internal::create_sequence_impl< List, 1 >::GetTypeInfo().
|
static |
Return the Orocos type name, without const, pointer or reference qualifiers.
Definition at line 39 of file DataSource.inl.
References RTT::internal::DataSourceTypeInfo< T >::getTypeName().
Referenced by RTT::internal::DataSource< T >::getTypeName().
|
virtual |
Return the Orocos type name, without const, pointer or reference qualifiers.
Implements RTT::base::DataSourceBase.
Definition at line 26 of file DataSource.inl.
References RTT::internal::DataSource< T >::GetTypeName().
Referenced by RTT::types::SequenceTypeInfoBase< std::vector< double > >::getMember(), and RTT::corba::RemoteChannelElement< T >::read().
|
virtualinherited |
Returns true if this object can be cast to an AssignableDataSource.
When this method returns true, all update functions below will return as well when valid input is given.
Reimplemented in RTT::internal::AssignableDataSource< T >, RTT::internal::AssignableDataSource< DataSourceType >, RTT::internal::AssignableDataSource< SendHandle< Signature > >, RTT::internal::AssignableDataSource< types::carray< T > >, RTT::internal::AssignableDataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::AssignableDataSource< ds_type >, RTT::internal::AssignableDataSource< value_t >, and RTT::internal::AssignableDataSource< bool >.
Definition at line 104 of file DataSource.cpp.
|
static |
This method narrows a base::DataSourceBase to a typeded DataSource, possibly returning a new object.
Definition at line 66 of file DataSource.inl.
Referenced by RTT::types::EnumTypeInfo< T >::composeType(), RTT::corba::CorbaTemplateProtocol< T >::createAny(), RTT::types::decomposePropertyBag(), RTT::types::EnumTypeInfo< T >::decomposeType(), RTT::types::BoostArrayTypeInfo< T, has_ostream >::getMember(), RTT::types::CArrayTypeInfo< T, has_ostream >::getMember(), RTT::types::SequenceTypeInfoBase< std::vector< double > >::getMember(), RTT::corba::CorbaOperationCallerFactory::produceCollect(), and RTT::corba::CorbaTemplateProtocol< T >::updateAny().
|
inherited |
Increase the reference count by one.
Definition at line 80 of file DataSource.cpp.
References RTT::os::AtomicInt::inc(), and RTT::base::DataSourceBase::refcount.
Referenced by RTT::base::PropertyBase::compose(), RTT::types::BoostArrayTypeInfo< T, has_ostream >::composeType(), RTT::types::CArrayTypeInfo< T, has_ostream >::composeType(), RTT::types::StructTypeInfo< T, has_ostream >::composeTypeImpl(), RTT::corba::DataSourceProxy< T >::get(), RTT::corba::ValueDataSourceProxy< T >::get(), RTT::base::intrusive_ptr_add_ref(), RTT::corba::RemoteChannelElement< T >::read(), RTT::corba::ValueDataSourceProxy< T >::set(), RTT::internal::ReferenceDataSource< ds_type >::setReference(), RTT::base::DataSourceBase::stack_const_ptr(), RTT::base::DataSourceBase::stack_shared_ptr(), and RTT::corba::RemoteChannelElement< T >::write().
|
virtualinherited |
Reset the data to initial values.
Reimplemented in RTT::internal::NArityDataSource< function >, RTT::internal::UnaryDataSource< function >, RTT::internal::BinaryDataSource< function >, RTT::internal::ActionAliasAssignableDataSource< T >, RTT::internal::ActionAliasDataSource< T >, RTT::internal::FusedMSendDataSource< Signature >, RTT::internal::AliasDataSource< T >, RTT::scripting::CmdFunction, RTT::CmdFunctionWrapper, RTT::internal::InputPortSource< T >, RTT::scripting::DataSourceTime, RTT::internal::DataSourceCommand, RTT::scripting::DataSourceCondition, and RTT::internal::DataObjectDataSource< T >.
Definition at line 87 of file DataSource.cpp.
Referenced by RTT::StatementProcessor::D::doPrint(), RTT::scripting::ConditionBoolDataSource::reset(), RTT::scripting::CommandDataSourceBool::reset(), RTT::scripting::EvalCommand::reset(), RTT::internal::AliasDataSource< T >::reset(), RTT::internal::ActionAliasDataSource< T >::reset(), RTT::internal::ActionAliasAssignableDataSource< T >::reset(), RTT::internal::BinaryDataSource< function >::reset(), RTT::internal::UnaryDataSource< function >::reset(), and RTT::internal::NArityDataSource< function >::reset().
|
pure virtual |
Get a const reference to the value of this DataSource.
You must call evaluate() prior to calling this function in order to get the most recent value of this attribute.
Implemented in RTT::internal::NArityDataSource< function >, RTT::internal::UnaryDataSource< function >, RTT::internal::BinaryDataSource< function >, RTT::internal::ActionAliasAssignableDataSource< T >, RTT::internal::ActionAliasDataSource< T >, RTT::internal::LateConstReferenceDataSource< T >, RTT::internal::LateConstReferenceDataSource< A >, RTT::internal::FusedMCollectDataSource< Signature >, RTT::internal::LateReferenceDataSource< T >, RTT::internal::LateReferenceDataSource< ds_type >, CorbaOperationCallerCollect, RTT::internal::FusedMSendDataSource< Signature >, RTT::internal::ArrayDataSource< T >, RTT::internal::AliasDataSource< T >, RTT::internal::FusedMCallDataSource< Signature >, RTT::internal::ReferenceDataSource< T >, RTT::internal::ReferenceDataSource< ds_type >, RTT::internal::FusedFunctorDataSource< Signature, typename boost::enable_if< is_pure_reference< typename boost::function_traits< Signature >::result_type > >::type >, RTT::internal::PartDataSource< types::carray< T > >, RTT::internal::ConstReferenceDataSource< T >, RTT::corba::ValueDataSourceProxy< T >, RTT::internal::ConstantDataSource< T >, RTT::internal::ArrayPartDataSource< T >, RTT::internal::FusedFunctorDataSource< Signature, Enable >, RTT::corba::DataSourceProxy< T >, RTT::internal::PartDataSource< T >, RTT::internal::ValueDataSource< T >, RTT::internal::ValueDataSource< ProgramInterfacePtr >, RTT::internal::ValueDataSource< ds_type >, RTT::internal::ValueDataSource< StateMachinePtr >, RTT::scripting::CmdFunction, RTT::CmdFunctionWrapper, RTT::internal::InputPortSource< T >, RTT::corba::AnyDataSource, RTT::scripting::DataSourceTime, RTT::internal::DataSourceCommand, RTT::scripting::DataSourceCondition, and RTT::internal::DataObjectDataSource< T >.
Referenced by RTT::types::TemplateValueFactory< bool >::buildConstant(), RTT::types::TemplateCompositionFactory< bool >::composeType(), RTT::types::StdVectorTypeInfo::composeType(), RTT::types::StdVectorTemplateTypeInfo< T, has_ostream >::composeType(), RTT::types::BoostArrayTypeInfo< T, has_ostream >::composeType(), RTT::types::SequenceTypeInfoBase< std::vector< double > >::composeType(), RTT::types::CArrayTypeInfo< T, has_ostream >::composeType(), RTT::corba::CorbaTemplateProtocol< T >::createAny(), RTT::types::decomposePropertyBag(), RTT::types::TemplateCompositionFactory< bool >::decomposeType(), RTT::scripting::CmdCollectCondition::evaluate(), RTT::scripting::EvalCommand::execute(), RTT::mqueue::MQSerializationProtocol< T >::fillBlob(), RTT::corba::ValueDataSourceProxy< T >::get(), RTT::Attribute< T >::get(), RTT::types::CArrayTypeInfo< T, has_ostream >::getMember(), RTT::CmdFunctionWrapper::rvalue(), RTT::corba::ValueDataSourceProxy< T >::rvalue(), RTT::Property< bool >::rvalue(), RTT::internal::AliasDataSource< T >::rvalue(), RTT::internal::ActionAliasDataSource< T >::rvalue(), RTT::internal::ActionAliasAssignableDataSource< T >::rvalue(), RTT::types::typeDecomposition(), RTT::corba::CorbaTemplateProtocol< T >::updateAny(), RTT::corba::ValueDataSourceProxy< T >::value(), RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >::write(), and RTT::OutputPort< T >::write().
|
staticinherited |
Returns a const shared_ptr to a DataSourceBase living on the stack.
Make sure that the const_ptr does not outlive the stacked element.
Definition at line 74 of file DataSource.cpp.
References RTT::base::DataSourceBase::ref().
|
staticinherited |
Returns a shared ptr to a DataSourceBase living on the stack.
Make sure that the shared_ptr does not outlive the stacked element.
Definition at line 69 of file DataSource.cpp.
References RTT::base::DataSourceBase::ref().
|
inherited |
Get the contents of this object as a string.
Definition at line 98 of file DataSource.cpp.
|
virtualinherited |
Update the value of this internal::DataSource with the value of an other DataSource.
Update does a full update of the value, adding extra information if necessary.
Reimplemented in RTT::internal::AssignableDataSource< T >, RTT::internal::AssignableDataSource< DataSourceType >, RTT::internal::AssignableDataSource< SendHandle< Signature > >, RTT::internal::AssignableDataSource< types::carray< T > >, RTT::internal::AssignableDataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::AssignableDataSource< ds_type >, RTT::internal::AssignableDataSource< value_t >, and RTT::internal::AssignableDataSource< bool >.
Definition at line 108 of file DataSource.cpp.
|
virtualinherited |
Generate a ActionInterface object which will update this internal::DataSource with the value of another internal::DataSource when execute()'ed.
Reimplemented in RTT::internal::AssignableDataSource< T >, RTT::internal::AssignableDataSource< DataSourceType >, RTT::internal::AssignableDataSource< SendHandle< Signature > >, RTT::internal::AssignableDataSource< types::carray< T > >, RTT::internal::AssignableDataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::AssignableDataSource< ds_type >, RTT::internal::AssignableDataSource< value_t >, and RTT::internal::AssignableDataSource< bool >.
Definition at line 120 of file DataSource.cpp.
|
virtualinherited |
In case the internal::DataSource returns a 'reference' type, call this method to notify it that the data was updated in the course of an invocation of get().
Reimplemented in RTT::corba::ValueDataSourceProxy< T >, RTT::internal::PartDataSource< types::carray< T > >, RTT::internal::ArrayPartDataSource< T >, and RTT::internal::PartDataSource< T >.
Definition at line 112 of file DataSource.cpp.
Referenced by RTT::types::TemplateCompositionFactory< bool >::composeType(), RTT::types::SequenceTypeInfoBase< std::vector< double > >::composeType(), RTT::types::BoolTypeInfo::read(), RTT::types::PrimitiveTypeInfo< std::vector< T >, use_ostream >::read(), RTT::types::SequenceTypeInfoBase< std::vector< double > >::resize(), and RTT::corba::CorbaTemplateProtocol< T >::updateFromAny().
|
pure virtual |
Return the result of the last evaluate() function.
You must call evaluate() prior to calling this function in order to get the most recent value of this attribute.
Implemented in RTT::internal::NArityDataSource< function >, RTT::internal::UnaryDataSource< function >, RTT::internal::BinaryDataSource< function >, RTT::internal::ActionAliasAssignableDataSource< T >, RTT::internal::ActionAliasDataSource< T >, RTT::internal::LateConstReferenceDataSource< T >, RTT::internal::LateConstReferenceDataSource< A >, RTT::internal::FusedMCollectDataSource< Signature >, CorbaOperationCallerCollect, RTT::internal::LateReferenceDataSource< T >, RTT::internal::LateReferenceDataSource< ds_type >, RTT::internal::FusedMSendDataSource< Signature >, RTT::internal::ArrayDataSource< T >, RTT::internal::AliasDataSource< T >, RTT::internal::FusedMCallDataSource< Signature >, RTT::internal::ReferenceDataSource< T >, RTT::internal::ReferenceDataSource< ds_type >, RTT::internal::FusedFunctorDataSource< Signature, typename boost::enable_if< is_pure_reference< typename boost::function_traits< Signature >::result_type > >::type >, RTT::internal::ConstReferenceDataSource< T >, RTT::corba::ValueDataSourceProxy< T >, RTT::internal::PartDataSource< types::carray< T > >, RTT::internal::ConstantDataSource< T >, RTT::internal::FusedFunctorDataSource< Signature, Enable >, RTT::corba::DataSourceProxy< T >, RTT::internal::ArrayPartDataSource< T >, RTT::scripting::CmdFunction, RTT::internal::PartDataSource< T >, RTT::CmdFunctionWrapper, RTT::internal::InputPortSource< T >, RTT::internal::ValueDataSource< T >, RTT::corba::AnyDataSource, RTT::internal::ValueDataSource< ProgramInterfacePtr >, RTT::internal::ValueDataSource< ds_type >, RTT::internal::ValueDataSource< StateMachinePtr >, RTT::internal::DataSourceCommand, RTT::scripting::DataSourceCondition, RTT::scripting::DataSourceTime, and RTT::internal::DataObjectDataSource< T >.
Referenced by RTT::internal::NArityDataSource< function >::add(), RTT::scripting::ConditionCache::evaluate(), RTT::scripting::CommandDataSourceBool::execute(), RTT::internal::AssignableDataSource< T >::update(), RTT::corba::ValueDataSourceProxy< T >::updated(), RTT::CmdFunctionWrapper::value(), RTT::internal::AliasDataSource< T >::value(), RTT::internal::ActionAliasDataSource< T >::value(), RTT::internal::ActionAliasAssignableDataSource< T >::value(), and RTT::types::BoolTypeInfo::write().
|
inherited |
Stream the contents of this object.
Definition at line 91 of file DataSource.cpp.
|
mutableprotectedinherited |
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 88 of file DataSourceBase.hpp.
Referenced by RTT::base::DataSourceBase::deref(), and RTT::base::DataSourceBase::ref().