LLSDNotationParser Class Reference

Parser which handles the original notation format for LLSD. More...

#include <llsdserialize.h>

Inheritance diagram for LLSDNotationParser:

Inheritance graph
[legend]
Collaboration diagram for LLSDNotationParser:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLSDNotationParser ()
 Constructor.
virtual S32 parse (std::istream &istr, LLSD &data) const
 Call this method to parse a stream for LLSD.

Static Public Member Functions

static LLSD parse (std::istream &istr)
 Simple notation parse.

Protected Member Functions

virtual ~LLSDNotationParser ()
 Destructor.

Private Member Functions

S32 parseMap (std::istream &istr, LLSD &map) const
 Parse a map from the istream.
S32 parseArray (std::istream &istr, LLSD &array) const
 Parse an array from the istream.
void parseString (std::istream &istr, LLSD &data) const
 Parse a string from the istream and assign it to data.
void parseBinary (std::istream &istr, LLSD &data) const
 Parse binary data from the stream.

Detailed Description

Parser which handles the original notation format for LLSD.

Definition at line 82 of file llsdserialize.h.


Constructor & Destructor Documentation

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

Destructor.

Definition at line 65 of file llsdserialize.cpp.

LLSDNotationParser::LLSDNotationParser (  )  [inline]

Constructor.

Definition at line 94 of file llsdserialize.h.


Member Function Documentation

LLSD LLSDNotationParser::parse ( std::istream &  istr  )  [static]

Simple notation parse.

This simplified parser cannot not distinguish between a failed parse and a parse which yields a single undefined LLSD. You can use this if error checking will be implicit in the use of the results of the parse.

Parameters:
istr The input stream.
Returns:
Returns the parsed LLSD object.

Definition at line 460 of file llsdserialize.cpp.

References count, lldebugs, llendl, parse(), and S32.

S32 LLSDNotationParser::parse ( std::istream &  istr,
LLSD data 
) const [virtual]

Call this method to parse a stream for LLSD.

This method parses the istream for a structured data. This method assumes that the istream is a complete llsd object -- for example an opened and closed map with an arbitrary nesting of elements. This method will return after reading one data object, allowing continued reading from the stream by the caller.

Parameters:
istr The input stream.
data[out] The newly parse structured data. Undefined on failure.
Returns:
Returns the number of LLSD objects parsed into data. Returns -1 on parse failure.

Implements LLSDParser.

Definition at line 260 of file llsdserialize.cpp.

References c, LLSD::clear(), deserialize_string_delim(), LLSD::isUndefined(), llendl, llinfos, parseArray(), parseBinary(), parseMap(), parseString(), and S32.

Referenced by idle_startup(), parse(), parseArray(), and parseMap().

S32 LLSDNotationParser::parseArray ( std::istream &  istr,
LLSD array 
) const [private]

Parse an array from the istream.

Parameters:
istr The input stream.
array The array to append the parsed data.
Returns:
Returns The number of LLSD objects parsed into data.

Definition at line 522 of file llsdserialize.cpp.

References LLSD::append(), c, LLSD::clear(), count, LLSD::emptyArray(), parse(), and S32.

Referenced by parse().

void LLSDNotationParser::parseBinary ( std::istream &  istr,
LLSD data 
) const [private]

Parse binary data from the stream.

Parameters:
istr The input stream.
data[out] The data to assign.

Definition at line 572 of file llsdserialize.cpp.

References c, LLSD::clear(), fullread(), LLSD::get(), hex_as_nybble(), NULL, and S32.

Referenced by parse().

S32 LLSDNotationParser::parseMap ( std::istream &  istr,
LLSD map 
) const [private]

Parse a map from the istream.

Parameters:
istr The input stream.
map The map to add the parsed data.
Returns:
Returns The number of LLSD objects parsed into data.

Definition at line 470 of file llsdserialize.cpp.

References c, LLSD::clear(), count, deserialize_string(), LLSD::emptyMap(), LLSD::insert(), parse(), and S32.

Referenced by parse().

void LLSDNotationParser::parseString ( std::istream &  istr,
LLSD data 
) const [private]

Parse a string from the istream and assign it to data.

Parameters:
istr The input stream.
data[out] The data to assign.

Definition at line 558 of file llsdserialize.cpp.

References LLSD::clear(), and deserialize_string().

Referenced by parse().


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