#include <llsdserialize.h>
Inheritance diagram for LLSDXMLFormatter:
Public Member Functions | |
LLSDXMLFormatter () | |
Constructor. | |
virtual S32 | format (const LLSD &data, std::ostream &ostr, U32 options=LLSDFormatter::OPTIONS_NONE) const |
Call this method to format an LLSD to a stream. | |
Static Public Member Functions | |
static std::string | escapeString (const std::string &in) |
Helper static method to return an xml escaped string. | |
Protected Member Functions | |
virtual | ~LLSDXMLFormatter () |
Destructor. | |
S32 | format_impl (const LLSD &data, std::ostream &ostr, U32 options, U32 level) const |
Implementation to format the data. This is called recursively. |
Definition at line 392 of file llsdserialize.h.
LLSDXMLFormatter::~LLSDXMLFormatter | ( | ) | [protected, virtual] |
LLSDXMLFormatter::LLSDXMLFormatter | ( | ) |
std::string LLSDXMLFormatter::escapeString | ( | const std::string & | in | ) | [static] |
Helper static method to return an xml escaped string.
in | A valid UTF-8 string. |
Definition at line 224 of file llsdserialize_xml.cpp.
References end.
Referenced by format_impl(), and LLControlGroup::saveToFile().
S32 LLSDXMLFormatter::format | ( | const LLSD & | data, | |
std::ostream & | ostr, | |||
U32 | options = LLSDFormatter::OPTIONS_NONE | |||
) | const [virtual] |
Call this method to format an LLSD to a stream.
data | The data to write. | |
ostr | The destination stream for the data. |
Implements LLSDFormatter.
Definition at line 62 of file llsdserialize_xml.cpp.
References format_impl(), LLSDFormatter::OPTIONS_PRETTY, and S32.
Referenced by LLMessageConfigFile::loadMessages().
S32 LLSDXMLFormatter::format_impl | ( | const LLSD & | data, | |
std::ostream & | ostr, | |||
U32 | options, | |||
U32 | level | |||
) | const [protected] |
Implementation to format the data. This is called recursively.
data | The data to write. | |
ostr | The destination stream for the data. |
Definition at line 79 of file llsdserialize_xml.cpp.
References LLSD::asBinary(), LLSD::asBoolean(), LLSD::asDate(), LLSD::asInteger(), LLSD::asReal(), LLSD::asString(), LLSD::asUUID(), LLSD::beginArray(), LLSD::beginMap(), end, LLSD::endArray(), LLSD::endMap(), escapeString(), LLSDFormatter::formatReal(), i, LLSDFormatter::mBoolAlpha, LLSDFormatter::mRealFormat, LLSDFormatter::OPTIONS_PRETTY, S32, LLSD::size(), LLSD::type(), LLSD::TypeArray, LLSD::TypeBinary, LLSD::TypeBoolean, LLSD::TypeDate, LLSD::TypeInteger, LLSD::TypeMap, LLSD::TypeReal, LLSD::TypeString, LLSD::TypeUndefined, LLSD::TypeURI, and LLSD::TypeUUID.
Referenced by format().