0
0
mirror of https://github.com/zeux/pugixml.git synced 2024-12-27 13:33:17 +08:00
pugixml/tests/writer_string.hpp
arseny.kapoulkine 7d24b9b565 Set svn:eol-style to native for all text files
git-svn-id: http://pugixml.googlecode.com/svn/trunk@607 99668b35-9821-0410-8761-19e4c4f06640
2010-07-19 09:57:32 +00:00

28 lines
953 B
C++

#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;
virtual void write(const void* data, size_t size);
std::string as_narrow() const;
std::wstring as_wide() const;
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);
std::wstring write_wide(pugi::xml_node node, unsigned int flags, pugi::xml_encoding encoding);
#endif