Sleeping Wombat Common Library
0.50.0
swCommonLibrary
|
Implementation of XML serialization. More...
Implementation of XML serialization.
Project SerializerXML contains implementation of XML serialization based on RapidXML library. http://rapidxml.sourceforge.net/*/
struct SerializerImpl { rapidxml::xml_document<> root; std::stack< rapidxml::xml_node<>* > valuesStack; };
namespace {
/ Helper inline void SetAttributeHelper( SerializerImpl* impl, const char* name, Size nameSize, const char* value, Size valueSize ) { char* attribName = impl->root.allocate_string( name, nameSize ); char* attribValue = impl->root.allocate_string( value, valueSize );
rapidxml::xml_attribute<>* attribute = impl->root.allocate_attribute( attribName, attribValue, nameSize, valueSize ); auto currentNode = impl->valuesStack.top(); currentNode->append_attribute( attribute ); }
} //anonymous
/**Konstruktor