SophiaFramework UNIVERSE 5.3 |
#include <SFXBinaryStreamWriter.h.hpp>
class SFXBinaryStreamWriter : public SFXStreamWriter, public SFXBinaryStream;
SFMTYPEDEFCLASS(SFXBinaryStreamWriter)
The SFXBinaryStreamWriter class is used to write the binary sequence (data of the arbitrary type) onto the binary stream of the storage.
In case of the variable buffer stream, the SFXElasticStreamWriter class is internally used. But you don't have to be aware of this class.
Extractor(>> Operator) | |
---|---|
Since the extractor(>> operator) whose right operand is of the SFXBuffer type is defined in the binary stream, the SFXBuffer instance can be specified as the right operand. In the string stream, however, the SFXBuffer instance cannot be specified as the right operand since it is not defined. |
SFXBinaryStreamReader | SFXAnsiStringStreamWriter | SFXWideStringStreamWriter | SFXElasticStreamWriter | Stream | Binary Stream | Storage
Constructor/Destructor |
---|
SFXBinaryStreamWriter( Void ) Constructor of the SFXBinaryStreamWriter class.
|
Public Functions | |
---|---|
SFCError |
WriteAChar(
ACharConstPtr string
, SInt32 length = -1
) Write the AChar string onto this stream.
|
SFCError |
WriteBool(
Bool param
) Write the Bool value onto this stream.
|
SFCError |
WriteFloat32(
Float32 param
) Write the Float32 value onto this stream.
|
SFCError |
WriteFloat64(
Float64 param
) Write the Float64 value onto this stream.
|
SFCError |
WriteSFXAnsiString(
SFXAnsiStringConstRef param
) Write the AChar string onto this stream.
|
SFCError |
WriteSFXWideString(
SFXWideStringConstRef param
) Write the WChar string onto this stream.
|
SFCError |
WriteSInt08(
SInt08 param
) Write the SInt08 value onto this stream.
|
SFCError |
WriteSInt16(
SInt16 param
) Write the SInt16 value onto this stream.
|
SFCError |
WriteSInt32(
SInt32 param
) Write the SInt32 value onto this stream.
|
SFCError |
WriteSInt64(
SInt64 param
) Write the SInt64 value onto this stream.
|
SFCError |
WriteUInt08(
UInt08 param
) Write the UInt08 value onto this stream.
|
SFCError |
WriteUInt16(
UInt16 param
) Write the UInt16 value onto this stream.
|
SFCError |
WriteUInt32(
UInt32 param
) Write the UInt32 value onto this stream.
|
SFCError |
WriteUInt64(
UInt64 param
) Write the UInt64 value onto this stream.
|
SFCError |
WriteWChar(
WCharConstPtr string
, SInt32 length = -1
) Write the WChar string onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, SFXBufferConstRef right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, SFXBinaryStreamWriter::ManipulatorSPP right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, SInt08 right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, UInt08 right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, SInt16 right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, UInt16 right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, SInt32 right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, UInt32 right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, SInt64 right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, UInt64 right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, Float32 right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, Float64 right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, ACharConstPtr right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, WCharConstPtr right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, SFXAnsiStringConstRef right
) Write data onto this stream.
|
SFXBinaryStreamWriterRef |
operator<(
SFXBinaryStreamWriterRef left
, SFXWideStringConstRef right
) Write data onto this stream.
|
Void |
Attach(
SFXOutputStreamPtr stream
)
(inherits from SFXStreamWriter)
Attach the specified stream to this stream.
|
Void |
Cancel( Void )
(inherits from SFXStreamWriter)
Cancel to write onto this stream.
|
SFXOutputStreamPtr |
Detach( Void )
(inherits from SFXStreamWriter)
Detach the stream from this stream.
|
SFCError |
Flush( Void )
(inherits from SFXStreamWriter)
Write data in the stream buffer into the storage.
|
SFCError |
Flush(
CallbackSPP spp
, VoidPtr reference
)
(inherits from SFXStreamWriter)
Write data in the stream buffer into the storage.
|
EndianEnum |
GetEndian( Void )
(inherits from SFXBinaryStream)
Get the endian of this stream.
|
UInt32 |
GetWritableSize( Void )
(inherits from SFXStreamWriter)
Get the size of data that can be written into this stream. [in bytes]
|
Void |
Release( Void )
(inherits from SFXStreamWriter)
Release this stream.
|
SFCError |
ResetTrigger( Void )
(inherits from SFXStreamWriter)
Reset the trigger condition that the callback function will be booted up.
|
Void |
SetEndian(
EndianEnum param
)
(inherits from SFXBinaryStream)
Set the endian of this stream.
|
SFCError |
SetTrigger(
UInt32 size
)
(inherits from SFXStreamWriter)
Set the trigger condition that the callback function will be booted up.
|
SFCError |
SetTrigger(
SFXBufferConstRef buffer
)
(inherits from SFXStreamWriter)
Set the trigger condition that the callback function will be booted up.
|
SFCError |
SetTrigger(
VoidConstPtr buffer
, UInt32 size
)
(inherits from SFXStreamWriter)
Set the trigger condition that the callback function will be booted up.
|
Bool |
Triggers( Void )
(inherits from SFXStreamWriter)
Check whether or not the callback function is booted up by the trigger condition.
|
SFCError |
Write(
SFXBufferConstRef buffer
)
(inherits from SFXStreamWriter)
Write data onto the stream.
|
SFCError |
Write(
VoidConstPtr buffer
, UInt32 size
)
(inherits from SFXStreamWriter)
Write data onto the stream.
|
Void |
big(
SFXBinaryStreamRef stream
)
(inherits from SFXBinaryStream)
Manipulator that sets the endian of this stream to Big-Endian.
|
Void |
little(
SFXBinaryStreamRef stream
)
(inherits from SFXBinaryStream)
Manipulator that sets the endian of this stream to Little-Endian.
|
Types |
---|
CallbackSPP
(inherits from SFXStream)
Type that represents the callback function.
|
EndianEnum
(inherits from SFXBinaryStream)
Constants that represent the endian of this stream.
|
ManipulatorSPP
(inherits from SFXBinaryStream)
Type that represents the manipulator of the SFXBinaryStream class.
|
[ public, explicit ] SFXBinaryStreamWriter(Void);
[ public ] SFCError WriteAChar( ACharConstPtr string // pointer to the string to write SInt32 length = -1 // length of the string );
AChar string for writing.
If the length has been set to -1, Write the string till the "\0" (contains "\0").
This function writes the string of the AChar type and '\0' at the tail onto the buffer of this binary stream.
If "-1" is specified in the length argument, the string until '\0' (1 byte) of the AChar type specified in the string argument, including '\0', will be written.
Note | |
---|---|
The SFXAnsiStringStreamWriter::WriteAChar function of the string stream will not write '\0' (1 byte) of the AChar type at the tail. |
Note | |
---|---|
The SFXBinaryStreamReader::ReadSFXAnsiString function performs the reverse operation. |
SFXBinaryStreamReader::ReadSFXAnsiString | SFXBinaryStreamWriter::WriteWChar | SFXBinaryStreamWriter::WriteSFXAnsiString | SFXBinaryStreamWriter::WriteSFXWideString | SFXAnsiStringStreamWriter::WriteAChar | Character Type
This function writes the Bool value onto the buffer of this binary stream.
Note | |
---|---|
The SFXBinaryStreamReader::ReadBool function performs the reverse operation. |
This function writes the Float32 value onto the buffer of this binary stream.
Note | |
---|---|
The SFXBinaryStreamReader::ReadFloat32 function performs the reverse operation. |
This function writes the Float64 value onto the buffer of this binary stream.
Note | |
---|---|
The SFXBinaryStreamReader::ReadFloat64 function performs the reverse operation. |
[ public ] SFCError WriteSFXAnsiString( SFXAnsiStringConstRef param // string );
This function writes the specified string of the SFXAnsiString type and '\0' (1 byte) of the AChar type at the tail onto the buffer of this binary stream.
Note | |
---|---|
The SFXAnsiStringStreamWriter::WriteSFXAnsiString function of the string stream will not write '\0' (1 byte) of the AChar type at the tail. |
Note | |
---|---|
The SFXBinaryStreamReader::ReadSFXAnsiString function performs the reverse operation. |
SFXBinaryStreamReader::ReadSFXAnsiString | SFXBinaryStreamWriter::WriteAChar | SFXBinaryStreamWriter::WriteWChar | SFXBinaryStreamWriter::WriteSFXWideString | SFXAnsiStringStreamWriter::WriteSFXAnsiString | SFXAnsiString | Character Type
[ public ] SFCError WriteSFXWideString( SFXWideStringConstRef param // string );
This function writes the specified string of the SFXWideString type and '\0' (2 byte) of the WChar type at the tail onto the buffer of this binary stream.
Note | |
---|---|
The SFXWideStringStreamWriter::WriteSFXWideString function of the string stream will not write '\0' (2 byte) of the WChar type at the tail. |
Note | |
---|---|
The SFXBinaryStreamReader::ReadSFXWideString function performs the reverse operation. |
SFXBinaryStreamReader::ReadSFXWideString | SFXBinaryStreamWriter::WriteAChar | SFXBinaryStreamWriter::WriteWChar | SFXBinaryStreamWriter::WriteSFXAnsiString | SFXWideStringStreamWriter::WriteSFXWideString | SFXWideString | Character Type
This function writes the SInt08 value onto the buffer of this binary stream.
Note | |
---|---|
The SFXBinaryStreamReader::ReadSInt08 function performs the reverse operation. |
This function writes the SInt16 value onto the buffer of this binary stream.
Note | |
---|---|
The SFXBinaryStreamReader::ReadSInt16 function performs the reverse operation. |
This function writes the SInt32 value onto the buffer of this binary stream.
Note | |
---|---|
The SFXBinaryStreamReader::ReadSInt32 function performs the reverse operation. |
This function writes the SInt64 value onto the buffer of this binary stream.
Note | |
---|---|
The SFXBinaryStreamReader::ReadSInt64 function performs the reverse operation. |
This function writes the UInt08 value onto the buffer of this binary stream.
Note | |
---|---|
The SFXBinaryStreamReader::ReadUInt08 function performs the reverse operation. |
This function writes the UInt16 value onto the buffer of this binary stream.
Note | |
---|---|
The SFXBinaryStreamReader::ReadUInt16 function performs the reverse operation. |
This function writes the UInt32 value onto the buffer of this binary stream.
Note | |
---|---|
The SFXBinaryStreamReader::ReadUInt32 function performs the reverse operation. |
This function writes the UInt64 value onto the buffer of this binary stream.
Note | |
---|---|
The SFXBinaryStreamReader::ReadUInt64 function performs the reverse operation. |
[ public ] SFCError WriteWChar( WCharConstPtr string // pointer to the string to write SInt32 length = -1 // length of the string );
AChar string for writing.
If the length has been set to -1, Write the string till the "\0" (contains "\0").
This function writes the string of the WChar type and '\0' at the tail onto the buffer of this binary stream.
If "-1" is specified in the length argument, the string until '\0' (2 byte) of the WChar type specified in the string argument, including '\0', will be written.
Note | |
---|---|
The SFXAnsiStringStreamWriter::WriteWChar function of the string stream will not write '\0' (1 byte) of the WChar type at the tail. |
Note | |
---|---|
The SFXBinaryStreamReader::ReadSFXWideString function performs the reverse operation. |
SFXBinaryStreamReader::ReadSFXWideString | SFXBinaryStreamWriter::WriteAChar | SFXBinaryStreamWriter::WriteSFXAnsiString | SFXBinaryStreamWriter::WriteSFXWideString | SFXWideStringStreamWriter::WriteWChar | Character Type
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream SFXBufferConstRef right // value to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream SFXBinaryStreamWriter::ManipulatorSPP right // manipulator );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream SInt08 right // value to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream UInt08 right // value to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream SInt16 right // value to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream UInt16 right // value to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream SInt32 right // value to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream UInt32 right // value to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream SInt64 right // value to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream UInt64 right // value to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream Float32 right // value to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream Float64 right // value to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream ACharConstPtr right // pointer to the string to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream WCharConstPtr right // pointer to the string to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream SFXAnsiStringConstRef right // string to write );
[ public, friend ] SFXBinaryStreamWriterRef operator<( SFXBinaryStreamWriterRef left // stream SFXWideStringConstRef right // string to write );
This operator is the inserter (<< operator) to write data specified in the operand onto the buffer of this stream.
In case one of the following errors occurs, no data will be written into this stream, no error value will be returned, and nothing will happen.
* The corresponding alternate function below will return the error value above.
Alternate Function | |
---|---|
Except that the inserter will not return the error value, it is the same as the SFXBinaryStreamWriter::WriteBool / SFXBinaryStreamWriter::WriteSInt08 / SFXBinaryStreamWriter::WriteSInt16 / SFXBinaryStreamWriter::WriteSInt32 / SFXBinaryStreamWriter::WriteSInt64 / SFXBinaryStreamWriter::WriteUInt08 / SFXBinaryStreamWriter::WriteUInt16 / SFXBinaryStreamWriter::WriteUInt32 / SFXBinaryStreamWriter::WriteUInt64 / SFXBinaryStreamWriter::WriteFloat32 / SFXBinaryStreamWriter::WriteFloat64 / SFXBinaryStreamWriter::WriteAChar / SFXBinaryStreamWriter::WriteWChar / SFXBinaryStreamWriter::WriteSFXAnsiString / SFXBinaryStreamWriter::WriteSFXWideString function. |
In Case of the String | |
---|---|
'\0' will be appended onto the tail of the string. The Write function or the inserter(<< operator) of the string stream will not append '\0' onto the tail of the string. |
SFXBinaryStreamReader::operator> | SFXBinaryStreamWriter::WriteBool | SFXBinaryStreamWriter::WriteSInt08 | SFXBinaryStreamWriter::WriteSInt16 | SFXBinaryStreamWriter::WriteSInt32 | SFXBinaryStreamWriter::WriteSInt64 | SFXBinaryStreamWriter::WriteUInt08 | SFXBinaryStreamWriter::WriteUInt16 | SFXBinaryStreamWriter::WriteUInt32 | SFXBinaryStreamWriter::WriteUInt64 | SFXBinaryStreamWriter::WriteFloat32 | SFXBinaryStreamWriter::WriteFloat64 | SFXBinaryStreamWriter::WriteAChar | SFXBinaryStreamWriter::WriteWChar | SFXBinaryStreamWriter::WriteSFXAnsiString | SFXBinaryStreamWriter::WriteSFXWideString
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |