1 #ifndef ORO_PRIMITIVE_TYPEINFO_HPP 2 #define ORO_PRIMITIVE_TYPEINFO_HPP 5 #include "../Property.hpp" 6 #include "../Attribute.hpp" 7 #include "../Logger.hpp" 12 #include "../rtt-config.h" 31 template<
typename T,
bool use_ostream = false>
39 boost::shared_ptr<PrimitiveTypeInfo<T, use_ostream> >
mshared;
62 boost::shared_ptr<PrimitiveTypeInfo<T, use_ostream> >
getSharedPtr() {
DataSource is a base class representing a generic way to read data of type T.
void setStreamFactory(StreamFactoryPtr sf)
void setValueFactory(ValueFactoryPtr dsf)
virtual void set(param_t t)=0
Set this DataSource with a value.
PrimitiveTypeInfo(std::string name)
Setup Type Information for type name.
virtual bool composeType(base::DataSourceBase::shared_ptr source, base::DataSourceBase::shared_ptr result) const
A container for holding references to properties.
All generator classes inherit from this object in order to allow them to be added to the TypeInfoRepo...
bool installTypeInfoObject(TypeInfo *ti)
Installs the type info object in the global data source type info handler and adds any additional fea...
void setTypeId(TypeId tid)
virtual bool decomposeType(base::DataSourceBase::shared_ptr source, PropertyBag &targetbag) const
virtual std::ostream & write(std::ostream &os, base::DataSourceBase::shared_ptr in) const
Output this datasource as a human readable string.
virtual ~PrimitiveTypeInfo()
virtual const_reference_t rvalue() const =0
Get a const reference to the value of this DataSource.
virtual const std::string & getTypeName() const
Return the type name for which this generator generates type info features.
boost::shared_ptr< PrimitiveTypeInfo< T, use_ostream > > mshared
A class for representing a user type, and which can build instances of that type. ...
virtual base::DataSourceBase::shared_ptr decomposeType(base::DataSourceBase::shared_ptr source) const
A primitive type is decomposed into itself.
virtual bool isStreamable() const
Returns true if this type is directly streamable using read()/write() or toString()/fromString().
boost::intrusive_ptr< DataSource< T > > shared_ptr
boost::intrusive_ptr< AssignableDataSource< T > > shared_ptr
Use this type to store a pointer to an AssignableDataSource.
Every DataSource of type T has a type info class which it can ask type information.
static shared_ptr Instance()
virtual std::istream & read(std::istream &os, base::DataSourceBase::shared_ptr out) const
Read a new value for this datasource from a human readable string.
A DataSource which has set() methods.
T DataType
The given T parameter is the type of the DataSources.
TypeInfo * getTypeInfoObject() const
Returns the TypeInfo object of this type, or null if none exists yet.
boost::intrusive_ptr< DataSourceBase > shared_ptr
Use this type to store a pointer to a DataSourceBase.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
virtual void updated()
In case the internal::DataSource returns a 'reference' type, call this method to notify it that the d...
This template class allows primitive types, which are not sent over ports, to be added to Orocos...
boost::shared_ptr< PrimitiveTypeInfo< T, use_ostream > > getSharedPtr()