38 #include "../types/TypeInfoName.hpp" 41 #include "../types/Types.hpp" 42 #include "../types/TypeTransporter.hpp" 48 return mobj->getTypeInfo()->write( os, mobj );
63 using namespace detail;
67 const char*
bad_assignment::what()
const throw() {
return "Bad DataSource assignment: incompatible types."; }
94 return mobj->getTypeInfo()->write( os, mobj );
101 return mobj->getTypeInfo()->toString( mobj );
125 if ( part_name.empty() )
151 TypeInfoObject =
new TypeInfo(
"unknown_t");
152 return TypeInfoObject;
172 return TypeInfoObject;
virtual void const * getRawConstPointer()
Returns a const pointer to the sample contained in this data source, if there is any.
const std::string & getTypeName() const
Return the type name which was first registered.
virtual std::vector< std::string > getMemberNames() const
Returns the names of all members of the structure contained in this data source, or an empty list if ...
The base class for all internal data representations.
static const std::string & getQualifier()
Return the 'const', 'ref', 'pointer' qualifier for this type.
std::ostream & write(std::ostream &os)
Stream the contents of this object.
static shared_ptr stack_shared_ptr(DataSourceBase *dsb)
Returns a shared ptr to a DataSourceBase living on the stack.
virtual ActionInterface * updateAction(DataSourceBase *other)
Generate a ActionInterface object which will update this internal::DataSource with the value of anoth...
void RTT_API intrusive_ptr_add_ref(ChannelElementBase *e)
virtual ~DataSourceBase()
the destructor is private.
virtual const types::TypeInfo * getTypeInfo() const =0
Return the Orocos type info object.
os::AtomicInt refcount
We keep the refcount ourselves.
virtual ~bad_assignment()
virtual void reset()
Reset the data to initial values.
virtual void * getRawPointer()
Returns a pointer to the sample contained in this data source, if there is any, and if it is an lvalu...
virtual const char * what() const
virtual bool isAssignable() const
Returns true if this object can be cast to an AssignableDataSource.
virtual bool update(DataSourceBase *other)
Update the value of this internal::DataSource with the value of an other DataSource.
static const std::string & getType()
Return the qualified type.
std::vector< std::string > getMemberNames() const
Returns the list of struct member names of this type.
bool dec_and_test()
Decrement and test if the result is zero.
static const types::TypeInfo * getTypeInfo()
Return the typeinfo object.
base::DataSourceBase::shared_ptr getMember(base::DataSourceBase::shared_ptr item, const std::string &name) const
Returns a member of a given data source struct identified by its name.
RTT_API std::ostream & operator<<(std::ostream &os, DataSourceBase::shared_ptr dsb)
Stream the contents of this object.
Based on the software pattern 'command', this interface allows execution of action objects...
A class for representing a user type, and which can build instances of that type. ...
static const_ptr stack_const_ptr(const DataSourceBase *dsb)
Returns a const shared_ptr to a DataSourceBase living on the stack.
virtual shared_ptr getMember(const std::string &member_name)
Get a (const) reference data source to a member of the structure of this data source.
boost::intrusive_ptr< const DataSourceBase > const_ptr
Use this type to store a const pointer to a DataSourceBase.
Every DataSource of type T has a type info class which it can ask type information.
void RTT_API intrusive_ptr_release(ChannelElementBase *e)
std::string toString()
Get the contents of this object as a string.
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.
void ref() const
Increase the reference count by one.
void deref() const
Decrease the reference count by one and delete this on zero.
virtual void updated()
In case the internal::DataSource returns a 'reference' type, call this method to notify it that the d...
static const std::string & getTypeName()
Return the unqualified typename.
virtual shared_ptr getParent()
Returns the top level data source that contains the full data structure this data source refers to...