2010-07-19 09:57:32 +00:00
|
|
|
#ifndef HEADER_TEST_WRITER_STRING_HPP
|
|
|
|
#define HEADER_TEST_WRITER_STRING_HPP
|
|
|
|
|
|
|
|
#include "../src/pugixml.hpp"
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
struct xml_writer_string: public pugi::xml_writer
|
|
|
|
{
|
|
|
|
std::string contents;
|
2016-01-24 14:03:02 +01:00
|
|
|
|
2016-10-13 01:36:12 +03:00
|
|
|
virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE;
|
2010-07-19 09:57:32 +00:00
|
|
|
|
|
|
|
std::string as_narrow() const;
|
2012-03-06 08:49:58 +00:00
|
|
|
std::basic_string<wchar_t> as_wide() const;
|
2010-07-19 09:57:32 +00:00
|
|
|
std::basic_string<pugi::char_t> as_string() const;
|
|
|
|
};
|
|
|
|
|
|
|
|
std::string save_narrow(const pugi::xml_document& doc, unsigned int flags, pugi::xml_encoding encoding);
|
|
|
|
bool test_save_narrow(const pugi::xml_document& doc, unsigned int flags, pugi::xml_encoding encoding, const char* expected, size_t length);
|
|
|
|
|
|
|
|
std::string write_narrow(pugi::xml_node node, unsigned int flags, pugi::xml_encoding encoding);
|
|
|
|
bool test_write_narrow(pugi::xml_node node, unsigned int flags, pugi::xml_encoding encoding, const char* expected, size_t length);
|
|
|
|
|
2012-03-06 08:49:58 +00:00
|
|
|
std::basic_string<wchar_t> write_wide(pugi::xml_node node, unsigned int flags, pugi::xml_encoding encoding);
|
2010-07-19 09:57:32 +00:00
|
|
|
|
|
|
|
#endif
|