29 #ifndef Pt_Xml_XmlSerializer_h
30 #define Pt_Xml_XmlSerializer_h
32 #include <Pt/Xml/Api.h>
33 #include <Pt/Xml/XmlFormatter.h>
34 #include <Pt/Xml/XmlSerializationContext.h>
35 #include <Pt/Serializer.h>
52 this->
reset( &_xmlcontext );
61 this->
reset( &_xmlcontext );
83 return _formatter.
writer();
95 #endif // Pt_Xml_XmlSerializer_h
void attach(XmlWriter &writer)
Attach to an XmlWriter.
Definition: XmlSerializer.h:67
XmlSerializer(XmlWriter &writer)
Construct to use an XmlWriter.
Definition: XmlSerializer.h:58
void detach()
Detach from its XmlWriter.
Definition: XmlSerializer.h:74
Writes XML to a text stream.
Definition: XmlWriter.h:52
Serializes a set of types.
Definition: Serializer.h:45
Serialization context for XML serialization.
Definition: XmlSerializationContext.h:45
XmlWriter * writer()
Returns the attached XmlWriter or a nullptr.
Definition: XmlSerializer.h:81
void reset(SerializationContext *context)
Clears the serializer and sets a new context.
Serialize objects or data to XML.
Definition: XmlSerializer.h:45
XmlSerializer()
Default Constructor.
Definition: XmlSerializer.h:50
void setFormatter(Formatter &formatter)
Returns formatter to use.