Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
Assimp::IOStreamBuffer< T > Class Template Reference

Implementation of a cached stream buffer. More...

#include <IOStreamBuffer.h>

Public Member Functions

size_t cacheSize () const
 Returns the cache size. More...
 
bool close ()
 Will close the cached access. More...
 
size_t getCurrentBlockIndex () const
 Returns the current block index. More...
 
size_t getFilePos () const
 Returns the current file pos. More...
 
bool getNextBlock (std::vector< T > &buffer)
 Will read the next block. More...
 
bool getNextDataLine (std::vector< T > &buffer, T continuationToken)
 Will read the next line. More...
 
bool getNextLine (std::vector< T > &buffer)
 Will read the next line ascii or binary end line char. More...
 
size_t getNumBlocks () const
 Returns the number of blocks to read. More...
 
 IOStreamBuffer (size_t cache=4096 *4096)
 The class constructor. More...
 
bool open (IOStream *stream)
 Will open the cached access for a given stream. More...
 
bool readNextBlock ()
 Will read the next block. More...
 
size_t size () const
 Returns the file-size. More...
 
 ~IOStreamBuffer ()
 The class destructor. More...
 

Detailed Description

template<class T>
class Assimp::IOStreamBuffer< T >

Implementation of a cached stream buffer.

Constructor & Destructor Documentation

◆ IOStreamBuffer()

template<class T >
AI_FORCE_INLINE Assimp::IOStreamBuffer< T >::IOStreamBuffer ( size_t  cache = 4096 * 4096)

The class constructor.

◆ ~IOStreamBuffer()

The class destructor.

Member Function Documentation

◆ cacheSize()

template<class T >
AI_FORCE_INLINE size_t Assimp::IOStreamBuffer< T >::cacheSize

Returns the cache size.

Returns
The cache size.

◆ close()

template<class T >
AI_FORCE_INLINE bool Assimp::IOStreamBuffer< T >::close

Will close the cached access.

Returns
true if successful.

◆ getCurrentBlockIndex()

template<class T >
AI_FORCE_INLINE size_t Assimp::IOStreamBuffer< T >::getCurrentBlockIndex

Returns the current block index.

Returns
The current block index.

◆ getFilePos()

template<class T >
AI_FORCE_INLINE size_t Assimp::IOStreamBuffer< T >::getFilePos

Returns the current file pos.

Returns
The current file pos.

◆ getNextBlock()

template<class T >
AI_FORCE_INLINE bool Assimp::IOStreamBuffer< T >::getNextBlock ( std::vector< T > &  buffer)

Will read the next block.

Parameters
bufferThe buffer for the next block.
Returns
true if successful.

◆ getNextDataLine()

template<class T >
AI_FORCE_INLINE bool Assimp::IOStreamBuffer< T >::getNextDataLine ( std::vector< T > &  buffer,
continuationToken 
)

Will read the next line.

Parameters
bufferThe buffer for the next line.
Returns
true if successful.

◆ getNextLine()

template<class T >
AI_FORCE_INLINE bool Assimp::IOStreamBuffer< T >::getNextLine ( std::vector< T > &  buffer)

Will read the next line ascii or binary end line char.

Parameters
bufferThe buffer for the next line.
Returns
true if successful.

◆ getNumBlocks()

template<class T >
AI_FORCE_INLINE size_t Assimp::IOStreamBuffer< T >::getNumBlocks

Returns the number of blocks to read.

Returns
The number of blocks.

◆ open()

template<class T >
AI_FORCE_INLINE bool Assimp::IOStreamBuffer< T >::open ( IOStream stream)

Will open the cached access for a given stream.

Parameters
streamThe stream to cache.
Returns
true if successful.

◆ readNextBlock()

template<class T >
AI_FORCE_INLINE bool Assimp::IOStreamBuffer< T >::readNextBlock

Will read the next block.

Returns
true if successful.

◆ size()

template<class T >
AI_FORCE_INLINE size_t Assimp::IOStreamBuffer< T >::size

Returns the file-size.

Returns
The file-size.

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