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.

Protected Member Functions

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

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.
bool parseString (std::istream &istr, LLSD &data) const
 Parse a string from the istream and assign it to data.
bool 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 200 of file llsdserialize.h.


Constructor & Destructor Documentation

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

Destructor.

Definition at line 384 of file llsdserialize.cpp.

LLSDNotationParser::LLSDNotationParser (  ) 

Constructor.

LLSDNotationParser

Definition at line 379 of file llsdserialize.cpp.


Member Function Documentation

S32 LLSDNotationParser::doParse ( std::istream &  istr,
LLSD data 
) const [protected, 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 PARSE_FAILURE (-1) on parse failure.

Implements LLSDParser.

Definition at line 388 of file llsdserialize.cpp.

References LLSDParser::account(), LLSD::clear(), deserialize_boolean(), deserialize_string_delim(), LLSDParser::ignore(), LLSD::isUndefined(), llendl, llinfos, NOTATION_FALSE_SERIAL(), NOTATION_TRUE_SERIAL(), LLSDParser::PARSE_FAILURE, parseArray(), parseBinary(), parseMap(), parseString(), and S32.

Referenced by parseArray(), and parseMap().

Here is the call graph for this function:

Here is the caller graph for this function:

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 643 of file llsdserialize.cpp.

References LLSDParser::account(), LLSD::clear(), deserialize_string(), doParse(), LLSD::emptyMap(), LLSD::insert(), LLSDParser::mMaxBytesLeft, LLSDParser::PARSE_FAILURE, LLSDParser::putback(), and S32.

Referenced by doParse().

Here is the call graph for this function:

Here is the caller graph for this function:

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 703 of file llsdserialize.cpp.

References LLSD::append(), doParse(), LLSD::emptyArray(), LLSDParser::PARSE_FAILURE, LLSDParser::putback(), and S32.

Referenced by doParse().

Here is the call graph for this function:

Here is the caller graph for this function:

bool 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.
Returns:
Retuns true if a complete string was parsed.

Definition at line 742 of file llsdserialize.cpp.

References LLSDParser::account(), deserialize_string(), LLSDParser::mMaxBytesLeft, and LLSDParser::PARSE_FAILURE.

Referenced by doParse().

Here is the call graph for this function:

Here is the caller graph for this function:

bool 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.
Returns:
Retuns true if a complete blob was parsed.

Definition at line 752 of file llsdserialize.cpp.

References LLSDParser::account(), fullread(), hex_as_nybble(), LLSDParser::mCheckLimits, LLSDParser::mMaxBytesLeft, NULL, LLSDParser::putback(), LLSDParser::read(), and S32.

Referenced by doParse().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:

Generated on Fri May 16 09:03:39 2008 for SecondLife by  doxygen 1.5.5