Custom buffer object implementing STL interface std::streambuf for streamed reading from allocated memory block. Implements minimal sub-set of methods for passing buffer to std::istream, including seek support.
More...
#include <Standard_ArrayStreamBuffer.hxx>
|
| int_type | underflow () override |
| | Get character on underflow. Virtual function called by other member functions to get the current character in the controlled input sequence without changing the current position.
|
| |
| int_type | uflow () override |
| | Get character on underflow and advance position. Virtual function called by other member functions to get the current character in the controlled input sequence and then advance the position indicator to the next character.
|
| |
| int_type | pbackfail (int_type ch) override |
| | Put character back in the case of backup underflow. Virtual function called by other member functions to put a character back into the controlled input sequence and decrease the position indicator.
|
| |
| std::streamsize | showmanyc () override |
| | Get number of characters available. Virtual function (to be read s-how-many-c) called by other member functions to get an estimate on the number of characters available in the associated input sequence.
|
| |
| pos_type | seekoff (off_type theOff, std::ios_base::seekdir theWay, std::ios_base::openmode theWhich) override |
| | Seek to specified position.
|
| |
| pos_type | seekpos (pos_type thePosition, std::ios_base::openmode theWhich) override |
| | Change to specified position, according to mode.
|
| |
Custom buffer object implementing STL interface std::streambuf for streamed reading from allocated memory block. Implements minimal sub-set of methods for passing buffer to std::istream, including seek support.
This class can be used for creating a seekable input stream in cases, when the source data does not satisfies Reader requirements (non-seekable stream, compressed data) or represents an in-memory resource.
The memory itself is NOT managed by this class - it is up to the caller to ensure that passed memory pointer is not released during Standard_ArrayStreamBuffer lifetime.
Usage example:
A framework providing advanced tolerance control. It is used to build Shapes. If tolerance control is...
Definition BRep_Builder.hxx:58
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
Custom buffer object implementing STL interface std::streambuf for streamed reading from allocated me...
Definition Standard_ArrayStreamBuffer.hxx:49
Describes a shape which.
Definition TopoDS_Shape.hxx:41
◆ Standard_ArrayStreamBuffer()
| Standard_ArrayStreamBuffer::Standard_ArrayStreamBuffer |
( |
const char * | theBegin, |
|
|
const size_t | theSize ) |
Main constructor. Passed pointer is stored as is (memory is NOT copied nor released with destructor).
- Parameters
-
| theBegin | pointer to the beginning of pre-allocated buffer |
| theSize | length of pre-allocated buffer |
◆ ~Standard_ArrayStreamBuffer()
| Standard_ArrayStreamBuffer::~Standard_ArrayStreamBuffer |
( |
| ) |
|
|
override |
◆ Init()
(Re)-initialize the stream. Passed pointer is stored as is (memory is NOT copied nor released with destructor).
- Parameters
-
| theBegin | pointer to the beginning of pre-allocated buffer |
| theSize | length of pre-allocated buffer |
◆ pbackfail()
Put character back in the case of backup underflow. Virtual function called by other member functions to put a character back into the controlled input sequence and decrease the position indicator.
◆ seekoff()
| pos_type Standard_ArrayStreamBuffer::seekoff |
( |
off_type | theOff, |
|
|
std::ios_base::seekdir | theWay, |
|
|
std::ios_base::openmode | theWhich ) |
|
overrideprotected |
Seek to specified position.
◆ seekpos()
| pos_type Standard_ArrayStreamBuffer::seekpos |
( |
pos_type | thePosition, |
|
|
std::ios_base::openmode | theWhich ) |
|
overrideprotected |
Change to specified position, according to mode.
◆ showmanyc()
| std::streamsize Standard_ArrayStreamBuffer::showmanyc |
( |
| ) |
|
|
overrideprotected |
Get number of characters available. Virtual function (to be read s-how-many-c) called by other member functions to get an estimate on the number of characters available in the associated input sequence.
◆ uflow()
| int_type Standard_ArrayStreamBuffer::uflow |
( |
| ) |
|
|
overrideprotected |
Get character on underflow and advance position. Virtual function called by other member functions to get the current character in the controlled input sequence and then advance the position indicator to the next character.
◆ underflow()
| int_type Standard_ArrayStreamBuffer::underflow |
( |
| ) |
|
|
overrideprotected |
Get character on underflow. Virtual function called by other member functions to get the current character in the controlled input sequence without changing the current position.
◆ xsgetn()
| std::streamsize Standard_ArrayStreamBuffer::xsgetn |
( |
char * | thePtr, |
|
|
std::streamsize | theCount ) |
|
override |
Read a bunch of bytes at once.
◆ myBegin
| const char* Standard_ArrayStreamBuffer::myBegin |
|
protected |
◆ myCurrent
| const char* Standard_ArrayStreamBuffer::myCurrent |
|
protected |
◆ myEnd
| const char* Standard_ArrayStreamBuffer::myEnd |
|
protected |
The documentation for this class was generated from the following file: