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)
void remove_double_quotes (std::string &line)
void get_keyword_and_value (std::string &keyword, std::string &value, const std::string &line)
std::streamsize fullread (std::istream &istr, 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-2008, 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://secondlifegrid.net/programs/open_source/licensing/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://secondlifegrid.net/programs/open_source/licensing/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 362 of file llstreamtools.cpp.

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

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

Definition at line 427 of file llstreamtools.cpp.

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

Here is the caller graph for this function:

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

Definition at line 283 of file llstreamtools.cpp.

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

Definition at line 264 of file llstreamtools.cpp.

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

Here is the caller graph for this function:

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

Definition at line 244 of file llstreamtools.cpp.

References skip_emptyspace().

Here is the call graph for this function:

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

Definition at line 228 of file llstreamtools.cpp.

References skip_emptyspace().

Here is the call graph for this function:

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

Definition at line 514 of file llstreamtools.cpp.

References p.

void remove_double_quotes ( std::string &  line  ) 

Definition at line 400 of file llstreamtools.cpp.

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

Definition at line 321 of file llstreamtools.cpp.

void replace_newlines_with_whitespace ( std::string &  line  ) 

Definition at line 385 of file llstreamtools.cpp.

bool skip_comments_and_emptyspace ( std::istream &  input_stream  ) 

Definition at line 70 of file llstreamtools.cpp.

References skip_emptyspace().

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool skip_emptyspace ( std::istream &  input_stream  ) 

Definition at line 57 of file llstreamtools.cpp.

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

Here is the caller graph for this function:

bool skip_line ( std::istream &  input_stream  ) 

Definition at line 90 of file llstreamtools.cpp.

Referenced by skip_to_end_of_next_keyword().

Here is the caller graph for this function:

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

Definition at line 124 of file llstreamtools.cpp.

References skip_emptyspace(), and skip_line().

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

Here is the call graph for this function:

Here is the caller graph for this function:

bool skip_to_next_word ( std::istream &  input_stream  ) 

Definition at line 100 of file llstreamtools.cpp.

bool skip_whitespace ( std::istream &  input_stream  ) 

Definition at line 45 of file llstreamtools.cpp.

void unescape_string ( std::string &  line  ) 

Definition at line 336 of file llstreamtools.cpp.


Generated on Fri May 16 08:34:49 2008 for SecondLife by  doxygen 1.5.5