39 #ifndef ORO_PARTDATASOURCE_HPP_ 40 #define ORO_PARTDATASOURCE_HPP_ 43 #include "../types/carray.hpp" 68 typedef boost::intrusive_ptr<PartDataSource<T> >
shared_ptr;
78 : mref(ref), mparent(parent)
118 if ( replace[
this] != 0 ) {
123 assert( mparent->getRawPointer() != 0 &&
"Can't copy part of rvalue datasource.");
124 if ( mparent->getRawPointer() == 0 )
125 throw std::runtime_error(
"PartDataSource.hpp: Can't copy part of rvalue datasource.");
128 int offset =
reinterpret_cast<unsigned char*
>( &
mref ) - reinterpret_cast<unsigned char*>(mparent->getRawPointer());
162 : mref(ref), mparent(parent)
200 virtual PartDataSource*
copy( std::map<const base::DataSourceBase*, base::DataSourceBase*>& replace )
const {
202 if ( replace[
this] != 0 ) {
203 assert ( dynamic_cast<PartDataSource*>( replace[
this] ) == static_cast<PartDataSource*>( replace[
this] ) );
207 assert( mparent->getRawPointer() != 0 &&
"Can't copy part of rvalue datasource.");
208 if ( mparent->getRawPointer() == 0 )
209 throw std::runtime_error(
"PartDataSource.hpp: Can't copy part of rvalue datasource.");
212 int offset =
reinterpret_cast<unsigned char*
>( mref.
address() ) - reinterpret_cast<unsigned char*>(mparent->getRawPointer());
215 mref_copy.
init(reinterpret_cast<T*>( reinterpret_cast<unsigned char*>(mparent_copy->getRawPointer()) + offset ), mref.
count() );
types::carray< T > value() const
void init(value_type *t, std::size_t s)
virtual PartDataSource< T > * clone() const
value_type * address() const
boost::call_traits< value_t >::reference reference_t
types::carray< T > const & rvalue() const
std::size_t count() const
virtual PartDataSource * clone() const
DataSource< T >::result_t value() const
AssignableDataSource< T >::reference_t mref
base::DataSourceBase::shared_ptr mparent
PartDataSource(typename AssignableDataSource< T >::reference_t ref, base::DataSourceBase::shared_ptr parent)
base::DataSourceBase::shared_ptr mparent
boost::intrusive_ptr< PartDataSource< T > > shared_ptr
virtual PartDataSource * copy(std::map< const base::DataSourceBase *, base::DataSourceBase * > &replace) const
DataSource< T >::value_t value_t
DataSource< T >::const_reference_t const_reference_t
boost::intrusive_ptr< DataSourceBase > shared_ptr
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
PartDataSource(types::carray< T > ref, base::DataSourceBase::shared_ptr parent)
AssignableDataSource< T >::const_reference_t rvalue() const
boost::intrusive_ptr< PartDataSource< T > > shared_ptr
boost::call_traits< value_t >::param_type param_t
virtual PartDataSource< T > * copy(std::map< const base::DataSourceBase *, base::DataSourceBase * > &replace) const