LLSDNotationFormatter Class Reference

Formatter which outputs the original notation format for LLSD. More...

#include <llsdserialize.h>

Inheritance diagram for LLSDNotationFormatter:

Inheritance graph
[legend]
Collaboration diagram for LLSDNotationFormatter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLSDNotationFormatter ()
 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 a notation escaped string.

Protected Member Functions

virtual ~LLSDNotationFormatter ()
 Destructor.

Detailed Description

Formatter which outputs the original notation format for LLSD.

Definition at line 351 of file llsdserialize.h.


Constructor & Destructor Documentation

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

Destructor.

Definition at line 963 of file llsdserialize.cpp.

LLSDNotationFormatter::LLSDNotationFormatter (  ) 

Constructor.

LLSDNotationFormatter

Definition at line 958 of file llsdserialize.cpp.


Member Function Documentation

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

Helper static method to return a notation escaped string.

This method will return the notation escaped string, but not the surrounding serialization identifiers such as a double or single quote. It will be up to the caller to embed those as appropriate.

Parameters:
in The raw, unescaped string.
Returns:
Returns an escaped string appropriate for serialization.

Definition at line 967 of file llsdserialize.cpp.

References serialize_string().

Referenced by LLFilterXMLRPCResponse2LLSD::process_impl(), and stream_out().

S32 LLSDNotationFormatter::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 975 of file llsdserialize.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(), LLSDFormatter::formatReal(), LLSDFormatter::mBoolAlpha, LLSDFormatter::mRealFormat, NOTATION_FALSE_SERIAL(), NOTATION_TRUE_SERIAL(), S32, serialize_string(), 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.


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