Public Member Functions | Protected Member Functions

AppLoad Class Reference

This reference page is linked to from the following overview topics: Loading and Saving Plug-in Data.


Search for all occurrences

Detailed Description

See also:
Class AppSave, Class AppDataChunk.

Description:
This class takes a chunk-ified data stream (as written by Class AppSave), and provides routines for decoding it.

This class is available in release 2.0 and later only.

All methods of this class are implemented by the system.

#include <appio.h>

Inheritance diagram for AppLoad:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void  DeleteThis ()=0
virtual IOResult  OpenChunk ()=0
virtual USHORT  CurChunkID ()=0
virtual ChunkType  CurChunkType ()=0
virtual ULONG  CurChunkLength ()=0
virtual int  CurChunkDepth ()=0
virtual IOResult  CloseChunk ()=0
virtual USHORT  PeekNextChunkID ()=0
virtual IOResult  Read (void *buf, ULONG nbytes, ULONG *nread)=0
virtual IOResult  ReadWStringChunk (char **buf)=0
virtual IOResult  ReadWStringChunk (mwchar_t **buf)=0
virtual IOResult  ReadCStringChunk (char **buf)=0
virtual IOResult  ReadCStringChunk (mwchar_t **buf)=0

Protected Member Functions

virtual  ~AppLoad ()

Constructor & Destructor Documentation

virtual ~AppLoad ( ) [inline, protected, virtual]
{};

Member Function Documentation

virtual void DeleteThis ( ) [pure virtual]
Remarks:
This method deletes the instance of AppLoad.
virtual IOResult OpenChunk ( ) [pure virtual]
Remarks:
This method is used to open a chunk. If OpenChunk() returns IO_OK, use the following 3 functions to get the information about the chunk. If it returns IO_END this indicates there are no more chunks at this level.
Returns:
IO_OK - The result was acceptable - no errors.

IO_END - This is returned when the end of the chunks at a certain level have been reached. It is used as a signal to terminate the processing of chunks at that level.

IO_ERROR - This is returned if an error occurred.
virtual USHORT CurChunkID ( ) [pure virtual]
Remarks:
This method returns the ID of the most recently opened chunk.
virtual ChunkType CurChunkType ( ) [pure virtual]
Remarks:
This method returns the type of the most recently opened chunk. This may be one of the following values:

NEW_CHUNK

CONTAINER_CHUNK

DATA_CHUNK
virtual ULONG CurChunkLength ( ) [pure virtual]
Remarks:
This method returns the chunk length not including the header.
virtual int CurChunkDepth ( ) [pure virtual]
Remarks:
This method is used internally for checking for balanced OpenChunk/CloseChunk pairs.
virtual IOResult CloseChunk ( ) [pure virtual]
Remarks:
This method is used to close the currently opened chunk, and position at the next chunk.
Returns:
A return value of IO_ERROR indicates there is no open chunk to close; otherwise IO_OK.
virtual USHORT PeekNextChunkID ( ) [pure virtual]
Remarks:
This method returns the ID of the next chunk without opening it. It returns 0 if there are no more chunks.
virtual IOResult Read ( void *  buf,
ULONG  nbytes,
ULONG *  nread 
) [pure virtual]
Remarks:
This method is used to read a block of bytes.
Parameters:
void *buf

A pointer to the buffer to read.

ULONG nbytes

The number of bytes to read.

ULONG *nread

The number of bytes that were read.
Returns:
A return value of IO_ERROR indicates an error occurred, otherwise IO_OK.
virtual IOResult ReadWStringChunk ( char **  buf ) [pure virtual]
Remarks:
This method read a string that was stored as Wide characters. Note: This method reads a string from a string chunk. It is assumed the chunk is already open, it will NOT close the chunk.
Parameters:
char** buf

A pointer to an array of characters.
Returns:
A return value of IO_ERROR indicates an error occurred, otherwise IO_OK.
virtual IOResult ReadWStringChunk ( mwchar_t **  buf ) [pure virtual]
Remarks:
This method read a string that was stored as Wide characters. Note: This method reads a string from a string chunk. It is assumed the chunk is already open, it will NOT close the chunk.
Parameters:
mwchar_t** buf

A pointer to an array of wide characters.
Returns:
A return value of IO_ERROR indicates an error occurred, otherwise IO_OK.
virtual IOResult ReadCStringChunk ( char **  buf ) [pure virtual]
Remarks:
This method reads a string that was stored as single byte characters.
Parameters:
char** buf

A pointer to an array of single byte characters.
Returns:
A return value of IO_ERROR indicates an error occurred, otherwise IO_OK.
virtual IOResult ReadCStringChunk ( mwchar_t **  buf ) [pure virtual]
Remarks:
This method read a string that was stored as Wide chars. Note: This method reads a string from a string chunk. It is assumed the chunk is already open, it will NOT close the chunk.
Parameters:
mwchar_t** buf

A pointer to an array of wide characters.
Returns:
A return value of IO_ERROR indicates an error occurred, otherwise IO_OK.

AppLoad AppLoad AppLoad AppLoad AppLoad AppLoad AppLoad AppLoad AppLoad AppLoad
AppLoad AppLoad AppLoad AppLoad AppLoad AppLoad AppLoad AppLoad AppLoad AppLoad