1 #ifndef ORO_CORELIB_DATASOURCES_INL 2 #define ORO_CORELIB_DATASOURCES_INL 52 if ( replace[
this] != 0 ) {
133 : mdata(size ? new typename T::value_type[size] : 0 ), marray(mdata,size)
139 :
mdata( oarray.count() ? new typename T::value_type[oarray.count()] : 0 ),
marray(
mdata, oarray.count())
148 mdata = size ?
new typename T::value_type[size] : 0;
149 for(std::size_t i=0; i!= size; ++i)
mdata[i] =
typename T::value_type();
171 if ( replace[
this] != 0 ) {
181 template<
typename BoundT>
187 template<
typename BoundT>
192 template<
typename BoundT>
194 if ( replace[
this] != 0 )
DataSource< T >::value_t mdata
AssignableDataSource< T >::reference_t set()
Get a reference to the value of this DataSource.
boost::call_traits< value_t >::reference reference_t
virtual ValueDataSource< T > * copy(std::map< const base::DataSourceBase *, base::DataSourceBase * > &replace) const
Create a deep copy of this internal::DataSource, unless it is already cloned.
virtual ConstReferenceDataSource< T > * copy(std::map< const base::DataSourceBase *, base::DataSourceBase * > &alreadyCloned) const
Create a deep copy of this internal::DataSource, unless it is already cloned.
void newArray(std::size_t size)
Clears the array of this data source and creates a new one.
virtual ConstantDataSource< T > * copy(std::map< const base::DataSourceBase *, base::DataSourceBase * > &alreadyCloned) const
Create a deep copy of this internal::DataSource, unless it is already cloned.
DataSource< T >::result_t value() const
Return the result of the last evaluate() function.
ConstReferenceDataSource(typename DataSource< T >::const_reference_t ref)
A DataSource which is used to manipulate a reference to an external value.
virtual ReferenceDataSource< T > * clone() const
Return a shallow clone of this DataSource.
A DataSource which is used to read a const reference to an external value.
~ConstReferenceDataSource()
Use shared_ptr.
virtual ConstReferenceDataSource< T > * clone() const
Return a shallow clone of this DataSource.
ArrayDataSource(std::size_t size=0)
Create and allocate an Array of a fixed size.
ReferenceDataSource(typename AssignableDataSource< T >::reference_t ref)
void set(typename AssignableDataSource< T >::param_t t)
AssignableDataSource< T >::reference_t set()
Get a reference to the value of this DataSource.
virtual ReferenceDataSource< T > * copy(std::map< const base::DataSourceBase *, base::DataSourceBase * > &alreadyCloned) const
Create a deep copy of this internal::DataSource, unless it is already cloned.
virtual ArrayDataSource< T > * copy(std::map< const base::DataSourceBase *, base::DataSourceBase * > &replace) const
Create a deep copy of this internal::DataSource, unless it is already cloned.
A special DataSource only to be used for if you understand the copy()/clone() semantics very well...
A DataSource which holds a constant value and returns it in its get() method.
~ArrayDataSource()
Use shared_ptr.
A DataSource that holds a fixed size array, using the types::carray class.
virtual ConstantDataSource< T > * clone() const
Return a shallow clone of this DataSource.
virtual ValueDataSource< T > * clone() const
Return a shallow clone of this DataSource.
AssignableDataSource< T >::reference_t set()
Get a reference to the value of this DataSource.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
void ref() const
Increase the reference count by one.
A simple, yet very useful DataSource, which keeps a value, and returns it in its get() method...
~ValueDataSource()
Use shared_ptr.
details::GetConstRef< T >::type const_reference_t
virtual ArrayDataSource< T > * clone() const
Return a shallow clone of this DataSource.
virtual UnboundDataSource< BoundType > * copy(std::map< const base::DataSourceBase *, base::DataSourceBase * > &replace) const
ConstantDataSource(T value)
~ReferenceDataSource()
Use shared_ptr.
~ConstantDataSource()
Use shared_ptr.
boost::call_traits< value_t >::param_type param_t