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>
|
virtual 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.
|
|
virtual 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.
|
|
virtual 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.
|
|
virtual 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.
|
|
virtual pos_type | seekoff (off_type theOff, std::ios_base::seekdir theWay, std::ios_base::openmode theWhich) override |
| Seek to specified position.
|
|
virtual 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:59
Definition NCollection_UBTree.hxx:64
Custom buffer object implementing STL interface std::streambuf for streamed reading from allocated me...
Definition Standard_ArrayStreamBuffer.hxx:48
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()
virtual Standard_ArrayStreamBuffer::~Standard_ArrayStreamBuffer |
( |
| ) |
|
|
virtual |
◆ 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()
virtual pos_type Standard_ArrayStreamBuffer::seekoff |
( |
off_type |
theOff, |
|
|
std::ios_base::seekdir |
theWay, |
|
|
std::ios_base::openmode |
theWhich |
|
) |
| |
|
overrideprotectedvirtual |
Seek to specified position.
◆ seekpos()
Change to specified position, according to mode.
◆ showmanyc()
virtual std::streamsize Standard_ArrayStreamBuffer::showmanyc |
( |
| ) |
|
|
overrideprotectedvirtual |
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()
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()
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()
virtual std::streamsize Standard_ArrayStreamBuffer::xsgetn |
( |
char * |
thePtr, |
|
|
std::streamsize |
theCount |
|
) |
| |
|
overridevirtual |
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: