llstreamtools.h File Reference

some helper functions for parsing legacy simstate and asset files. More...

#include <iostream>
#include <string>

Include dependency graph for llstreamtools.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool skip_whitespace (std::istream &input_stream)
bool skip_emptyspace (std::istream &input_stream)
bool skip_comments_and_emptyspace (std::istream &input_stream)
bool skip_line (std::istream &input_stream)
bool skip_to_next_word (std::istream &input_stream)
bool skip_to_end_of_next_keyword (const char *keyword, std::istream &input_stream)
bool get_word (std::string &output_string, std::istream &input_stream)
bool get_line (std::string &output_string, std::istream &input_stream)
bool get_word (std::string &output_string, std::istream &input_stream, int n)
bool get_line (std::string &output_string, std::istream &input_stream, int n)
bool remove_last_char (char c, std::string &line)
void unescape_string (std::string &line)
void escape_string (std::string &line)
void replace_newlines_with_whitespace (std::string &line)
int get_brace_count (const std::string &line)
void remove_double_quotes (std::string &line)
void get_keyword_and_value (std::string &keyword, std::string &value, const std::string &line)
std::istream & fullread (std::istream &str, char *buf, std::streamsize requested)
std::istream & operator>> (std::istream &str, const char *tocheck)


Detailed Description

some helper functions for parsing legacy simstate and asset files.

LicenseInfo
firstyear=2005&license=viewergpl

Copyright (c) 2005-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 llstreamtools.h.


Function Documentation

void escape_string ( std::string &  line  ) 

Definition at line 374 of file llstreamtools.cpp.

std::istream& fullread ( std::istream &  str,
char *  buf,
std::streamsize  requested 
)

Definition at line 541 of file llstreamtools.cpp.

Referenced by LLNotecard::importStream(), and LLSDNotationParser::parseBinary().

int get_brace_count ( const std::string &  line  ) 

Definition at line 414 of file llstreamtools.cpp.

References c.

void get_keyword_and_value ( std::string &  keyword,
std::string &  value,
const std::string &  line 
)

Definition at line 482 of file llstreamtools.cpp.

References c.

Referenced by LLParcel::importAccessEntry(), and LLParcel::importStream().

bool get_line ( std::string &  output_string,
std::istream &  input_stream,
int  n 
)

Definition at line 289 of file llstreamtools.cpp.

References c.

bool get_line ( std::string &  output_string,
std::istream &  input_stream 
)

Definition at line 264 of file llstreamtools.cpp.

References c.

bool get_word ( std::string &  output_string,
std::istream &  input_stream,
int  n 
)

Definition at line 244 of file llstreamtools.cpp.

References c, and skip_emptyspace().

bool get_word ( std::string &  output_string,
std::istream &  input_stream 
)

Definition at line 228 of file llstreamtools.cpp.

References c, and skip_emptyspace().

std::istream& operator>> ( std::istream &  str,
const char *  tocheck 
)

Definition at line 560 of file llstreamtools.cpp.

References c, and p.

void remove_double_quotes ( std::string &  line  ) 

Definition at line 455 of file llstreamtools.cpp.

References count.

bool remove_last_char ( char  c,
std::string &  line 
)

Definition at line 333 of file llstreamtools.cpp.

void replace_newlines_with_whitespace ( std::string &  line  ) 

Definition at line 397 of file llstreamtools.cpp.

bool skip_comments_and_emptyspace ( std::istream &  input_stream  ) 

Definition at line 70 of file llstreamtools.cpp.

References c, and skip_emptyspace().

Referenced by LLParcel::importAccessEntry(), and LLParcel::importStream().

bool skip_emptyspace ( std::istream &  input_stream  ) 

Definition at line 57 of file llstreamtools.cpp.

References c.

Referenced by get_word(), skip_comments_and_emptyspace(), and skip_to_end_of_next_keyword().

bool skip_line ( std::istream &  input_stream  ) 

Definition at line 90 of file llstreamtools.cpp.

References c.

Referenced by skip_to_end_of_next_keyword().

bool skip_to_end_of_next_keyword ( const char *  keyword,
std::istream &  input_stream 
)

Definition at line 124 of file llstreamtools.cpp.

References c, skip_emptyspace(), and skip_line().

Referenced by LLParcel::importAccessEntry(), and LLParcel::importStream().

bool skip_to_next_word ( std::istream &  input_stream  ) 

Definition at line 100 of file llstreamtools.cpp.

References c.

bool skip_whitespace ( std::istream &  input_stream  ) 

Definition at line 45 of file llstreamtools.cpp.

References c.

void unescape_string ( std::string &  line  ) 

Definition at line 348 of file llstreamtools.cpp.


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