40 #ifndef MULTIVECTOR_COMPOSITION_HPP 41 #define MULTIVECTOR_COMPOSITION_HPP 44 #include "../Property.hpp" 45 #include "../PropertyBag.hpp" 46 #include "../Logger.hpp" 55 template<
class T,
int S>
63 result.
value().add( dimension );
65 std::stringstream data_name;
67 for (
int i=0; i < dimension->
get() ; i++)
70 result.value().add(
new Property<T>(data_name.str(),
"",vec[i]) );
79 template<
class T,
int S>
87 result.
value().add( dimension );
89 std::stringstream data_name;
91 for (
int i=0; i < dimension->
get() ; i++)
94 result.value().add(
new Property<T>(data_name.str(),
"",vec[i]) );
106 template<
class T,
int S>
121 v_base = v_bag->
get().find(
"Size");
124 << result.getName() <<
" : could not find property \"Size\"."<<
Logger::endl;
130 << result.getName() <<
" : Expected \"Size\" to be of type short."<<
Logger::endl;
133 int dimension = dim->
get();
135 std::stringstream data_name;
138 for (
int i = 0; i < dimension ; i++)
142 if ( element == 0 ) {
144 <<
": Data element "<< data_name.str() <<
" not found !" 153 <<
" got type " << element->
getType()
157 result.value()[i] = comp->
get();
166 << result.getName() <<
" : type mismatch, got type '"<< v_bag->
get().getType() <<
"'"<<
Logger::endl;
169 << result.getName() <<
" : not a PropertyBag."<<
Logger::endl;
DataSourceType get() const
virtual void introspect(PropertyBase *p)
A container for holding references to properties.
base::PropertyBase * find(const std::string &name) const
static std::string GetType()
A property represents a named value of any type with a description.
static std::ostream & endl(std::ostream &__os)
virtual std::string getType() const =0
virtual const types::TypeInfo * getTypeInfo() const
TypeInfoRepository::shared_ptr Types()
void deleteProperties(PropertyBag &target)
boost::intrusive_ptr< DataSourceBase > shared_ptr
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
virtual DataSourceBase::shared_ptr getDataSource() const =0