39 #ifndef ORO_TEMPLATE_CARRAY_INFO_HPP 40 #define ORO_TEMPLATE_CARRAY_INFO_HPP 43 #include "../internal/ArrayPartDataSource.hpp" 44 #include <boost/lexical_cast.hpp> 46 #include "../internal/carray.hpp" 62 template<
typename T,
bool has_ostream = false>
104 std::vector<std::string> result;
105 result.push_back(
"size");
106 result.push_back(
"capacity");
115 if (name ==
"size" || name ==
"capacity") {
126 unsigned int indx = boost::lexical_cast<
unsigned int>(name);
130 log(
Error) <<
"CArrayTypeInfo: No such part (or invalid index): " << name <<
endlog();
146 if (id_name->
get() ==
"size" || id_name->
get() ==
"capacity") {
188 if(result.count() != source.
size()) {
189 log(
Error) <<
"Refusing to compose C Arrays from a property list of different size. Use the same number of properties as the C array size." <<
endlog();
202 assert(result.count() == source.
size());
203 assert(source.
size() == target.size());
204 assert(source.
size() == decomp.size());
virtual result_t get() const =0
virtual base::DataSourceBase::shared_ptr decomposeType(base::DataSourceBase::shared_ptr source) const
virtual std::vector< std::string > getMemberNames() const
bool installTypeInfoObject(TypeInfo *ti)
virtual base::AttributeBase * buildVariable(std::string name, int sizehint) const
boost::call_traits< value_t >::reference reference_t
const std::string & getType() const
void newArray(std::size_t size)
boost::intrusive_ptr< ArrayDataSource< T > > shared_ptr
virtual base::DataSourceBase::shared_ptr getMember(base::DataSourceBase::shared_ptr item, const std::string &name) const
bool refreshProperties(const PropertyBag &target, const PropertyBag &source, bool allprops)
virtual void set(param_t t)=0
bool RTT_API composePropertyBag(PropertyBag const &sourcebag, PropertyBag &target)
void setCompositionFactory(CompositionFactoryPtr cf)
A container for holding references to properties.
DataSource< T >::result_t get() const
virtual base::DataSourceBase::shared_ptr getMember(base::DataSourceBase::shared_ptr item, base::DataSourceBase::shared_ptr id) const
bool installTypeInfoObject(TypeInfo *ti)
virtual const_reference_t rvalue() const =0
virtual const std::string & getTypeName() const
void setMemberFactory(MemberFactoryPtr mf)
TypeInfoRepository::shared_ptr Types()
bool typeDecomposition(base::DataSourceBase::shared_ptr dsb, PropertyBag &targetbag, bool recurse)
boost::intrusive_ptr< DataSource< T > > shared_ptr
boost::intrusive_ptr< AssignableDataSource< T > > shared_ptr
static DataSource< T > * narrow(base::DataSourceBase *db)
boost::intrusive_ptr< DataSourceBase > shared_ptr
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
boost::shared_ptr< TypeInfoRepository > shared_ptr
CArrayTypeInfo(std::string name)
static Logger::LogFunction endlog()
virtual bool composeType(base::DataSourceBase::shared_ptr dssource, base::DataSourceBase::shared_ptr dsresult) const
boost::shared_ptr< PrimitiveTypeInfo< T, use_ostream > > getSharedPtr()