# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

Public Member Functions | Protected Attributes

# vl::BufferedStream< Element_Type, Chunk_Size > Class Template Reference

The BufferedStream class is a template class that that performs a buffered read of Element_Type data from a VirtualFile. More...

`#include <BufferedStream.hpp>`

Inheritance diagram for vl::BufferedStream< Element_Type, Chunk_Size >:

List of all members.

## Public Member Functions

| BufferedStream ()
void | seek (long long pos)
bool | readToken (Element_Type *token)
bool | readTextChar (Element_Type &ch)
void | ungetToken (const Element_Type &token)
bool | bufferEmpty ()
int | fillBuffer ()
bool | isEndOfFile () const
void | setInputFile (VirtualFile *file)
VirtualFile * | inputFile ()
const VirtualFile * | inputFile () const

## Protected Attributes

ref< VirtualFile > | mInputFile
std::vector< Element_Type > | mUngetBuffer
std::vector< Element_Type > | mBuffer
int | mPtr
int | mSize
bool | mIsEndOfFile

## Detailed Description

### template<class Element_Type, int Chunk_Size>
class vl::BufferedStream< Element_Type, Chunk_Size >

The BufferedStream class is a template class that that performs a buffered read of Element_Type data from a VirtualFile.

Definition at line 49 of file BufferedStream.hpp.

## Constructor & Destructor Documentation

template<class Element_Type, int Chunk_Size>

vl::BufferedStream< Element_Type, Chunk_Size >::BufferedStream | ( | ) | `[inline]`

Definition at line 54 of file BufferedStream.hpp.

## Member Function Documentation

template<class Element_Type, int Chunk_Size>

void vl::BufferedStream< Element_Type, Chunk_Size >::seek | ( | long long | pos ) | `[inline]`

Definition at line 62 of file BufferedStream.hpp.

Referenced by vl::loadMOL2().

template<class Element_Type, int Chunk_Size>

bool vl::BufferedStream< Element_Type, Chunk_Size >::readToken | ( | Element_Type * | token ) | `[inline]`

Definition at line 70 of file BufferedStream.hpp.

Referenced by vl::BufferedStream< char, 128 *1024 >::readTextChar().

template<class Element_Type, int Chunk_Size>

bool vl::BufferedStream< Element_Type, Chunk_Size >::readTextChar | ( | Element_Type & | ch ) | `[inline]`

Definition at line 97 of file BufferedStream.hpp.

template<class Element_Type, int Chunk_Size>

void vl::BufferedStream< Element_Type, Chunk_Size >::ungetToken | ( | const Element_Type & | token ) | `[inline]`

Definition at line 121 of file BufferedStream.hpp.

Referenced by vl::BufferedStream< char, 128 *1024 >::readTextChar().

template<class Element_Type, int Chunk_Size>

bool vl::BufferedStream< Element_Type, Chunk_Size >::bufferEmpty | ( | ) | `[inline]`

Definition at line 126 of file BufferedStream.hpp.

Referenced by vl::BufferedStream< char, 128 *1024 >::readToken().

template<class Element_Type, int Chunk_Size>

int vl::BufferedStream< Element_Type, Chunk_Size >::fillBuffer | ( | ) | `[inline]`

Definition at line 131 of file BufferedStream.hpp.

Referenced by vl::BufferedStream< char, 128 *1024 >::readToken().

template<class Element_Type, int Chunk_Size>

bool vl::BufferedStream< Element_Type, Chunk_Size >::isEndOfFile | ( | ) | const`[inline]`

Definition at line 149 of file BufferedStream.hpp.

template<class Element_Type, int Chunk_Size>

void vl::BufferedStream< Element_Type, Chunk_Size >::setInputFile | ( | VirtualFile * | file ) | `[inline]`

Definition at line 151 of file BufferedStream.hpp.

Referenced by vl::STLLoader::loadAscii(), vl::loadMOL2(), and vl::VLXSerializer::loadVLT().

template<class Element_Type, int Chunk_Size>

VirtualFile* vl::BufferedStream< Element_Type, Chunk_Size >::inputFile | ( | ) | `[inline]`

Definition at line 157 of file BufferedStream.hpp.

Referenced by vl::BufferedStream< char, 128 *1024 >::fillBuffer(), and vl::BufferedStream< char, 128 *1024 >::seek().

template<class Element_Type, int Chunk_Size>

const VirtualFile* vl::BufferedStream< Element_Type, Chunk_Size >::inputFile | ( | ) | const`[inline]`

Definition at line 159 of file BufferedStream.hpp.

## Member Data Documentation

template<class Element_Type, int Chunk_Size>

ref<VirtualFile> vl::BufferedStream< Element_Type, Chunk_Size >::mInputFile`[protected]`

Definition at line 162 of file BufferedStream.hpp.

Referenced by vl::BufferedStream< char, 128 *1024 >::inputFile(), and vl::BufferedStream< char, 128 *1024 >::setInputFile().

template<class Element_Type, int Chunk_Size>

std::vector<Element_Type> vl::BufferedStream< Element_Type, Chunk_Size >::mUngetBuffer`[protected]`

Definition at line 163 of file BufferedStream.hpp.

Referenced by vl::BufferedStream< char, 128 *1024 >::readToken(), and vl::BufferedStream< char, 128 *1024 >::ungetToken().

template<class Element_Type, int Chunk_Size>

std::vector<Element_Type> vl::BufferedStream< Element_Type, Chunk_Size >::mBuffer`[protected]`

Definition at line 164 of file BufferedStream.hpp.

Referenced by vl::BufferedStream< char, 128 *1024 >::BufferedStream(), vl::BufferedStream< char, 128 *1024 >::fillBuffer(), and vl::BufferedStream< char, 128 *1024 >::readToken().

template<class Element_Type, int Chunk_Size>

int vl::BufferedStream< Element_Type, Chunk_Size >::mPtr`[protected]`

Definition at line 165 of file BufferedStream.hpp.

Referenced by vl::BufferedStream< char, 128 *1024 >::BufferedStream(), vl::BufferedStream< char, 128 *1024 >::bufferEmpty(), vl::BufferedStream< char, 128 *1024 >::fillBuffer(), vl::BufferedStream< char, 128 *1024 >::readToken(), and vl::BufferedStream< char, 128 *1024 >::seek().

template<class Element_Type, int Chunk_Size>

int vl::BufferedStream< Element_Type, Chunk_Size >::mSize`[protected]`

Definition at line 166 of file BufferedStream.hpp.

Referenced by vl::BufferedStream< char, 128 *1024 >::BufferedStream(), vl::BufferedStream< char, 128 *1024 >::bufferEmpty(), vl::BufferedStream< char, 128 *1024 >::fillBuffer(), and vl::BufferedStream< char, 128 *1024 >::seek().

template<class Element_Type, int Chunk_Size>

bool vl::BufferedStream< Element_Type, Chunk_Size >::mIsEndOfFile`[protected]`

Definition at line 167 of file BufferedStream.hpp.

Referenced by vl::BufferedStream< char, 128 *1024 >::BufferedStream(), vl::BufferedStream< char, 128 *1024 >::isEndOfFile(), vl::BufferedStream< char, 128 *1024 >::readToken(), and vl::BufferedStream< char, 128 *1024 >::setInputFile().

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

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlCore/BufferedStream.hpp

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:44:03.
Permission is granted to use this page to write and publish articles regarding Visualization Library.