AppLoad Class Reference

#include <appio.h>

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.
+ Inheritance diagram for AppLoad:

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 ()
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Constructor & Destructor Documentation

virtual ~AppLoad ( )
inlineprotectedvirtual
178 {};

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
inlinevirtual
286 { return CP_ACP; }