39 #ifndef ORO_SEQUENCE_TYPE_INFO_BASE_HPP 40 #define ORO_SEQUENCE_TYPE_INFO_BASE_HPP 47 #include "../internal/FusedFunctorDataSource.hpp" 48 #include "../internal/DataSourceGenerator.hpp" 49 #include <boost/lexical_cast.hpp> 63 return cont.capacity();
87 if (index >= (
int) (cont.size()) || index < 0)
102 if (index >= (
int) (cont.size()) || index < 0)
146 T t_init(size,
typename T::value_type() );
153 if (arg->isAssignable()) {
155 asarg->
set().resize( size );
203 std::vector<std::string> result;
204 result.push_back(
"size");
205 result.push_back(
"capacity");
212 unsigned int indx = boost::lexical_cast<
unsigned int>(name);
226 if ( id_name->
get() ==
"size" ) {
231 if ( id_name->
get() ==
"capacity" ) {
240 if ( item->isAssignable() )
247 log(
Error) <<
"SequenceTypeInfo: No such member : " << id_name->
get() <<
endlog();
252 if ( !id_name && ! id_indx)
253 log(
Error) <<
"SequenceTypeInfo: Not a member or index : " <<
id <<
":"<<
id->getTypeName() <<
endlog();
virtual result_t get() const =0
void addConstructor(TypeConstructor *tb)
boost::call_traits< value_t >::reference reference_t
const std::string & getType() const
bool resize(base::DataSourceBase::shared_ptr arg, int size) const
std::vector< std::string > getMemberNames() const
virtual void set(param_t t)=0
int get_capacity(T const &cont)
bool RTT_API composePropertyBag(PropertyBag const &sourcebag, PropertyBag &target)
base::DataSourceBase * newFunctorDataSource(Function f, const std::vector< base::DataSourceBase::shared_ptr > &args)
A container for holding references to properties.
bool get_container_item_copy(const std::vector< bool > &cont, int index)
base::DataSourceBase::shared_ptr getMember(base::DataSourceBase::shared_ptr item, const std::string &name) const
base::DataSourceBase::shared_ptr decomposeType(base::DataSourceBase::shared_ptr source) const
TypeConstructor * newConstructor(Function *foo, bool automatic=false)
virtual const_reference_t rvalue() const =0
static std::ostream & endl(std::ostream &__os)
base::AttributeBase * buildVariable(std::string name, int size) const
static AssignableDataSource< T > * narrow(base::DataSourceBase *db)
boost::intrusive_ptr< DataSource< T > > shared_ptr
boost::intrusive_ptr< AssignableDataSource< T > > shared_ptr
bool composeType(base::DataSourceBase::shared_ptr dssource, base::DataSourceBase::shared_ptr dsresult) const
base::DataSourceBase::shared_ptr getMember(base::DataSourceBase::shared_ptr item, base::DataSourceBase::shared_ptr id) const
bool installTypeInfoObject(TypeInfo *ti)
static DataSource< T > * narrow(base::DataSourceBase *db)
virtual std::string getTypeName() const
bool get_container_item(std::vector< bool > &cont, int index)
boost::intrusive_ptr< DataSourceBase > shared_ptr
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
int get_size(T const &cont)
static Logger::LogFunction endlog()
bool composeTemplateProperty(const PropertyBag &bag, T &result)