39 #ifndef ORO_TEMPLATE_BOOSTARRAY_INFO_HPP 40 #define ORO_TEMPLATE_BOOSTARRAY_INFO_HPP 43 #include "../internal/ArrayPartDataSource.hpp" 45 #include <boost/lexical_cast.hpp> 46 #include <boost/array.hpp> 67 template<
typename T,
bool has_ostream = false>
93 std::vector<std::string> result;
94 result.push_back(
"size");
95 result.push_back(
"capacity");
107 if (name ==
"size" || name ==
"capacity") {
113 unsigned int indx = boost::lexical_cast<
unsigned int>(name);
117 log(
Error) <<
"BoostArrayTypeInfo: No such part (or invalid index): " << name <<
endlog();
134 if (id_name->
get() ==
"size" || id_name->
get() ==
"capacity") {
142 log(
Error) <<
"BoostArrayTypeInfo: No such part (or invalid index): " << id_name->
get() << id_indx->
get() <<
endlog();
166 if(result.size() != source.
size()) {
167 log(
Error) <<
"Refusing to compose Boost Arrays from a property list of different size. Use the same number of properties as the C++ boost array size." <<
endlog();
180 assert(result.size() == source.
size());
181 assert(source.
size() == target.size());
182 assert(source.
size() == decomp.size());
virtual result_t get() const =0
virtual base::DataSourceBase::shared_ptr decomposeType(base::DataSourceBase::shared_ptr source) const
boost::call_traits< value_t >::reference reference_t
const std::string & getType() const
virtual base::DataSourceBase::shared_ptr getMember(base::DataSourceBase::shared_ptr item, const std::string &name) const
virtual base::DataSourceBase::shared_ptr getMember(base::DataSourceBase::shared_ptr item, base::DataSourceBase::shared_ptr id) 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.
bool installTypeInfoObject(TypeInfo *ti)
virtual const_reference_t rvalue() const =0
void setMemberFactory(MemberFactoryPtr mf)
bool installTypeInfoObject(TypeInfo *ti)
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
BoostArrayTypeInfo(std::string name)
static DataSource< T > * narrow(base::DataSourceBase *db)
virtual bool composeType(base::DataSourceBase::shared_ptr dssource, base::DataSourceBase::shared_ptr dsresult) const
virtual std::vector< std::string > getMemberNames() const
boost::intrusive_ptr< DataSourceBase > shared_ptr
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
boost::shared_ptr< TypeInfoRepository > shared_ptr
static Logger::LogFunction endlog()
boost::shared_ptr< PrimitiveTypeInfo< T, use_ostream > > getSharedPtr()