Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
The TextStream class can be used to conveniently read or parse utf8-encoded text files. More...
#include <TextStream.hpp>
Public Member Functions | |
| 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 |
The TextStream class can be used to conveniently read or parse utf8-encoded text files.
Definition at line 46 of file TextStream.hpp.
| vl::TextStream::TextStream | ( | VirtualFile * | file = NULL | ) | [inline] |
Definition at line 51 of file TextStream.hpp.
| vl::TextStream::~TextStream | ( | ) | [inline] |
Definition at line 55 of file TextStream.hpp.
| void vl::TextStream::ungetLine | ( | const std::string & | utf8 | ) | [inline] |
Definition at line 61 of file TextStream.hpp.
| bool vl::TextStream::readLine | ( | std::string & | utf8 | ) | [inline] |
Definition at line 67 of file TextStream.hpp.
References vl::OM_ReadOnly.
Referenced by vl::STLLoader::loadAscii(), and vl::loadMOL2().
| bool vl::TextStream::readLine | ( | String & | line | ) | [inline] |
Reads a CR or LF or CR/LF or LF/CR terminated line.
Definition at line 93 of file TextStream.hpp.
References vl::String::clear(), vl::String::fromUTF8(), and vl::OM_ReadOnly.
| bool vl::TextStream::readLineCR | ( | String & | line | ) | [inline] |
Reads a CR terminated line.
Definition at line 123 of file TextStream.hpp.
References vl::String::clear(), vl::String::empty(), vl::String::fromUTF8(), and vl::OM_ReadOnly.
| bool vl::TextStream::readLineLF | ( | String & | line | ) | [inline] |
Reads a LF terminated line.
Definition at line 146 of file TextStream.hpp.
References vl::String::clear(), vl::String::empty(), vl::String::fromUTF8(), and vl::OM_ReadOnly.
Referenced by vl::PlyLoader::readHeader().
| bool TextStream::readInt | ( | int & | i, |
| bool | hex = false |
||
| ) |
Definition at line 38 of file TextStream.cpp.
References mTmpStdStr, and readStdString().
Referenced by vl::PlyLoader::PlyScalar::read().
| bool TextStream::readDouble | ( | double & | d | ) |
Definition at line 50 of file TextStream.cpp.
References mTmpStdStr, and readStdString().
Referenced by vl::PlyLoader::PlyScalar::read().
| bool vl::TextStream::readString | ( | String & | token | ) | [inline] |
Definition at line 172 of file TextStream.hpp.
References vl::String::clear(), and vl::String::empty().
| bool vl::TextStream::readStdString | ( | std::string & | token | ) | [inline] |
Definition at line 191 of file TextStream.hpp.
Referenced by readDouble(), and readInt().
| bool vl::TextStream::readQuotedString | ( | String & | token | ) | [inline] |
Definition at line 210 of file TextStream.hpp.
References vl::String::clear(), and vl::String::empty().
String vl::TextStream::mTmpStr [protected] |
Definition at line 235 of file TextStream.hpp.
std::string vl::TextStream::mTmpStdStr [protected] |
Definition at line 236 of file TextStream.hpp.
Referenced by readDouble(), and readInt().