iPlug 2: IByteGetter Struct Reference
A helper class for IByteChunk and IByteStream that avoids code duplication. More...
#include <IPlugStructs.h>
Static Public Member Functions | |
| static int | GetBytes (const uint8_t *pSrc, int srcSize, void *pDst, int nBytesToCopy, int startPos) |
| Copy raw bytes from a byte array, returning the new position for subsequent calls. More... | |
| static int | GetStr (const uint8_t *pSrc, int srcSize, WDL_String &str, int startPos) |
| Get a string from a byte array, to a WDL_String, returning the new position for subsequent calls. More... | |
A helper class for IByteChunk and IByteStream that avoids code duplication.
Definition at line 64 of file IPlugStructs.h.
◆ GetBytes()
|
inlinestatic |
Copy raw bytes from a byte array, returning the new position for subsequent calls.
- Parameters
-
pSrc The source buffer dstSize The size of the source data in bytes pDst The destination buffer nBytesToCopy The number of bytes to copy from pSrc startPos The starting position in bytes in pSrc
- Returns
- int The end position in bytes after the copy, or -1 if the copy would have copied more data than in the src buffer
Definition at line 73 of file IPlugStructs.h.
Referenced by IByteChunk::GetBytes(), IByteStream::GetBytes(), and GetStr().
◆ GetStr()
|
inlinestatic |
Get a string from a byte array, to a WDL_String, returning the new position for subsequent calls.
- Parameters
-
pSrc The source buffer dstSize The size of the source data in bytes str WDL_String to fill with the extracted string startPos The starting position in bytes in pSrc
- Returns
- int The end position in bytes after the copy, or -1 if the copy would have copied more data than in the src buffer
Definition at line 90 of file IPlugStructs.h.
References GetBytes().
Referenced by IByteChunk::GetStr(), and IByteStream::GetStr().
The documentation for this struct was generated from the following file: