22 #ifndef FXBZFILESTREAM_H 23 #define FXBZFILESTREAM_H 25 #ifndef FXFILESTREAM_H 26 #include "FXFileStream.h" 37 class FXAPI FXBZFileStream :
public FXFileStream {
42 virtual FXuval writeBuffer(FXuval count);
43 virtual FXuval readBuffer(FXuval count);
45 FXBZFileStream(
const FXBZFileStream&);
46 FXBZFileStream& operator=(
const FXBZFileStream&);
50 FXBZFileStream(
const FXObject* cont=
nullptr);
53 FXBZFileStream(
const FXString& filename,FXStreamDirection save_or_load=FXStreamLoad,FXuval size=8192UL);
56 FXbool open(
const FXString& filename,FXStreamDirection save_or_load=FXStreamLoad,FXuval size=8192UL);
59 virtual FXbool flush();
62 virtual FXbool close();
68 virtual FXbool position(FXlong,FXWhence){
return false; }
84 FXBZFileStream& save(
const FXuchar* p,FXuval n){
FXStream::save(p,n);
return *
this; }
85 FXBZFileStream& save(
const FXchar* p,FXuval n){
FXStream::save(p,n);
return *
this; }
86 FXBZFileStream& save(
const FXbool* p,FXuval n){
FXStream::save(p,n);
return *
this; }
87 FXBZFileStream& save(
const FXushort* p,FXuval n){
FXStream::save(p,n);
return *
this; }
88 FXBZFileStream& save(
const FXshort* p,FXuval n){
FXStream::save(p,n);
return *
this; }
89 FXBZFileStream& save(
const FXuint* p,FXuval n){
FXStream::save(p,n);
return *
this; }
90 FXBZFileStream& save(
const FXint* p,FXuval n){
FXStream::save(p,n);
return *
this; }
91 FXBZFileStream& save(
const FXfloat* p,FXuval n){
FXStream::save(p,n);
return *
this; }
92 FXBZFileStream& save(
const FXdouble* p,FXuval n){
FXStream::save(p,n);
return *
this; }
93 FXBZFileStream& save(
const FXlong* p,FXuval n){
FXStream::save(p,n);
return *
this; }
94 FXBZFileStream& save(
const FXulong* p,FXuval n){
FXStream::save(p,n);
return *
this; }
110 FXBZFileStream& load(FXuchar* p,FXuval n){
FXStream::load(p,n);
return *
this; }
111 FXBZFileStream& load(FXchar* p,FXuval n){
FXStream::load(p,n);
return *
this; }
112 FXBZFileStream& load(FXbool* p,FXuval n){
FXStream::load(p,n);
return *
this; }
113 FXBZFileStream& load(FXushort* p,FXuval n){
FXStream::load(p,n);
return *
this; }
114 FXBZFileStream& load(FXshort* p,FXuval n){
FXStream::load(p,n);
return *
this; }
115 FXBZFileStream& load(FXuint* p,FXuval n){
FXStream::load(p,n);
return *
this; }
116 FXBZFileStream& load(FXint* p,FXuval n){
FXStream::load(p,n);
return *
this; }
117 FXBZFileStream& load(FXfloat* p,FXuval n){
FXStream::load(p,n);
return *
this; }
118 FXBZFileStream& load(FXdouble* p,FXuval n){
FXStream::load(p,n);
return *
this; }
119 FXBZFileStream& load(FXlong* p,FXuval n){
FXStream::load(p,n);
return *
this; }
120 FXBZFileStream& load(FXulong* p,FXuval n){
FXStream::load(p,n);
return *
this; }
130 FXBZFileStream& operator>>(TYPE*& obj){ loadObject(reinterpret_cast<FXObject*&>(obj));
return *
this; }
134 FXBZFileStream& operator<<(
const TYPE* obj){ saveObject(static_cast<const FXObject*>(obj));
return *
this; }
137 virtual ~FXBZFileStream();
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