Orocos Real-Time Toolkit
2.9.0
|
#include <rtt/types/MemberFactory.hpp>
Public Member Functions | |
virtual | ~MemberFactory () |
Inspecting data structures. | |
Used to write a complex type to an external representation, like XML. | |
virtual bool | resize (base::DataSourceBase::shared_ptr arg, int size) const |
Tries to resize a data source in case it's a resizable sequence. More... | |
virtual std::vector< std::string > | getMemberNames () const |
Returns the list of struct member names of this type. More... | |
virtual 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. More... | |
virtual base::DataSourceBase::shared_ptr | getMember (base::DataSourceBase::shared_ptr item, base::DataSourceBase::shared_ptr id) const |
Returns a member of a given data source identified by a data source id. More... | |
virtual bool | getMember (internal::Reference *ref, base::DataSourceBase::shared_ptr item, const std::string &name) const |
Stores a reference to a member of a struct identified by its name. More... | |
Definition at line 15 of file MemberFactory.hpp.
|
inlinevirtual |
Definition at line 18 of file MemberFactory.hpp.
|
virtual |
Returns a member of a given data source struct identified by its name.
item | The item of which to return a reference to a member |
name | The name of a member within item. Is a name of a member in case of a struct or an index number in case of a sequence. |
Reimplemented in RTT::types::CArrayTypeInfo< T, has_ostream >, RTT::types::StructTypeInfo< T, has_ostream >, RTT::types::BoostArrayTypeInfo< T, has_ostream >, RTT::types::PrimitiveSequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< rt_string, true >, RTT::types::SequenceTypeInfo< std::string, true >, RTT::types::SequenceTypeInfo< std::vector< double >, true >, and RTT::types::SequenceTypeInfo< std::vector< T >, has_ostream >.
|
virtual |
Returns a member of a given data source identified by a data source id.
This will be an int (for indexing) or a string (for the member name).
item | The item of which to return a member |
id | Or a string data source containing the name of a member if item is a struct, Or an unsigned int data source containing the index of an element if item is a sequence |
Reimplemented in RTT::types::CArrayTypeInfo< T, has_ostream >, RTT::types::BoostArrayTypeInfo< T, has_ostream >, RTT::types::StructTypeInfo< T, has_ostream >, RTT::types::PrimitiveSequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< rt_string, true >, RTT::types::SequenceTypeInfo< std::string, true >, RTT::types::SequenceTypeInfo< std::vector< double >, true >, and RTT::types::SequenceTypeInfo< std::vector< T >, has_ostream >.
|
virtual |
Stores a reference to a member of a struct identified by its name.
This method does not allocate memory when item is assignable..
ref | The reference object in which to store the reference. |
item | The item of which to return a reference to a member. It must be assignable, otherwise, a reference to a copy of item will be returned. This copy will allocate memory. |
name | The name of a member within item. |
Reimplemented in RTT::types::StructTypeInfo< T, has_ostream >.
|
virtual |
Returns the list of struct member names of this type.
In case this type is not a struct, returns an empty list.
Reimplemented in RTT::types::CArrayTypeInfo< T, has_ostream >, RTT::types::BoostArrayTypeInfo< T, has_ostream >, RTT::types::StructTypeInfo< T, has_ostream >, RTT::types::PrimitiveSequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< rt_string, true >, RTT::types::SequenceTypeInfo< std::string, true >, RTT::types::SequenceTypeInfo< std::vector< double >, true >, and RTT::types::SequenceTypeInfo< std::vector< T >, has_ostream >.
Definition at line 12 of file MemberFactory.cpp.
|
virtual |
Tries to resize a data source in case it's a resizable sequence.
Reimplemented in RTT::types::StructTypeInfo< T, has_ostream >, RTT::types::PrimitiveSequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< T, has_ostream >, RTT::types::SequenceTypeInfo< rt_string, true >, RTT::types::SequenceTypeInfo< std::string, true >, RTT::types::SequenceTypeInfo< std::vector< double >, true >, and RTT::types::SequenceTypeInfo< std::vector< T >, has_ostream >.
Definition at line 8 of file MemberFactory.cpp.