iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
Public Member Functions | List of all members
IByteChunkReader Class Reference

Helper class to maintain a read position whilst extracting data from an IByteChunk
More...

#include <IPlugStructs.h>

Public Member Functions

 IByteChunkReader (const IByteChunk &chunk, int startPos=0)
 
int GetBytes (void *pBuf, int nBytesToCopy)
 Copy nBytesToCopy bytes from the managed IByteChunk into pBuf . More...
 
template<class T >
int Get (T *pDst)
 Copy arbitary typed data out of the managed IByteChunk at the current position and update the position. More...
 
int GetStr (WDL_String &str)
 Retrieve a string from the managed IByteChunk and put it in str . More...
 
int Tell () const
 Return the current position in the managed IByteChunk. More...
 
void Seek (int pos)
 Set the current position in the managed IByteChunk. More...
 

Detailed Description

Helper class to maintain a read position whilst extracting data from an IByteChunk

Definition at line 331 of file IPlugStructs.h.

Constructor & Destructor Documentation

◆ IByteChunkReader()

IByteChunkReader::IByteChunkReader ( const IByteChunk chunk,
int  startPos = 0 
)
inline

Definition at line 334 of file IPlugStructs.h.

Member Function Documentation

◆ Get()

template<class T >
int IByteChunkReader::Get ( T *  pDst)
inline

Copy arbitary typed data out of the managed IByteChunk at the current position and update the position.

Template Parameters
Ttype of the variable to get
Parameters
pDstPointer to the destination where the value will be stored
Returns
int Next read position in the IByteChunk

Definition at line 355 of file IPlugStructs.h.

References IByteChunk::Get().

◆ GetBytes()

int IByteChunkReader::GetBytes ( void *  pBuf,
int  nBytesToCopy 
)
inline

Copy nBytesToCopy bytes from the managed IByteChunk into pBuf .

Parameters
pBufDestination buffer
nBytesToCopyNumber of bytes to copy
Returns
Next read position in the IByteChunk

Definition at line 344 of file IPlugStructs.h.

References IByteChunk::GetBytes().

◆ GetStr()

int IByteChunkReader::GetStr ( WDL_String &  str)
inline

Retrieve a string from the managed IByteChunk and put it in str .

Parameters
strDestination for the string
Returns
int Next read position in the IByteChunk

Definition at line 364 of file IPlugStructs.h.

References IByteChunk::GetStr().

◆ Seek()

void IByteChunkReader::Seek ( int  pos)
inline

Set the current position in the managed IByteChunk.

Parameters
posThe new IByteChunk position

Definition at line 379 of file IPlugStructs.h.

◆ Tell()

int IByteChunkReader::Tell ( ) const
inline

Return the current position in the managed IByteChunk.

Returns
The current position in the IByteChunk

Definition at line 372 of file IPlugStructs.h.


The documentation for this class was generated from the following file: