38 #ifndef PI_PROPERTIES_XMLRPCSERIALIZER 39 #define PI_PROPERTIES_XMLRPCSERIALIZER 45 #include "../Property.hpp" 46 #include "../base/PropertyIntrospection.hpp" 60 template<
typename output_stream>
61 class XMLRPCMarshaller
62 :
public MarshallInterface,
public base::PropertyIntrospection,
63 public StreamProcessor<output_stream>
72 *(this->s) <<
"<name>" << v.
getName() <<
"</name>" 73 <<
"<value><boolean>" << v.
get() <<
"</boolean></value>\n";
78 *(this->s) <<
"<name>" << v.
getName() <<
"</name>" 79 <<
"<value><string>" << v.
get() <<
"</string></value>\n";
84 *(this->s) <<
"<name>" << v.
getName() <<
"</name>" 85 <<
"<value><int>" << v.
get() <<
"</int></value>\n";
90 *(this->s) <<
"<name>" << v.
getName() <<
"</name>" 91 <<
"<value><double>" << v.
get() <<
"</double></value>\n";
96 *(this->s) <<
"<name>" << v.
getName() <<
"</name>" 97 <<
"<value><string>" << v.
get() <<
"</string></value>\n";
102 *(this->s) <<
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
103 *(this->s) <<
"<xmlrpc>\n";
106 std::vector<base::PropertyBase*>::const_iterator i = v.
getProperties().begin();
110 (*i)->identify(
this);
112 *(this->s) <<
"\n</xmlrpc>\n";
117 *(this->s) <<
"<struct><name>"<<b.
getName()<<
"</name>\n";
120 std::vector<base::PropertyBase*>::const_iterator i = v.
getProperties().begin();
124 *(this->s) <<
"<member>\n";
125 (*i)->identify(
this);
126 *(this->s) <<
"</member>";
128 *(this->s) <<
"</struct>\n";
virtual void flush()
Flush all buffers, write footers.
DataSourceType get() const
Get a copy of the value of the property.
virtual void serialize(const Property< double > &v)
virtual void introspect(const Property< bool > &v)
A container for holding references to properties.
virtual void serialize(const Property< int > &v)
XMLRPCMarshaller(output_stream &os)
virtual void introspect(const Property< char > &v)
virtual void introspect(const Property< std::string > &v)
Properties & getProperties()
Returns a list of all the property objects in this bag.
An interface for setting and getting a stream object.
virtual void serialize(const Property< bool > &v)
virtual void serialize(const Property< PropertyBag > &b)
virtual void serialize(const Property< char > &v)
virtual void serialize(const Property< std::string > &v)
const std::string & getName() const
Get the name of the property.
void serialize(Archive &a, RTT::ConnPolicy &c, unsigned int)
Serializes RTT::ConnPolicy objects.
virtual void introspect(const Property< double > &v)
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
virtual void introspect(const Property< PropertyBag > &v)
virtual void introspect(const Property< int > &v)
virtual void serialize(const PropertyBag &v)
Serialize the contents of a property bag with headers and footers.