Private data for the Qore::StreamReader class.
More...
#include <StreamReader.h>
|
| int64 | peekCheck (ExceptionSink *xsink) |
| | Peeks the next byte from the input stream.
|
| |
| virtual DLLLOCAL qore_offset_t | read (ExceptionSink *xsink, void *dest, size_t limit, bool require_all=true) |
| | Read data until a limit.
|
| |
| DLLLOCAL BinaryNode * | readBinary (int64 limit, ExceptionSink *xsink) |
| | Read binary data from the stream.
|
| |
| DLLLOCAL QoreStringNode * | readLine (const QoreStringNode *eol, bool trim, ExceptionSink *xsink) |
| | Read one line.
|
| |
| DLLLOCAL QoreStringNode * | readString (int64 size, ExceptionSink *xsink) |
| | Read string data from the stream.
|
| |
|
virtual DLLLOCAL void | deref () |
| | decrements the reference count of the object without the possibility of throwing a Qore-language exception
|
| |
| virtual DLLLOCAL void | deref (ExceptionSink *xsink) |
| | decrements the reference count of the object
|
| |
|
DLLLOCAL void | ref () const |
| | increments the reference count of the object
|
| |
|
DLLEXPORT | QoreReferenceCounter () |
| | Creates the reference counter object.
|
| |
| DLLEXPORT | QoreReferenceCounter (const QoreReferenceCounter &old) |
| | Creates a new object with a reference count of 1.
|
| |
|
DLLEXPORT | ~QoreReferenceCounter () |
| | destroys the reference counter object
|
| |
| DLLEXPORT bool | is_unique () const |
| | Returns true if the reference count is 1.
|
| |
| DLLEXPORT bool | optRef () |
| | Make a strong reference only if the object is valid.
|
| |
| DLLEXPORT int | reference_count () const |
| | Gets the reference count.
|
| |
| DLLEXPORT bool | ROdereference () const |
| | Atomically decrements the reference count.
|
| |
|
DLLEXPORT void | ROreference () const |
| | Atomically increments the reference count.
|
| |
|
|
virtual DLLLOCAL | ~AbstractPrivateData () |
| | as these objects are reference counted, the destructor should be called only when the reference count = 0 and not manually
|
| |
Private data for the Qore::StreamReader class.
◆ peekCheck()
Peeks the next byte from the input stream.
- Parameters
-
- Returns
- the next byte available to be read, -1 indicates an error (end of stream is treated as an error)
References ExceptionSink::raiseException().
◆ read()
Read data until a limit.
- Parameters
-
| xsink | exception sink |
| dest | destination buffer |
| limit | maximum amount of data to read |
| require_all | if true then throw an exception if the required amount of data cannot be read from the stream |
- Returns
- amount of data read, -1 in case of error
- Since
- Qore 0.9
◆ readBinary()
Read binary data from the stream.
- Parameters
-
| limit | max amount of data to read; if equal to -1, all data will be read, if equal to 0, no data will be read |
| xsink | exception sink |
- Returns
- Qore binary read from the stream
References QORE_MIN.
◆ readLine()
Read one line.
- Parameters
-
| eol | end-of-line symbol, if missing and the character encoding is ASCII-compatible, then "\n", "\r", or "\r\n" are supported), otherwise if missing, and the character encoding is not ASCII-compatible, then "\n" is assumed |
| trim | whether to trim the EOL symbols |
| xsink | exception sink |
- Returns
- Qore string read from the stream
References enc, QoreEncoding::isAsciiCompat(), and readLine().
Referenced by readLine().
◆ readString()
Read string data from the stream.
- Parameters
-
| size | max amount of data to read as a number of characters; if equal to -1, all data will be read, if equal to 0, no data will be read |
| xsink | exception sink |
- Returns
- Qore string read from the stream
References enc.
The documentation for this class was generated from the following file: