22 #ifndef FXGZFILESTREAM_H 23 #define FXGZFILESTREAM_H 25 #ifndef FXFILESTREAM_H 26 #include "FXFileStream.h" 36 class FXAPI FXGZFileStream :
public FXFileStream {
41 virtual FXuval writeBuffer(FXuval count);
42 virtual FXuval readBuffer(FXuval count);
44 FXGZFileStream(
const FXGZFileStream&);
45 FXGZFileStream& operator=(
const FXGZFileStream&);
49 FXGZFileStream(
const FXObject* cont=
nullptr);
52 FXGZFileStream(
const FXString& filename,FXStreamDirection save_or_load=FXStreamLoad,FXuval size=8192UL);
55 FXbool open(
const FXString& filename,FXStreamDirection save_or_load=FXStreamLoad,FXuval size=8192UL);
58 virtual FXbool flush();
61 virtual FXbool close();
67 virtual FXbool position(FXlong,FXWhence){
return false; }
83 FXGZFileStream& save(
const FXuchar* p,FXuval n){
FXStream::save(p,n);
return *
this; }
84 FXGZFileStream& save(
const FXchar* p,FXuval n){
FXStream::save(p,n);
return *
this; }
85 FXGZFileStream& save(
const FXbool* p,FXuval n){
FXStream::save(p,n);
return *
this; }
86 FXGZFileStream& save(
const FXushort* p,FXuval n){
FXStream::save(p,n);
return *
this; }
87 FXGZFileStream& save(
const FXshort* p,FXuval n){
FXStream::save(p,n);
return *
this; }
88 FXGZFileStream& save(
const FXuint* p,FXuval n){
FXStream::save(p,n);
return *
this; }
89 FXGZFileStream& save(
const FXint* p,FXuval n){
FXStream::save(p,n);
return *
this; }
90 FXGZFileStream& save(
const FXfloat* p,FXuval n){
FXStream::save(p,n);
return *
this; }
91 FXGZFileStream& save(
const FXdouble* p,FXuval n){
FXStream::save(p,n);
return *
this; }
92 FXGZFileStream& save(
const FXlong* p,FXuval n){
FXStream::save(p,n);
return *
this; }
93 FXGZFileStream& save(
const FXulong* p,FXuval n){
FXStream::save(p,n);
return *
this; }
109 FXGZFileStream& load(FXuchar* p,FXuval n){
FXStream::load(p,n);
return *
this; }
110 FXGZFileStream& load(FXchar* p,FXuval n){
FXStream::load(p,n);
return *
this; }
111 FXGZFileStream& load(FXbool* p,FXuval n){
FXStream::load(p,n);
return *
this; }
112 FXGZFileStream& load(FXushort* p,FXuval n){
FXStream::load(p,n);
return *
this; }
113 FXGZFileStream& load(FXshort* p,FXuval n){
FXStream::load(p,n);
return *
this; }
114 FXGZFileStream& load(FXuint* p,FXuval n){
FXStream::load(p,n);
return *
this; }
115 FXGZFileStream& load(FXint* p,FXuval n){
FXStream::load(p,n);
return *
this; }
116 FXGZFileStream& load(FXfloat* p,FXuval n){
FXStream::load(p,n);
return *
this; }
117 FXGZFileStream& load(FXdouble* p,FXuval n){
FXStream::load(p,n);
return *
this; }
118 FXGZFileStream& load(FXlong* p,FXuval n){
FXStream::load(p,n);
return *
this; }
119 FXGZFileStream& load(FXulong* p,FXuval n){
FXStream::load(p,n);
return *
this; }
129 FXGZFileStream& operator>>(TYPE*& obj){
return loadObject(reinterpret_cast<FXObject*&>(obj)); }
133 FXGZFileStream& operator<<(
const TYPE* obj){
return saveObject(static_cast<const FXObject*>(obj)); }
136 virtual ~FXGZFileStream();
FXStream & save(const FXuchar *p, FXuval n)
Save arrays of items to stream.
FXStream & operator>>(FXuchar &v)
Load single items from stream.
FXStream & saveObject(const FXObject *v)
Save object.
Definition: FX4Splitter.h:28
FXStream & operator<<(const FXuchar &v)
Save single items to stream.
FXStream & loadObject(FXObject *&v)
Load object.
FXStream & load(FXuchar *p, FXuval n)
Load arrays of items from stream.
FXlong position() const
Get position.
Definition: FXStream.h:164