Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]

vl::TextStream Class Reference

The TextStream class can be used to conveniently read or parse utf8-encoded text files. More...

#include <TextStream.hpp>

Inheritance diagram for vl::TextStream:

vl::BufferedStream< unsigned char, 128 *1024 > vl::Object

List of all members.

Public Member Functions

virtual const char * className ()
 Returns the name of the class.
 TextStream (VirtualFile *file=NULL)
 ~TextStream ()
void ungetLine (const std::string &utf8)
bool readLine (std::string &utf8)
bool readLine (String &line)
 Reads a CR or LF or CR/LF or LF/CR terminated line.
bool readLineCR (String &line)
 Reads a CR terminated line.
bool readLineLF (String &line)
 Reads a LF terminated line.
bool readInt (int &i, bool hex=false)
bool readDouble (double &d)
bool readString (String &token)
bool readStdString (std::string &token)
bool readQuotedString (String &token)

Protected Attributes

String mTmpStr
std::string mTmpStdStr


Detailed Description

The TextStream class can be used to conveniently read or parse utf8-encoded text files.

Constructor & Destructor Documentation

vl::TextStream::TextStream ( VirtualFile file = NULL  )  [inline]

vl::TextStream::~TextStream (  )  [inline]


Member Function Documentation

virtual const char* vl::TextStream::className (  )  [inline, virtual]

Returns the name of the class.

Reimplemented from vl::BufferedStream< unsigned char, 128 *1024 >.

void vl::TextStream::ungetLine ( const std::string &  utf8  )  [inline]

bool vl::TextStream::readLine ( std::string &  utf8  )  [inline]

bool vl::TextStream::readLine ( String line  )  [inline]

Reads a CR or LF or CR/LF or LF/CR terminated line.

bool vl::TextStream::readLineCR ( String line  )  [inline]

Reads a CR terminated line.

bool vl::TextStream::readLineLF ( String line  )  [inline]

Reads a LF terminated line.

bool vl::TextStream::readInt ( int &  i,
bool  hex = false 
) [inline]

bool vl::TextStream::readDouble ( double &  d  )  [inline]

bool vl::TextStream::readString ( String token  )  [inline]

bool vl::TextStream::readStdString ( std::string &  token  )  [inline]

bool vl::TextStream::readQuotedString ( String token  )  [inline]


Member Data Documentation

std::string vl::TextStream::mTmpStdStr [protected]


The documentation for this class was generated from the following file:

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Sun Nov 8 14:29:08 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.