38 #ifndef PI_PROPERTIES_TABLESERIALIZER 39 #define PI_PROPERTIES_TABLESERIALIZER 41 #include <rtt/Property.hpp> 42 #include <rtt/base/PropertyIntrospection.hpp> 43 #include <rtt/marsh/StreamProcessor.hpp> 44 #include <rtt/marsh/MarshallInterface.hpp> 55 template<
typename o_stream>
57 :
public marsh::MarshallInterface,
public marsh::StreamProcessor<o_stream>
61 typedef o_stream output_stream;
62 typedef o_stream OutputStream;
71 marsh::StreamProcessor<o_stream>(os), msep(sep)
76 virtual void serialize(base::PropertyBase* v)
79 Property<PropertyBag>* bag =
dynamic_cast< Property<PropertyBag>*
>( v );
81 this->serialize( bag->value() );
83 *this->s << v->getDataSource();
87 virtual void serialize(
const PropertyBag &v)
90 PropertyBag::const_iterator i = v.getProperties().begin();
91 i != v.getProperties().end();
94 this->serialize( *i );
101 *this->s << msep <<std::endl;
A marsh::MarshallInterface for generating a stream of numbers, ordered in columns.
TableMarshaller(output_stream &os, std::string sep=" ")
Create a new marshaller, streaming the data to a stream.