LLSDXMLFormatter Class Reference

Formatter which outputs the LLSD as XML. More...

#include <llsdserialize.h>

Inheritance diagram for LLSDXMLFormatter:

Inheritance graph
[legend]
Collaboration diagram for LLSDXMLFormatter:

Collaboration graph
[legend]
List of all members.

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.

Detailed Description

Formatter which outputs the LLSD as XML.

Definition at line 392 of file llsdserialize.h.


Constructor & Destructor Documentation

LLSDXMLFormatter::~LLSDXMLFormatter (  )  [protected, virtual]

Destructor.

Definition at line 57 of file llsdserialize_xml.cpp.

LLSDXMLFormatter::LLSDXMLFormatter (  ) 

Constructor.

LLSDXMLFormatter

Definition at line 52 of file llsdserialize_xml.cpp.


Member Function Documentation

std::string LLSDXMLFormatter::escapeString ( const std::string &  in  )  [static]

Helper static method to return an xml escaped string.

Parameters:
in A valid UTF-8 string.
Returns:
Returns an escaped string appropriate for serialization.

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.

Parameters:
data The data to write.
ostr The destination stream for the data.
Returns:
Returns The number of LLSD objects fomatted out

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.

Parameters:
data The data to write.
ostr The destination stream for the data.
Returns:
Returns The number of LLSD objects fomatted out

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().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:45 2010 for Second Life Viewer by  doxygen 1.4.7