llsdserialize.cpp File Reference

Implementation of LLSD parsers and formatters. More...

#include "linden_common.h"
#include "llsdserialize.h"
#include "llmemory.h"
#include "llstreamtools.h"
#include <iostream>
#include "apr-1/apr_base64.h"
#include <netinet/in.h>
#include "lldate.h"
#include "llsd.h"
#include "lluri.h"

Include dependency graph for llsdserialize.cpp:

Go to the source code of this file.

Functions

U64 ll_htonll (U64 hostlonglong)
U64 ll_ntohll (U64 netlonglong)
F64 ll_htond (F64 hostlonglong)
F64 ll_ntohd (F64 netlonglong)
bool deserialize_string (std::istream &str, std::string &value)
bool deserialize_string_delim (std::istream &str, std::string &value, char d)
bool deserialize_string_raw (std::istream &str, std::string &value)
void serialize_string (const std::string &value, std::ostream &str)
static const std::string NOTATION_TRUE_SERIAL ("true")
static const std::string NOTATION_FALSE_SERIAL ("false")

Variables

static const int MAX_HDR_LEN = 20
static const char LEGACY_NON_HEADER [] = "<llsd>"
static const char BINARY_TRUE_SERIAL = '1'
static const char BINARY_FALSE_SERIAL = '0'
static const S32 NOTATION_PARSE_FAILURE = -1
static const char * NOTATION_STRING_CHARACTERS [256]


Detailed Description

Implementation of LLSD parsers and formatters.

Author:
Phoenix
Date:
2006-03-05
LicenseInfo
firstyear=2006&license=viewergpl

Copyright (c) 2006-2007, Linden Research, Inc.

Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlife.com/developers/opensource/gplv2

There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlife.com/developers/opensource/flossexception

By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.

ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$

Definition in file llsdserialize.cpp.


Function Documentation

bool deserialize_string ( std::istream &  str,
std::string &  value 
)

local functions

Definition at line 1220 of file llsdserialize.cpp.

References c, deserialize_string_delim(), and deserialize_string_raw().

Referenced by LLSDNotationParser::parseMap(), and LLSDNotationParser::parseString().

bool deserialize_string_delim ( std::istream &  str,
std::string &  value,
char  d 
)

Definition at line 1245 of file llsdserialize.cpp.

References hex_as_nybble().

Referenced by deserialize_string(), LLSDBinaryParser::parse(), LLSDNotationParser::parse(), and LLSDBinaryParser::parseMap().

bool deserialize_string_raw ( std::istream &  str,
std::string &  value 
)

Definition at line 1344 of file llsdserialize.cpp.

References c, NULL, and S32.

Referenced by deserialize_string().

F64 ll_htond ( F64  hostlonglong  ) 

Definition at line 192 of file llsdserialize.cpp.

Referenced by LLSDBinaryFormatter::format().

U64 ll_htonll ( U64  hostlonglong  ) 

Endian handlers

Definition at line 190 of file llsdserialize.cpp.

F64 ll_ntohd ( F64  netlonglong  ) 

Definition at line 193 of file llsdserialize.cpp.

Referenced by LLSDBinaryParser::parse().

U64 ll_ntohll ( U64  netlonglong  ) 

Definition at line 191 of file llsdserialize.cpp.

static const std::string NOTATION_FALSE_SERIAL ( "false"   )  [static]

Referenced by LLSDNotationFormatter::format().

static const std::string NOTATION_TRUE_SERIAL ( "true"   )  [static]

Local constants.

Referenced by LLSDNotationFormatter::format().

void serialize_string ( const std::string &  value,
std::ostream &  str 
)

Definition at line 1632 of file llsdserialize.cpp.

References c, and end.

Referenced by LLSDNotationFormatter::escapeString(), and LLSDNotationFormatter::format().


Variable Documentation

const char BINARY_FALSE_SERIAL = '0' [static]

Definition at line 245 of file llsdserialize.cpp.

const char BINARY_TRUE_SERIAL = '1' [static]

Definition at line 244 of file llsdserialize.cpp.

const char LEGACY_NON_HEADER[] = "<llsd>" [static]

Definition at line 52 of file llsdserialize.cpp.

Referenced by LLSDSerialize::deserialize().

const int MAX_HDR_LEN = 20 [static]

Definition at line 51 of file llsdserialize.cpp.

Referenced by LLSDSerialize::deserialize().

const S32 NOTATION_PARSE_FAILURE = -1 [static]

Definition at line 247 of file llsdserialize.cpp.

const char* NOTATION_STRING_CHARACTERS[256] [static]

Definition at line 1372 of file llsdserialize.cpp.


Generated on Thu Jul 1 06:10:39 2010 for Second Life Viewer by  doxygen 1.4.7