Orocos Real-Time Toolkit
2.8.3
|
The base class for all internal data representations. More...
#include <rtt/base/DataSourceBase.hpp>
Public Types | |
typedef boost::intrusive_ptr< DataSourceBase > | shared_ptr |
Use this type to store a pointer to a DataSourceBase. More... | |
typedef boost::intrusive_ptr< const DataSourceBase > | const_ptr |
Use this type to store a const pointer to a DataSourceBase. More... | |
Public Member Functions | |
DataSourceBase () | |
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 | evaluate () const =0 |
Force an evaluation of the DataSourceBase. 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... | |
virtual DataSourceBase * | clone () const =0 |
Return a shallow clone of this DataSource. More... | |
virtual DataSourceBase * | copy (std::map< const DataSourceBase *, DataSourceBase * > &alreadyCloned) const =0 |
Create a deep copy of this internal::DataSource, unless it is already cloned. More... | |
virtual std::string | getType () const =0 |
Return useful type info in a human readable format. More... | |
virtual const types::TypeInfo * | getTypeInfo () const =0 |
Return the Orocos type info object. More... | |
virtual std::string | getTypeName () const =0 |
Return the Orocos type name, without const, pointer or reference qualifiers. 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... | |
virtual void const * | getRawConstPointer () |
Returns a const pointer to the sample contained in this data source, if there is any. More... | |
Static Public Member Functions | |
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 | ~DataSourceBase () |
the destructor is private. More... | |
Protected Attributes | |
os::AtomicInt | refcount |
We keep the refcount ourselves. More... | |
The base class for all internal data representations.
The internal::DataSource is an object containing Data of any type. It's interface is designed for dynamic build-up and destruction of these objects and allowing Commands, Properties etc to use them as 'storage' devices which have the dual copy() /clone() semantics (which is heavily used by the Orocos type and scripting Infrastructure).
internal::DataSource's are reference counted and must be allocated on the heap. Use DataSourceBase::shared_ptr or internal::DataSource<T>::shared_ptr to deal with cleanup of allocated DataSources. You are not allowed to delete a DataSource. If you must have the pointer of a internal::DataSource, use the .get() method of the shared_ptr class.
Once a newly created internal::DataSource is assigned to a shared_ptr, it will be deleted when that pointer goes out of scope and is not shared by other shared_ptr objects.
Definition at line 76 of file DataSourceBase.hpp.
typedef boost::intrusive_ptr<const DataSourceBase> RTT::base::DataSourceBase::const_ptr |
Use this type to store a const pointer to a DataSourceBase.
Definition at line 104 of file DataSourceBase.hpp.
typedef boost::intrusive_ptr<DataSourceBase> RTT::base::DataSourceBase::shared_ptr |
Use this type to store a pointer to a DataSourceBase.
Definition at line 99 of file DataSourceBase.hpp.
|
protectedvirtual |
the destructor is private.
You are not allowed to delete this class RTT_API yourself, use a shared pointer !
Definition at line 83 of file DataSource.cpp.
RTT::DataSourceBase::DataSourceBase | ( | ) |
Definition at line 79 of file DataSource.cpp.
|
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.
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 >, CorbaOperationCallerCollect, 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< types::carray< T > >, RTT::internal::AssignableDataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::AssignableDataSource< ds_type >, RTT::internal::AssignableDataSource< RTT::scripting::ProgramInterface * >, 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::DataSource< T >, RTT::internal::ConstantDataSource< T >, RTT::internal::DataSource< ProgramInterfacePtr >, RTT::internal::DataSource< SendStatus >, RTT::internal::DataSource< double >, RTT::internal::DataSource< SendHandle< Signature > >, RTT::internal::DataSource< A >, RTT::internal::DataSource< S >, RTT::internal::DataSource< CORBA::Any_var >, RTT::internal::DataSource< unsigned int >, RTT::internal::DataSource< remove_cr< function::result_type >::type >, RTT::internal::DataSource< os::TimeService::Seconds >, RTT::internal::DataSource< arg_t >, RTT::internal::DataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::DataSource< second_arg_t >, RTT::internal::DataSource< ds_type >, RTT::internal::DataSource< bool >, RTT::internal::DataSource< StateMachinePtr >, RTT::internal::DataSource< boost::shared_ptr< ObjT > >, RTT::internal::DataSource< first_arg_t >, RTT::internal::ArrayPartDataSource< T >, RTT::internal::FusedFunctorDataSource< Signature, Enable >, RTT::corba::DataSourceProxy< T >, RTT::internal::PartDataSource< T >, RTT::internal::InputPortSource< T >, RTT::internal::ValueDataSource< T >, 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 >.
|
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.
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< types::carray< T > >, RTT::internal::AssignableDataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::AssignableDataSource< ds_type >, RTT::internal::AssignableDataSource< RTT::scripting::ProgramInterface * >, 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::DataSource< T >, RTT::internal::ConstantDataSource< T >, RTT::internal::DataSource< ProgramInterfacePtr >, RTT::internal::DataSource< SendStatus >, RTT::internal::DataSource< double >, RTT::internal::DataSource< SendHandle< Signature > >, RTT::internal::DataSource< A >, RTT::internal::DataSource< S >, RTT::internal::DataSource< CORBA::Any_var >, RTT::internal::DataSource< unsigned int >, RTT::internal::DataSource< remove_cr< function::result_type >::type >, RTT::internal::DataSource< os::TimeService::Seconds >, RTT::internal::DataSource< arg_t >, RTT::internal::DataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::DataSource< second_arg_t >, RTT::internal::DataSource< ds_type >, RTT::internal::DataSource< bool >, RTT::internal::DataSource< StateMachinePtr >, RTT::internal::DataSource< boost::shared_ptr< ObjT > >, RTT::internal::DataSource< first_arg_t >, RTT::internal::ArrayPartDataSource< T >, RTT::internal::FusedFunctorDataSource< Signature, Enable >, RTT::corba::DataSourceProxy< T >, RTT::internal::PartDataSource< T >, RTT::internal::InputPortSource< T >, RTT::internal::ValueDataSource< T >, 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 >.
void RTT::DataSourceBase::deref | ( | ) | const |
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 refcount.
Referenced by RTT::base::intrusive_ptr_release().
|
pure virtual |
Force an evaluation of the DataSourceBase.
Implemented 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::DataSource< T >, RTT::internal::DataSource< ProgramInterfacePtr >, RTT::internal::DataSource< SendStatus >, RTT::internal::DataSource< double >, RTT::internal::DataSource< SendHandle< Signature > >, RTT::internal::DataSource< A >, RTT::internal::DataSource< S >, RTT::internal::DataSource< CORBA::Any_var >, RTT::internal::DataSource< unsigned int >, RTT::internal::DataSource< remove_cr< function::result_type >::type >, RTT::internal::DataSource< os::TimeService::Seconds >, RTT::internal::DataSource< arg_t >, RTT::internal::DataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::DataSource< second_arg_t >, RTT::internal::DataSource< ds_type >, RTT::internal::DataSource< bool >, RTT::internal::DataSource< StateMachinePtr >, RTT::internal::DataSource< boost::shared_ptr< ObjT > >, RTT::internal::DataSource< first_arg_t >, RTT::internal::FusedFunctorDataSource< Signature, Enable >, RTT::internal::InputPortSource< T >, and RTT::internal::DataObjectDataSource< T >.
Referenced by RTT::scripting::StatementProcessor::D::doPrint().
|
virtual |
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 getTypeInfo().
|
virtual |
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 getTypeInfo().
|
virtual |
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 getTypeInfo().
|
virtual |
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.
|
virtual |
Returns a const pointer to the sample contained in this data source, if there is any.
Returns 0 otherwise
Reimplemented in RTT::internal::DataSource< T >, RTT::internal::DataSource< ProgramInterfacePtr >, RTT::internal::DataSource< SendStatus >, RTT::internal::DataSource< double >, RTT::internal::DataSource< SendHandle< Signature > >, RTT::internal::DataSource< A >, RTT::internal::DataSource< S >, RTT::internal::DataSource< CORBA::Any_var >, RTT::internal::DataSource< unsigned int >, RTT::internal::DataSource< remove_cr< function::result_type >::type >, RTT::internal::DataSource< os::TimeService::Seconds >, RTT::internal::DataSource< arg_t >, RTT::internal::DataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::DataSource< second_arg_t >, RTT::internal::DataSource< ds_type >, RTT::internal::DataSource< bool >, RTT::internal::DataSource< StateMachinePtr >, RTT::internal::DataSource< boost::shared_ptr< ObjT > >, RTT::internal::DataSource< first_arg_t >, and RTT::internal::DataSource< T >.
Definition at line 117 of file DataSource.cpp.
|
virtual |
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< types::carray< T > >, RTT::internal::AssignableDataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::AssignableDataSource< ds_type >, RTT::internal::AssignableDataSource< RTT::scripting::ProgramInterface * >, RTT::internal::AssignableDataSource< value_t >, and RTT::internal::AssignableDataSource< bool >.
Definition at line 115 of file DataSource.cpp.
|
pure virtual |
Return useful type info in a human readable format.
Implemented in RTT::internal::DataSource< T >, RTT::internal::DataSource< ProgramInterfacePtr >, RTT::internal::DataSource< SendStatus >, RTT::internal::DataSource< double >, RTT::internal::DataSource< SendHandle< Signature > >, RTT::internal::DataSource< A >, RTT::internal::DataSource< S >, RTT::internal::DataSource< CORBA::Any_var >, RTT::internal::DataSource< unsigned int >, RTT::internal::DataSource< remove_cr< function::result_type >::type >, RTT::internal::DataSource< os::TimeService::Seconds >, RTT::internal::DataSource< arg_t >, RTT::internal::DataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::DataSource< second_arg_t >, RTT::internal::DataSource< ds_type >, RTT::internal::DataSource< bool >, RTT::internal::DataSource< StateMachinePtr >, RTT::internal::DataSource< boost::shared_ptr< ObjT > >, RTT::internal::DataSource< first_arg_t >, and RTT::corba::DataSourceProxy< T >.
Referenced by RTT::scripting::StatementProcessor::D::doPrint().
|
pure virtual |
Return the Orocos type info object.
Implemented in RTT::internal::DataSource< T >, RTT::internal::DataSource< ProgramInterfacePtr >, RTT::internal::DataSource< SendStatus >, RTT::internal::DataSource< double >, RTT::internal::DataSource< SendHandle< Signature > >, RTT::internal::DataSource< A >, RTT::internal::DataSource< S >, RTT::internal::DataSource< CORBA::Any_var >, RTT::internal::DataSource< unsigned int >, RTT::internal::DataSource< remove_cr< function::result_type >::type >, RTT::internal::DataSource< os::TimeService::Seconds >, RTT::internal::DataSource< arg_t >, RTT::internal::DataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::DataSource< second_arg_t >, RTT::internal::DataSource< ds_type >, RTT::internal::DataSource< bool >, RTT::internal::DataSource< StateMachinePtr >, RTT::internal::DataSource< boost::shared_ptr< ObjT > >, and RTT::internal::DataSource< first_arg_t >.
Referenced by RTT::types::BinaryOperator< function >::build(), getMember(), getMemberNames(), RTT::internal::DataSourceTypeInfo< UnknownType >::getType(), RTT::internal::DataSourceTypeInfo< UnknownType >::getTypeName(), and RTT::types::BinaryOperator< function >::isExactMatch().
|
pure virtual |
Return the Orocos type name, without const, pointer or reference qualifiers.
Implemented in RTT::internal::DataSource< T >, RTT::internal::DataSource< ProgramInterfacePtr >, RTT::internal::DataSource< SendStatus >, RTT::internal::DataSource< double >, RTT::internal::DataSource< SendHandle< Signature > >, RTT::internal::DataSource< A >, RTT::internal::DataSource< S >, RTT::internal::DataSource< CORBA::Any_var >, RTT::internal::DataSource< unsigned int >, RTT::internal::DataSource< remove_cr< function::result_type >::type >, RTT::internal::DataSource< os::TimeService::Seconds >, RTT::internal::DataSource< arg_t >, RTT::internal::DataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::DataSource< second_arg_t >, RTT::internal::DataSource< ds_type >, RTT::internal::DataSource< bool >, RTT::internal::DataSource< StateMachinePtr >, RTT::internal::DataSource< boost::shared_ptr< ObjT > >, and RTT::internal::DataSource< first_arg_t >.
|
virtual |
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< types::carray< T > >, RTT::internal::AssignableDataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::AssignableDataSource< ds_type >, RTT::internal::AssignableDataSource< RTT::scripting::ProgramInterface * >, RTT::internal::AssignableDataSource< value_t >, and RTT::internal::AssignableDataSource< bool >.
Definition at line 104 of file DataSource.cpp.
void RTT::DataSourceBase::ref | ( | ) | const |
Increase the reference count by one.
Definition at line 80 of file DataSource.cpp.
References RTT::os::AtomicInt::inc(), and 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(), stack_const_ptr(), stack_shared_ptr(), and RTT::corba::RemoteChannelElement< T >::write().
|
virtual |
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::AliasDataSource< T >, 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::scripting::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().
|
static |
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 ref().
|
static |
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 ref().
std::string RTT::DataSourceBase::toString | ( | ) |
Get the contents of this object as a string.
Definition at line 98 of file DataSource.cpp.
|
virtual |
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< types::carray< T > >, RTT::internal::AssignableDataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::AssignableDataSource< ds_type >, RTT::internal::AssignableDataSource< RTT::scripting::ProgramInterface * >, RTT::internal::AssignableDataSource< value_t >, and RTT::internal::AssignableDataSource< bool >.
Definition at line 108 of file DataSource.cpp.
|
virtual |
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< types::carray< T > >, RTT::internal::AssignableDataSource< remove_cr< boost::function_traits< Signature >::result_type >::type >, RTT::internal::AssignableDataSource< ds_type >, RTT::internal::AssignableDataSource< RTT::scripting::ProgramInterface * >, RTT::internal::AssignableDataSource< value_t >, and RTT::internal::AssignableDataSource< bool >.
Definition at line 120 of file DataSource.cpp.
|
virtual |
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().
std::ostream & RTT::DataSourceBase::write | ( | std::ostream & | os | ) |
Stream the contents of this object.
Definition at line 91 of file DataSource.cpp.
|
mutableprotected |
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.