Visualization Library 2.0.0-b3

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

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | List of all members
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 >:

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)
 
VirtualFileinputFile ()
 
const VirtualFileinputFile () const
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Protected Attributes

ref< VirtualFilemInputFile
 
std::vector< Element_Type > mUngetBuffer
 
std::vector< Element_Type > mBuffer
 
int mPtr
 
int mSize
 
bool mIsEndOfFile
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

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

◆ BufferedStream()

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

◆ bufferEmpty()

template<class Element_Type, int Chunk_Size>
bool vl::BufferedStream< Element_Type, Chunk_Size >::bufferEmpty ( )
inline

◆ fillBuffer()

template<class Element_Type, int Chunk_Size>
int vl::BufferedStream< Element_Type, Chunk_Size >::fillBuffer ( )
inline

◆ inputFile() [1/2]

template<class Element_Type, int Chunk_Size>
VirtualFile* vl::BufferedStream< Element_Type, Chunk_Size >::inputFile ( )
inline

◆ inputFile() [2/2]

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.

◆ isEndOfFile()

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.

◆ 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.

◆ readToken()

template<class Element_Type, int Chunk_Size>
bool vl::BufferedStream< Element_Type, Chunk_Size >::readToken ( Element_Type *  token)
inline

◆ seek()

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().

◆ setInputFile()

template<class Element_Type, int Chunk_Size>
void vl::BufferedStream< Element_Type, Chunk_Size >::setInputFile ( VirtualFile file)
inline

◆ ungetToken()

template<class Element_Type, int Chunk_Size>
void vl::BufferedStream< Element_Type, Chunk_Size >::ungetToken ( const Element_Type &  token)
inline

Member Data Documentation

◆ mBuffer

template<class Element_Type, int Chunk_Size>
std::vector<Element_Type> vl::BufferedStream< Element_Type, Chunk_Size >::mBuffer
protected

◆ mInputFile

template<class Element_Type, int Chunk_Size>
ref<VirtualFile> vl::BufferedStream< Element_Type, Chunk_Size >::mInputFile
protected

◆ mIsEndOfFile

template<class Element_Type, int Chunk_Size>
bool vl::BufferedStream< Element_Type, Chunk_Size >::mIsEndOfFile
protected

◆ mPtr

template<class Element_Type, int Chunk_Size>
int vl::BufferedStream< Element_Type, Chunk_Size >::mPtr
protected

◆ mSize

template<class Element_Type, int Chunk_Size>
int vl::BufferedStream< Element_Type, Chunk_Size >::mSize
protected

◆ mUngetBuffer

template<class Element_Type, int Chunk_Size>
std::vector<Element_Type> vl::BufferedStream< Element_Type, Chunk_Size >::mUngetBuffer
protected

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