AppLoad Class Reference
 
 
 
AppLoad Class Reference

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


#include <appio.h>

Inheritance diagram for AppLoad:
MaxHeapOperators

Class 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.

All methods of this class are implemented by the system.

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 (wchar_t **buf)=0
virtual IOResult  ReadCStringChunk (char **buf)=0
virtual IOResult  ReadCStringChunk (wchar_t **buf)=0
virtual UINT  CodePage () const

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 ( wchar_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:
wchar_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 ( wchar_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:
wchar_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 UINT CodePage ( ) const [inline, virtual]
{ return CP_ACP; }