Public Member Functions | |
Impl () | |
~Impl () | |
S32 | parse (std::istream &input, LLSD &data) |
void | parsePart (const char *buf, int len) |
Private Types | |
enum | Element { ELEMENT_LLSD, ELEMENT_UNDEF, ELEMENT_BOOL, ELEMENT_INTEGER, ELEMENT_REAL, ELEMENT_STRING, ELEMENT_UUID, ELEMENT_DATE, ELEMENT_URI, ELEMENT_BINARY, ELEMENT_MAP, ELEMENT_ARRAY, ELEMENT_KEY, ELEMENT_UNKNOWN } |
typedef std::deque< LLSD * > | LLSDRefStack |
Private Member Functions | |
void | reset () |
void | startElementHandler (const XML_Char *name, const XML_Char **attributes) |
void | endElementHandler (const XML_Char *name) |
void | characterDataHandler (const XML_Char *data, int length) |
void | startSkipping () |
Static Private Member Functions | |
static void | sStartElementHandler (void *userData, const XML_Char *name, const XML_Char **attributes) |
static void | sEndElementHandler (void *userData, const XML_Char *name) |
static void | sCharacterDataHandler (void *userData, const XML_Char *data, int length) |
static Element | readElement (const XML_Char *name) |
static const XML_Char * | findAttribute (const XML_Char *name, const XML_Char **pairs) |
Private Attributes | |
XML_Parser | mParser |
LLSD | mResult |
S32 | mParseCount |
bool | mInLLSDElement |
bool | mGracefullStop |
LLSDRefStack | mStack |
int | mDepth |
bool | mSkipping |
int | mSkipThrough |
std::string | mCurrentKey |
std::ostringstream | mCurrentContent |
bool | mPreStaged |
Definition at line 258 of file llsdserialize_xml.cpp.
typedef std::deque<LLSD*> LLSDXMLParser::Impl::LLSDRefStack [private] |
Definition at line 313 of file llsdserialize_xml.cpp.
enum LLSDXMLParser::Impl::Element [private] |
ELEMENT_LLSD | |
ELEMENT_UNDEF | |
ELEMENT_BOOL | |
ELEMENT_INTEGER | |
ELEMENT_REAL | |
ELEMENT_STRING | |
ELEMENT_UUID | |
ELEMENT_DATE | |
ELEMENT_URI | |
ELEMENT_BINARY | |
ELEMENT_MAP | |
ELEMENT_ARRAY | |
ELEMENT_KEY | |
ELEMENT_UNKNOWN |
Definition at line 284 of file llsdserialize_xml.cpp.
LLSDXMLParser::Impl::Impl | ( | ) |
Definition at line 327 of file llsdserialize_xml.cpp.
References mParser, mPreStaged, NULL, and reset().
LLSDXMLParser::Impl::~Impl | ( | ) |
Definition at line 367 of file llsdserialize_xml.cpp.
References BUFFER_SIZE, clear_eol(), get_till_eol(), llendl, llinfos, mGracefullStop, mParseCount, mParser, mResult, NULL, LLSDParser::PARSE_FAILURE, reset(), and indra::ipc::saranwrap::status().
Referenced by LLSDXMLParser::doParse().
void LLSDXMLParser::Impl::parsePart | ( | const char * | buf, | |
int | len | |||
) |
Definition at line 477 of file llsdserialize_xml.cpp.
References mParser, mPreStaged, and NULL.
Referenced by LLSDXMLParser::parsePart().
void LLSDXMLParser::Impl::reset | ( | ) | [private] |
Definition at line 423 of file llsdserialize_xml.cpp.
References LLSD::clear(), mCurrentKey, mDepth, mGracefullStop, mInLLSDElement, mParseCount, mParser, mPreStaged, mResult, mSkipping, mStack, sCharacterDataHandler(), sEndElementHandler(), and sStartElementHandler().
Referenced by Impl(), and parse().
void LLSDXMLParser::Impl::startElementHandler | ( | const XML_Char * | name, | |
const XML_Char ** | attributes | |||
) | [private] |
Definition at line 489 of file llsdserialize_xml.cpp.
References LLSD::append(), ELEMENT_ARRAY, ELEMENT_BINARY, ELEMENT_KEY, ELEMENT_LLSD, ELEMENT_MAP, LLSD::emptyArray(), LLSD::emptyMap(), findAttribute(), mCurrentContent, mCurrentKey, mDepth, mInLLSDElement, mParseCount, mResult, mSkipping, mStack, readElement(), LLSD::size(), and startSkipping().
void LLSDXMLParser::Impl::endElementHandler | ( | const XML_Char * | name | ) | [private] |
Definition at line 576 of file llsdserialize_xml.cpp.
References LLSD::asDate(), LLSD::asInteger(), LLSD::asReal(), LLSD::asURI(), LLSD::asUUID(), LLSD::clear(), ELEMENT_BINARY, ELEMENT_BOOL, ELEMENT_DATE, ELEMENT_INTEGER, ELEMENT_KEY, ELEMENT_LLSD, ELEMENT_REAL, ELEMENT_STRING, ELEMENT_UNDEF, ELEMENT_UNKNOWN, ELEMENT_URI, ELEMENT_UUID, mCurrentContent, mCurrentKey, mDepth, mGracefullStop, mInLLSDElement, mParser, mSkipping, mSkipThrough, mStack, readElement(), and S32.
void LLSDXMLParser::Impl::characterDataHandler | ( | const XML_Char * | data, | |
int | length | |||
) | [private] |
void LLSDXMLParser::Impl::sStartElementHandler | ( | void * | userData, | |
const XML_Char * | name, | |||
const XML_Char ** | attributes | |||
) | [static, private] |
Definition at line 679 of file llsdserialize_xml.cpp.
Referenced by reset().
void LLSDXMLParser::Impl::sEndElementHandler | ( | void * | userData, | |
const XML_Char * | name | |||
) | [static, private] |
Definition at line 685 of file llsdserialize_xml.cpp.
Referenced by reset().
void LLSDXMLParser::Impl::sCharacterDataHandler | ( | void * | userData, | |
const XML_Char * | data, | |||
int | length | |||
) | [static, private] |
Definition at line 691 of file llsdserialize_xml.cpp.
Referenced by reset().
void LLSDXMLParser::Impl::startSkipping | ( | ) | [private] |
Definition at line 457 of file llsdserialize_xml.cpp.
References mDepth, mSkipping, and mSkipThrough.
Referenced by startElementHandler().
LLSDXMLParser::Impl::Element LLSDXMLParser::Impl::readElement | ( | const XML_Char * | name | ) | [static, private] |
Definition at line 698 of file llsdserialize_xml.cpp.
References ELEMENT_ARRAY, ELEMENT_BINARY, ELEMENT_BOOL, ELEMENT_DATE, ELEMENT_INTEGER, ELEMENT_KEY, ELEMENT_LLSD, ELEMENT_MAP, ELEMENT_REAL, ELEMENT_STRING, ELEMENT_UNDEF, ELEMENT_UNKNOWN, ELEMENT_URI, and ELEMENT_UUID.
Referenced by endElementHandler(), and startElementHandler().
const XML_Char * LLSDXMLParser::Impl::findAttribute | ( | const XML_Char * | name, | |
const XML_Char ** | pairs | |||
) | [static, private] |
Definition at line 464 of file llsdserialize_xml.cpp.
References NULL.
Referenced by startElementHandler().
XML_Parser LLSDXMLParser::Impl::mParser [private] |
Definition at line 305 of file llsdserialize_xml.cpp.
Referenced by endElementHandler(), Impl(), parse(), parsePart(), reset(), and ~Impl().
LLSD LLSDXMLParser::Impl::mResult [private] |
Definition at line 307 of file llsdserialize_xml.cpp.
Referenced by parse(), reset(), and startElementHandler().
S32 LLSDXMLParser::Impl::mParseCount [private] |
Definition at line 308 of file llsdserialize_xml.cpp.
Referenced by parse(), reset(), and startElementHandler().
bool LLSDXMLParser::Impl::mInLLSDElement [private] |
Definition at line 310 of file llsdserialize_xml.cpp.
Referenced by endElementHandler(), reset(), and startElementHandler().
bool LLSDXMLParser::Impl::mGracefullStop [private] |
Definition at line 311 of file llsdserialize_xml.cpp.
Referenced by endElementHandler(), parse(), and reset().
LLSDRefStack LLSDXMLParser::Impl::mStack [private] |
Definition at line 314 of file llsdserialize_xml.cpp.
Referenced by endElementHandler(), reset(), and startElementHandler().
int LLSDXMLParser::Impl::mDepth [private] |
Definition at line 316 of file llsdserialize_xml.cpp.
Referenced by endElementHandler(), reset(), startElementHandler(), and startSkipping().
bool LLSDXMLParser::Impl::mSkipping [private] |
Definition at line 317 of file llsdserialize_xml.cpp.
Referenced by endElementHandler(), reset(), startElementHandler(), and startSkipping().
int LLSDXMLParser::Impl::mSkipThrough [private] |
Definition at line 318 of file llsdserialize_xml.cpp.
Referenced by endElementHandler(), and startSkipping().
std::string LLSDXMLParser::Impl::mCurrentKey [private] |
Definition at line 320 of file llsdserialize_xml.cpp.
Referenced by endElementHandler(), reset(), and startElementHandler().
std::ostringstream LLSDXMLParser::Impl::mCurrentContent [private] |
Definition at line 321 of file llsdserialize_xml.cpp.
Referenced by characterDataHandler(), endElementHandler(), and startElementHandler().
bool LLSDXMLParser::Impl::mPreStaged [private] |
Definition at line 323 of file llsdserialize_xml.cpp.
Referenced by Impl(), parsePart(), and reset().