Detailed Description
- See also:
- Class AppLoad,
Class
AppDataChunk, Class CharacterStrings.
- Description:
- This class is available in release 2.0 and later only.
This class is a general chunk-ifying code useful for writing
hierarchical data structures to a linear stream, such as an AppData
block.
All methods of this class are implemented by the system.
AppSave will write
hierarchical chunks into a private buffer, enlarging it as needed.
When completed, use the methods BufferPtr()
and NBytesWritten()
to get at this buffer. (AppSave will delete the buffer in its
DeleteThis()
method , so you need to copy the buffer to save the data.)
The chunk hierarchy should always have a single highest level
chunk. Chunks can be nested to any depth.
A Chunk can contain either sub-chunks, or data, but not both.
- Sample Code:
-
#include <appio.h>
List of all
members.
Constructor & Destructor Documentation
virtual ~AppSave |
( |
|
) |
[inline, protected, virtual] |
Member Function Documentation
virtual void DeleteThis |
( |
|
) |
[pure virtual] |
virtual BYTE* BufferPtr |
( |
|
) |
[pure virtual] |
virtual int NBytesWritten |
( |
|
) |
[pure virtual] |
virtual void BeginChunk |
( |
USHORT |
id |
) |
[pure virtual] |
- Parameters:
- USHORT id
The id for the chunk.
virtual void EndChunk |
( |
|
) |
[pure virtual] |
virtual int CurChunkDepth |
( |
|
) |
[pure virtual] |
virtual IOResult
Write |
( |
const void * |
buf, |
|
|
ULONG |
nbytes, |
|
|
ULONG * |
nwrit |
|
) |
|
[pure virtual] |
- Parameters:
- const void *buf
The buffer to write.
ULONG nbytes
The number of bytes to write.
ULONG *nwrit
The number of bytes actually written.
- Returns:
- IO_OK - The write was acceptable - no errors.
IO_ERROR - This is returned if an error occurred.
virtual IOResult
WriteWString |
( |
const char * |
str |
) |
[pure virtual] |
- Parameters:
- const char *str
The string to write.
- Returns:
- IO_OK - The write was acceptable - no errors.
IO_ERROR - This is returned if an error occurred.
virtual IOResult
WriteWString |
( |
const mwchar_t * |
str |
) |
[pure virtual] |
- Parameters:
- const wchar_t *str
The string to write.
- Returns:
- IO_OK - The write was acceptable - no errors.
IO_ERROR - This is returned if an error occurred.
virtual IOResult
WriteCString |
( |
const char * |
str |
) |
[pure virtual] |
- Parameters:
- const char *str
The string to write.
- Returns:
- IO_OK - The write was acceptable - no errors.
IO_ERROR - This is returned if an error occurred.
virtual IOResult
WriteCString |
( |
const mwchar_t * |
str |
) |
[pure virtual] |
- Parameters:
- const wchar_t *str
The string to write.
- Returns:
- IO_OK - The write was acceptable - no errors.
IO_ERROR - This is returned if an error occurred.