libxspf  1.2.0
Protected Member Functions | Friends | List of all members
XspfChunkCallback Class Referenceabstract

#include <XspfChunkCallback.h>

Protected Member Functions

 XspfChunkCallback ()
 
 XspfChunkCallback (XspfChunkCallback const &source)
 
XspfChunkCallbackoperator= (XspfChunkCallback const &source)
 
virtual ~XspfChunkCallback ()
 
virtual int getMinimumBufferByteSize ()=0
 
virtual int fillBuffer (void *buffer)=0
 
virtual void notifyStop ()
 

Friends

class XspfReader
 

Detailed Description

Hands out text chunks to a XspfReader. This enables parsing from non-linear input structures. It can also be used to parse bug XSPF files in smaller chunks to lower memory usage.

Definition at line 63 of file XspfChunkCallback.h.

Constructor & Destructor Documentation

◆ XspfChunkCallback() [1/2]

XspfChunkCallback ( )
protected

Creates a new chunk callback.

◆ XspfChunkCallback() [2/2]

XspfChunkCallback ( XspfChunkCallback const &  source)
protected

Copy constructor.

Parameters
sourceSource to copy from

◆ ~XspfChunkCallback()

virtual ~XspfChunkCallback ( )
protectedvirtual

Destroys this chunk callback.

Member Function Documentation

◆ fillBuffer()

virtual int fillBuffer ( void *  buffer)
protectedpure virtual

Fulls buffer with a new chunk of input. the chunk copies must not exceed the number of bytes returned by the last call to getMinimumBufferByteSize. NOTE: You do not have to zero-terminate the string written. If you do so do not count this into the return value.

Parameters
bufferBuffer to write to
Returns
Number of bytes actually written

◆ getMinimumBufferByteSize()

virtual int getMinimumBufferByteSize ( )
protectedpure virtual

Returns the minimum size in bytes of the buffer handed to fillBuffer in a subsequent call.

Returns
Size in bytes

◆ notifyStop()

virtual void notifyStop ( )
protectedvirtual

Notifies this chunk callback, that no more chunks will be needed. You can close the resource read from in here.

◆ operator=()

XspfChunkCallback& operator= ( XspfChunkCallback const &  source)
protected

Assignment operator.

Parameters
sourceSource to copy from

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