rtxMemBuf.h File Reference
#include "rtxsrc/rtxContext.h"Go to the source code of this file.
Classes | |
| struct | OSRTMEMBUF |
Defines | |
| #define | OSMBDFLTSEGSIZE 1024 |
| #define | OSMEMBUFPTR(pmb) ((pmb)->buffer + (pmb)->startidx) |
| #define | OSMEMBUFENDPTR(pmb) ((pmb)->buffer + (pmb)->startidx + (pmb)->usedcnt) |
| #define | OSMEMBUFUSEDSIZE(pmb) ((size_t)(pmb)->usedcnt) |
| #define | OSMBAPPENDSTR(pmb, str) rtxMemBufAppend(pmb,(OSOCTET*)str,OSCRTLSTRLEN(str)) |
| #define | OSMBAPPENDUTF8(pmb, str) rtxMemBufAppend(pmb,(OSOCTET*)str,rtxUTF8LenBytes(str)) |
Functions | |
| int | rtxMemBufAppend (OSRTMEMBUF *pMemBuf, const OSOCTET *pdata, size_t nbytes) |
| This function appends the data to the end of a memory buffer. | |
| int | rtxMemBufCut (OSRTMEMBUF *pMemBuf, size_t fromOffset, size_t nbytes) |
| This function cuts off the part of memory buffer. | |
| void | rtxMemBufFree (OSRTMEMBUF *pMemBuf) |
| This function frees the memory buffer. | |
| OSOCTET * | rtxMemBufGetData (OSRTMEMBUF *pMemBuf, int *length) |
| This function returns the pointer to the used part of a memory buffer. | |
| int | rtxMemBufGetDataLen (OSRTMEMBUF *pMemBuf) |
| This function returns the length of the used part of a memory buffer. | |
| void | rtxMemBufInit (OSCTXT *pCtxt, OSRTMEMBUF *pMemBuf, size_t segsize) |
| This function initializes a memory buffer structure. | |
| void | rtxMemBufInitBuffer (OSCTXT *pCtxt, OSRTMEMBUF *pMemBuf, OSOCTET *buf, size_t bufsize, size_t segsize) |
| This function assigns a static buffer to the memory buffer structure. | |
| int | rtxMemBufPreAllocate (OSRTMEMBUF *pMemBuf, size_t nbytes) |
| This function allocates a buffer with a predetermined amount of space. | |
| void | rtxMemBufReset (OSRTMEMBUF *pMemBuf) |
| This function resets the memory buffer structure. | |
| int | rtxMemBufSet (OSRTMEMBUF *pMemBuf, OSOCTET value, size_t nbytes) |
| This function sets part of a memory buffer to a specified octet value. | |
| OSBOOL | rtxMemBufSetExpandable (OSRTMEMBUF *pMemBuf, OSBOOL isExpandable) |
| This function sets "isExpandable" flag for the memory buffer object. | |
| int | rtxMemBufTrimW (OSRTMEMBUF *pMemBuf) |
| This function trims white space of the memory buffer. | |
Detailed Description
Definition in file rtxMemBuf.h.
