PrevNextUpHome BREW C++ Class Library & GUI Framework & XML Middleware : SophiaFramework 4.1
SFXStorage
Base class that represents the storage.
#include <SFXStorage.h.hpp>
class SFXStorage;
SFMTYPEDEFCLASS(SFXStorage)

Inheritance diagram

 Inheritance diagram of SFXStorageClass

Description

The SFXStorage class is the base class for the Storage classes that reads data from or writes data to the storage such as memory, file, network, etc. And the input and output streams are available for the Storage classes.

There are 6 classes that inherits from the SFXStorage class: SFXFile, SFXTCPSocket, SFXSSLSocket, SFXMemory, SFXSource, and SFXZIPDecoder.

Reference

SFXFile | SFXTCPSocket | SFXSSLSocket | SFXMemory | SFXSource | SFXZIPDecoder

member

Constructor/Destructor
SFXStorage( Void )
Constructor of SFXStorage class.
~SFXStorage( Void )
Destructor of SFXStorage class.
Public Functions
Void Cancel( Void )
Cancel reading data from or writing data to the storage.
SFCError GetStreamReader( UInt32 size , SFXStreamReaderPtr result )
GetStreamReader( SFXStreamReaderPtr result )
Get the input stream for reading data from the storage.
SFCError GetStreamWriter( UInt32 size , SFXStreamWriterPtr result )
GetStreamWriter( SFXStreamWriterPtr result )
Get the output stream for writing data to the storage.
SFCError Read( VoidPtr buffer , UInt32Ptr size )
Read data from the storage without using the input stream.
SFCError ScheduleRead( CallbackSPP spp , VoidPtr reference )
Schedule to read data from the storage without using the input stream.
SFCError ScheduleWrite( CallbackSPP spp , VoidPtr reference )
Schedule to write data to the storage without using the output stream.
SFCError Write( VoidConstPtr buffer , UInt32Ptr size )
Write data to the storage without using the output stream.
Types
CallbackSPP
The prototype of the callback function for the SFXStorage class.

SFXStorage::SFXStorage
Constructor of SFXStorage class.
[ protected, explicit ]
SFXStorage(Void);

SFXStorage::~SFXStorage
Destructor of SFXStorage class.
[ public, virtual ]
virtual ~SFXStorage(Void);

SFXStorage::Cancel
Cancel reading data from or writing data to the storage.
[ public, virtual ]
Void Cancel(Void);

Description

The SFXStorage::Cancel function is a pure virtual function.


SFXStorage::GetStreamReader
Get the input stream for reading data from the storage.
[ public, virtual ]
SFCError GetStreamReader(
    UInt32 size                 // buffer size
    SFXStreamReaderPtr result   // pointer to the input stream for reading data from the storage
);
[ public, virtual ]
SFCError GetStreamReader(
    SFXStreamReaderPtr result   //pointer to the input stream for reading data from the storage
);

Description

The SFXStorage::GetStreamReader function is a pure virtual function.


SFXStorage::GetStreamWriter
Get the output stream for writing data to the storage.
[ public, virtual ]
SFCError GetStreamWriter(
    UInt32 size                 // size
    SFXStreamWriterPtr result   // pointer to the output stream for writing data to the storage
);
[ public, virtual ]
SFCError GetStreamWriter(
    SFXStreamWriterPtr result   // pointer to the output stream for writing data to the storage
);

Description

The SFXStorage::GetStreamWriter function is a pure virtual function.


SFXStorage::Read
Read data from the storage without using the input stream.
[ public, virtual ]
SFCError Read(
    VoidPtr buffer   // buffer to read data from the storage
    UInt32Ptr size   // buffer size
);

Argument

buffer

Specify the buffer to read data from the storage.

size

Specify the size of buffer when calling this function. When the this function ends, the size of data that is actually read is stored.

Description

The SFXStorage::Read function is a pure virtual function.


SFXStorage::ScheduleRead
Schedule to read data from the storage without using the input stream.
[ public, virtual ]
SFCError ScheduleRead(
    CallbackSPP spp     // callback function
    VoidPtr reference   // data passed to the callback function
);

Description

The SFXStorage::ScheduleRead function is a pure virtual function.


SFXStorage::ScheduleWrite
Schedule to write data to the storage without using the output stream.
[ public, virtual ]
SFCError ScheduleWrite(
    CallbackSPP spp     // callback function
    VoidPtr reference   // pointer to the callback function
);

Description

The SFXStorage::ScheduleWrite function is a pure virtual function.


SFXStorage::Write
Write data to the storage without using the output stream.
[ public, virtual ]
SFCError Write(
    VoidConstPtr buffer   // buffer to write data to the storage
    UInt32Ptr size        // size of data to write to the storage
);

Argument

buffer

Specify the buffer to write data to the storage.

size

Specify the size of data to write to the storage when calling this function. When this function ends, the size of data that is actually written is stored.

Description

The SFXStorage::Write function is a pure virtual function.


SFXStorage::CallbackSPP
The prototype of the callback function for the SFXStorage class.
typedef Void(* SFXStorage::CallbackSPP)(SFCError error, VoidPtr reference)