Defined in file: hzXbuf.h

hzXbuf can be considered a variant of hzChain. Both are chains of blocks that act as unlimited buffers, but where hzChain is aimed at string value assembly, hzXbuf is aimed at storing internal RAM Primacy data. hzXbuf is used in the data cache of the HDB data object repository, hdbObjRepos, and by the hzIntset class. To these ends, hzXbuf uses a different allocation regime, does not support a Printf function, and cannot be reverse iterated.

This class employes the private sub-class _xbuf as follows:-

_xbuf

Constructors/Detructors

hzXbuf*hzXbuf(void)
hzXbuf*hzXbuf(hzXbuf& op)
NULL-TYPEhzXbuf(void)Construct an empty hzXbuf instance. Increment the global count of currently allocated hzXbuf instances for memory use reporting purposes.
NULL-TYPEhzXbuf(hzXbuf& op)Copy constructor
void~hzXbuf(void)
NULL-TYPE~hzXbuf(void)Delete this hzXbuf instance. Decrement the global count of currently allocated hzXbuf instances for memory use reporting purposes.

Public Methods:

hzEcodeAddByte(const char C)Appends chain with a single byte. Takes the single arg as the char to append, returns either E_OK if successful but E_MEMORY if not. The latter is a fatal condition. Returns: E_OK
uint32_tAppend(const void* vpStr)uint32_t nBytes, Appends the chain with the first nBytes nB (void*) buffer of given size. This operation makes no assumptions about buffer content and so the operation is not null terminated.
voidClear(void)Clears all content held by the hzXbuf. Arguments: None Returns: None
uint32_tSize(void)
int32_t_compare(hzXbuf& op)Lexical compare

Overloaded operators:

booloperator!(void)
booloperator!=(hzXbuf& op)
hzXbuf&operator+=(unsigned char* s)Append the current chain with the supplied uchar string operand.
hzXbuf&operator+=(hzString& s)Append chain with supplied string
hzXbuf&operator+=(hzXbuf& op)Append this chain with the supplied chain. This is done as a series of memcpy calls.
hzXbuf&operator+=(hzChain& Z)Append the current xbuf with the supplied hzChain
booloperator<(hzXbuf& op)
booloperator<=(hzXbuf& op)
hzXbuf&operator=(hzXbuf& op)Makes this chain equal to the supplied chain operand. Any pre-existing contents are disregarded.
hzXbuf&operator=(hzString& S)Makes this chain equal to the supplied string operand. Any pre-existing contents are disregarded.
hzXbuf&operator=(const char* s)Makes this chain equal to the supplied char string operand. Any pre-existing contents are disregarded.
booloperator==(hzXbuf& op)
booloperator>(hzXbuf& op)
booloperator>=(hzXbuf& op)

Member Variables:

hzXbuf::_xbuf*mxSmart pointer to contents