Auxiliary tool for buffered reading from input stream within chunks of constant size.
More...
#include <Standard_ReadBuffer.hxx>
|
| Standard_ReadBuffer (int64_t theDataLen, size_t theChunkLen) |
| Constructor with initialization. More...
|
|
void | Init (int64_t theDataLen, size_t theChunkLen) |
| Initialize the buffer. More...
|
|
bool | IsDone () const |
| Return TRUE if amount of read bytes is equal to requested length of entire data. More...
|
|
template<typename Chunk_T , typename Stream_T > |
Chunk_T * | ReadChunk (Stream_T &theStream) |
| Read next chunk. More...
|
|
template<typename Stream_T > |
char * | ReadDataChunk (Stream_T &theStream) |
| Read next chunk. More...
|
|
Auxiliary tool for buffered reading from input stream within chunks of constant size.
◆ Standard_ReadBuffer()
Standard_ReadBuffer::Standard_ReadBuffer |
( |
int64_t |
theDataLen, |
|
|
size_t |
theChunkLen |
|
) |
| |
|
inline |
Constructor with initialization.
◆ Init()
void Standard_ReadBuffer::Init |
( |
int64_t |
theDataLen, |
|
|
size_t |
theChunkLen |
|
) |
| |
|
inline |
Initialize the buffer.
- Parameters
-
theDataLen | the full length of input data to read from stream. |
theChunkLen | the length of single chunk to read |
◆ IsDone()
bool Standard_ReadBuffer::IsDone |
( |
| ) |
const |
|
inline |
Return TRUE if amount of read bytes is equal to requested length of entire data.
◆ ReadChunk()
template<typename Chunk_T , typename Stream_T >
Chunk_T* Standard_ReadBuffer::ReadChunk |
( |
Stream_T & |
theStream | ) |
|
|
inline |
Read next chunk.
- Returns
- pointer to the chunk or NULL on error / end of reading buffer
◆ ReadDataChunk()
template<typename Stream_T >
char* Standard_ReadBuffer::ReadDataChunk |
( |
Stream_T & |
theStream | ) |
|
|
inline |
Read next chunk.
- Returns
- pointer to the chunk or NULL on error / end of reading buffer
The documentation for this class was generated from the following file: