34 #ifndef VECTOR_TEMPLATE_COMPOSITION_HPP 35 #define VECTOR_TEMPLATE_COMPOSITION_HPP 37 #include "../Property.hpp" 38 #include "../PropertyBag.hpp" 40 #include "../Logger.hpp" 41 #include "../internal/DataSources.hpp" 52 if ( tir->type( bag.
getType()) == tir->getTypeInfo< T >() ) {
54 int dimension = bag.
size();
55 result.resize( dimension );
58 int size_correction = 0;
59 for (
int i = 0; i < dimension ; i++) {
64 if ( element->
getName() ==
"Size" ) {
71 <<
" got type " << element->
getType()
75 result[ i - size_correction ] = comp->
get();
77 result.resize( dimension - size_correction );
81 <<
" type mismatch, got type '"<< bag.
getType()
DataSourceType get() const
Get a copy of the value of the property.
const std::string & getType() const
Base class for all properties.
A container for holding references to properties.
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
Returns the type of this PropertyBase.
TypeInfoRepository::shared_ptr Types()
Obtain a pointer to the global type system.
base::PropertyBase * getItem(int i) const
Returns the i'th Property, starting from 0.
static Logger & log()
As Instance(), but more userfriendly.
const std::string & getName() const
Get the name of the property.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
size_t size() const
Get the number of Properties in this bag.
boost::shared_ptr< TypeInfoRepository > shared_ptr
static const std::string & getTypeName()
Return the unqualified typename.
bool composeTemplateProperty(const PropertyBag &bag, T &result)