stream_loader.cpp File Reference

Implement some functions to help with loading information from c++ stream objects. More...

#include "stream_loader.h"
#include "FormErrors.h"

Go to the source code of this file.

Functions

btTransform transform_from_stream (std::istream &stream)
 get a btTransform from a stream.
std::ostream & operator<< (std::ostream &stream, btTransform transform)
 Write a btTransform to a stream.
void string_to_stream (std::ostream &stream, std::string string)
 Write a string to a stream with known whitespace surrounding it.
std::string string_from_stream (std::istream &stream)
 Read a string written with string_to_stream().
std::ostream & operator<< (std::ostream &destination, const btVector3 &vector)
std::istream & operator>> (std::istream &source, btVector3 &vector)
std::ostream & operator<< (std::ostream &destination, const btQuadWord &quad)
 Write a btQuaternion to a stream. Useful for btQuaternion too.
std::istream & operator>> (std::istream &source, btQuadWord &quad)
 Read a btQuadWord from a stream. Useful for btQuaternion too.

Variables

const unsigned int latest_string_version = 1


Detailed Description

Implement some functions to help with loading information from c++ stream objects.

Author:
James Legg

Definition in file stream_loader.cpp.


Function Documentation

std::ostream& operator<< ( std::ostream &  destination,
const btQuadWord &  quad 
)

Write a btQuaternion to a stream. Useful for btQuaternion too.

Definition at line 97 of file stream_loader.cpp.

std::ostream& operator<< ( std::ostream &  destination,
const btVector3 &  vector 
)

Definition at line 79 of file stream_loader.cpp.

std::ostream& operator<< ( std::ostream &  stream,
btTransform  transform 
)

Write a btTransform to a stream.

Parameters:
stream The stream to write data to.
transform The btTransform write to the stream.
Returns:
The same stream that was passed in.

Definition at line 30 of file stream_loader.cpp.

std::istream& operator>> ( std::istream &  source,
btQuadWord &  quad 
)

Read a btQuadWord from a stream. Useful for btQuaternion too.

Definition at line 106 of file stream_loader.cpp.

std::istream& operator>> ( std::istream &  source,
btVector3 &  vector 
)

Definition at line 87 of file stream_loader.cpp.

std::string string_from_stream ( std::istream &  stream  ) 

Read a string written with string_to_stream().

Parameters:
stream a stream either at the beginning of a string written with string_to_stream(), or with only whitespace before one.
Returns:
the string passed to write_string_vector

Definition at line 54 of file stream_loader.cpp.

void string_to_stream ( std::ostream &  stream,
std::string  string 
)

Write a string to a stream with known whitespace surrounding it.

You can get the string back with string_from_stream, no matter what whitespace was placed around the string. The string is allowed to contain any characters.

Parameters:
stream The stream to write to.
string the string to record.

Definition at line 47 of file stream_loader.cpp.

btTransform transform_from_stream ( std::istream &  stream  ) 

get a btTransform from a stream.

Parameters:
stream The stream to extract data from. It is advanced to the end of the btTransform.
Returns:
The btTransform read.

Definition at line 16 of file stream_loader.cpp.


Variable Documentation

const unsigned int latest_string_version = 1

Definition at line 45 of file stream_loader.cpp.


Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:14 2010 by Doxygen version 1.4.7 for Racer version svn335.