Heap-allocated NUL-terminated string.
Definition hxstr.h:41
virtual int GetMarker()
Report the read position.
HxStream & WriteNum(const void *pSrc, int nSize)
Move nSize bytes out of pSrc, reversing their order when the stream swaps bytes.
virtual HxStream * UnderlyingStream()
Report the stream this one reads through, if any.
int mSwapBytes
Non-zero when multi-byte values on the stream are in the opposite byte order.
Definition hxstream.h:236
virtual HxStream & Write(const void *pSrc, int nSize)
Move nSize bytes out of pSrc.
virtual int Size()
Report the length of the data.
HxStream * GetRootStream()
Follow UnderlyingStream() from this stream until a stream reports none, and report that stream.
HxStream()
Construct a stream with a zeroed state.
static const int goodbit
Status value of a stream with nothing wrong.
Definition hxstream.h:202
int mFatalOnEnd
Definition hxstream.h:252
static const int failbit
Status bit a seek outside a chunk's bounds would set.
Definition hxstream.h:218
virtual ~HxStream()
Close the stream.
static const int kStatusEnd
Status value of a stream whose read position arrived at the end of its data.
Definition hxstream.h:210
virtual HxStream & ReadData(void *pDest, int nSize)
Move nSize bytes into pDest.
int mStatus
Definition hxstream.h:249
static const int badbit
Second status bit GetMarker() and SetMarker() of HxIDataChunk test.
Definition hxstream.h:226
HxStream & ReadStr(char *pszDest, int nDestSize)
Read a string with a variable-length size prefix into a fixed buffer.
HxStream & ReadString(HxStr &str)
Read a string with a variable-length size prefix into an HxStr.
HxStream & ReadNum(void *pDest, int nSize)
Move nSize bytes into pDest, reversing their order when the stream swaps bytes.
virtual void SetMarker(int nOffset, int nWhence)
Move the read position.
HxStreamSeekOrigin
Origin an HxStream::SetMarker() offset is measured from.
Definition hxstream.h:12
@ kHxSeekSet
Definition hxstream.h:13
@ kHxSeekEnd
Definition hxstream.h:15
@ kHxSeekCur
Definition hxstream.h:14