rtxCppBitString.h File Reference

  • Contains utility function for sizing a bit string.
More...

#include "rtxsrc/rtxContext.h"

Go to the source code of this file.

Functions

EXTERNRT int rtxCppCheckBitBounds (OSOCTET *&pBits, OSUINT32 &numocts, size_t minRequiredBits, size_t preferredLimitBits)
 Check whether the given bit string is large enough, and expand it if necessary.

Detailed Description

  • Contains utility function for sizing a bit string.

Definition in file rtxCppBitString.h.


Function Documentation

EXTERNRT int rtxCppCheckBitBounds ( OSOCTET *&  pBits,
OSUINT32 &  numocts,
size_t  minRequiredBits,
size_t  preferredLimitBits 
)

Check whether the given bit string is large enough, and expand it if necessary.

Parameters:
pBits pBits is a pointer to the bit string, or NULL if one has not been created. If the string is expanded, pBits receives a pointer to the new bit string.
numocts is the current size of the bit string in octets. If the bit string is expanded, numocts receives the new size.
minRequiredBits The minimum number of bits needed in the bit string. On return, pBits will point to a bit string with at least this many bits.
preferredLimitBits The number of bits over which we prefer not to go. If nonzero, no more bytes will be allocated than necessary for this many bits, unless explicitly required by minRequiredBits.
Returns:
If successful, 0. Otherwise, an error code.