![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
Memory Store Definition. More...
#include <FXMemoryStream.h>
Public Member Functions | |
| FXMemoryStream (const FXObject *cont=NULL) | |
| Create memory stream. | |
| FXMemoryStream (FXStreamDirection save_or_load, FXuchar *data=NULL, FXuval size=~0UL, FXbool owned=false) | |
| Create and open memory stream. | |
| FXbool | open (FXStreamDirection save_or_load, FXuchar *data=NULL, FXuval size=~0UL, FXbool owned=false) |
| Open memory stream. | |
| void | takeBuffer (FXuchar *&data, FXuval &size) |
| Take buffer away from stream. | |
| void | giveBuffer (FXuchar *data, FXuval size) |
| Give buffer to stream, making it the owner of this buffer. | |
| FXlong | position () const |
| Get position. | |
| virtual FXbool | position (FXlong offset, FXWhence whence=FXFromStart) |
| Move to position. | |
| FXMemoryStream & | operator<< (const FXuchar &v) |
| Save single items to stream. | |
| FXMemoryStream & | operator<< (const FXchar &v) |
| FXMemoryStream & | operator<< (const FXbool &v) |
| FXMemoryStream & | operator<< (const FXushort &v) |
| FXMemoryStream & | operator<< (const FXshort &v) |
| FXMemoryStream & | operator<< (const FXuint &v) |
| FXMemoryStream & | operator<< (const FXint &v) |
| FXMemoryStream & | operator<< (const FXfloat &v) |
| FXMemoryStream & | operator<< (const FXdouble &v) |
| FXMemoryStream & | operator<< (const FXlong &v) |
| FXMemoryStream & | operator<< (const FXulong &v) |
| FXMemoryStream & | save (const FXuchar *p, FXuval n) |
| Save arrays of items to stream. | |
| FXMemoryStream & | save (const FXchar *p, FXuval n) |
| FXMemoryStream & | save (const FXbool *p, FXuval n) |
| FXMemoryStream & | save (const FXushort *p, FXuval n) |
| FXMemoryStream & | save (const FXshort *p, FXuval n) |
| FXMemoryStream & | save (const FXuint *p, FXuval n) |
| FXMemoryStream & | save (const FXint *p, FXuval n) |
| FXMemoryStream & | save (const FXfloat *p, FXuval n) |
| FXMemoryStream & | save (const FXdouble *p, FXuval n) |
| FXMemoryStream & | save (const FXlong *p, FXuval n) |
| FXMemoryStream & | save (const FXulong *p, FXuval n) |
| FXMemoryStream & | operator>> (FXuchar &v) |
| Load single items from stream. | |
| FXMemoryStream & | operator>> (FXchar &v) |
| FXMemoryStream & | operator>> (FXbool &v) |
| FXMemoryStream & | operator>> (FXushort &v) |
| FXMemoryStream & | operator>> (FXshort &v) |
| FXMemoryStream & | operator>> (FXuint &v) |
| FXMemoryStream & | operator>> (FXint &v) |
| FXMemoryStream & | operator>> (FXfloat &v) |
| FXMemoryStream & | operator>> (FXdouble &v) |
| FXMemoryStream & | operator>> (FXlong &v) |
| FXMemoryStream & | operator>> (FXulong &v) |
| FXMemoryStream & | load (FXuchar *p, FXuval n) |
| Load arrays of items from stream. | |
| FXMemoryStream & | load (FXchar *p, FXuval n) |
| FXMemoryStream & | load (FXbool *p, FXuval n) |
| FXMemoryStream & | load (FXushort *p, FXuval n) |
| FXMemoryStream & | load (FXshort *p, FXuval n) |
| FXMemoryStream & | load (FXuint *p, FXuval n) |
| FXMemoryStream & | load (FXint *p, FXuval n) |
| FXMemoryStream & | load (FXfloat *p, FXuval n) |
| FXMemoryStream & | load (FXdouble *p, FXuval n) |
| FXMemoryStream & | load (FXlong *p, FXuval n) |
| FXMemoryStream & | load (FXulong *p, FXuval n) |
| FXMemoryStream & | saveObject (const FXObject *v) |
| Save object. | |
| FXMemoryStream & | loadObject (FXObject *&v) |
| Load object. | |
| virtual | ~FXMemoryStream () |
| Destructor. | |
Protected Member Functions | |
| virtual FXuval | writeBuffer (FXuval count) |
| Write at least count bytes from the buffer; returns number of bytes available to be written. | |
| virtual FXuval | readBuffer (FXuval count) |
| Read at least count bytes into the buffer; returns number of bytes available to be read. | |
Memory Store Definition.
| FXbool FX::FXMemoryStream::open | ( | FXStreamDirection | save_or_load, |
| FXuchar * | data = NULL, |
||
| FXuval | size = ~0UL, |
||
| FXbool | owned = false |
||
| ) |
Open memory stream.
When reading from the data buffer, the size parameter is optional. If not given, the reader will need to know when to stop reading by some other means, like end-of-file markers in the data. When writing, the size parameter must be set to reflect the actual buffer size, and should be at least 16. If the owned flag is true, the stream becomes the owner of the data buffer; otherwise, the stream will not delete the buffer. Passing NULL for the data buffer will cause the stream to allocate a buffer of the given size.
Reimplemented from FX::FXStream.
|
|