SophiaFramework UNIVERSE 5.3 |
#include <SFXBinaryStreamReader.h.hpp>
class SFXBinaryStreamReader : public SFXStreamReader, public SFXBinaryStream;
SFMTYPEDEFCLASS(SFXBinaryStreamReader)
The SFXBinaryStreamReader class is used to read the binary sequence (data of the arbitrary type) from the binary stream of the storage.
In case of the variable buffer stream, the SFXElasticStreamReader class is internally used. But you don't have to be aware of this class.
Inserter(<< Operator) | |
---|---|
Since the inserter(<< 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. |
SFXBinaryStreamWriter | SFXAnsiStringStreamReader | SFXWideStringStreamReader | SFXElasticStreamReader | Stream | | Binary Stream | Storage
Constructor/Destructor |
---|
SFXBinaryStreamReader( Void ) Constructor of the SFXBinaryStreamReader class.
|
Public Functions | |
---|---|
SFCError |
ReadBool(
BoolPtr param
) Read the Bool value from this stream.
|
SFCError |
ReadFloat32(
Float32Ptr param
) Read the Float32 value from this stream.
|
SFCError |
ReadFloat64(
Float64Ptr param
) Read the Float64 value from this stream.
|
SFCError |
ReadSFXAnsiString(
SFXAnsiStringPtr param
) Read the AChar string from this stream.
|
SFCError |
ReadSFXWideString(
SFXWideStringPtr param
) Read the WChar string from this stream.
|
SFCError |
ReadSInt08(
SInt08Ptr param
) Read the SInt08 value from this stream.
|
SFCError |
ReadSInt16(
SInt16Ptr param
) Read the SInt16 value from this stream.
|
SFCError |
ReadSInt32(
SInt32Ptr param
) Read the SInt32 value from this stream.
|
SFCError |
ReadSInt64(
SInt64Ptr param
) Read the SInt64 value from this stream.
|
SFCError |
ReadUInt08(
UInt08Ptr param
) Read the UInt08 value from this stream.
|
SFCError |
ReadUInt16(
UInt16Ptr param
) Read the UInt16 value from this stream.
|
SFCError |
ReadUInt32(
UInt32Ptr param
) Read the UInt32 value from this stream.
|
SFCError |
ReadUInt64(
UInt64Ptr param
) Read the UInt64 value from this stream.
|
SFCError |
SeekBool( Void ) Move the read pointer forward by the size of the Bool value.
|
SFCError |
SeekFloat32( Void ) Move the read pointer forward by the size of the Float32 value.
|
SFCError |
SeekFloat64( Void ) Move the read pointer forward by the size of the Float64 value.
|
SFCError |
SeekSFXAnsiString( Void ) Move the read pointer next to the next '\0'.
|
SFCError |
SeekSFXWideString( Void ) Move the read pointer next to the next '\0'.
|
SFCError |
SeekSInt08( Void ) Move the read pointer forward by the size of the SInt08 value.
|
SFCError |
SeekSInt16( Void ) Move the read pointer forward by the size of the SInt16 value.
|
SFCError |
SeekSInt32( Void ) Move the read pointer forward by the size of the SInt32 value.
|
SFCError |
SeekSInt64( Void ) Move the read pointer forward by the size of the SInt64 value.
|
SFCError |
SeekUInt08( Void ) Move the read pointer forward by the size of the UInt08 value.
|
SFCError |
SeekUInt16( Void ) Move the read pointer forward by the size of the UInt16 value.
|
SFCError |
SeekUInt32( Void ) Move the read pointer forward by the size of the UInt32 value.
|
SFCError |
SeekUInt64( Void ) Move the read pointer forward by the size of the UInt64 value.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, SFXBufferRef right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, SFXBinaryStreamReader::ManipulatorSPP right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, SInt08Ref right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, UInt08Ref right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, SInt16Ref right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, UInt16Ref right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, SInt32Ref right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, UInt32Ref right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, SInt64Ref right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, UInt64Ref right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, Float32Ref right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, Float64Ref right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, SFXAnsiStringRef right
) Read data from this stream.
|
SFXBinaryStreamReaderRef |
operator>(
SFXBinaryStreamReaderRef left
, SFXWideStringRef right
) Read data from this stream.
|
Void |
Attach(
SFXInputStreamPtr stream
)
(inherits from SFXStreamReader)
Attach the specified stream to this stream.
|
Void |
Cancel( Void )
(inherits from SFXStreamReader)
Cancel to read from this stream.
|
SFXInputStreamPtr |
Detach( Void )
(inherits from SFXStreamReader)
Detach the stream from this stream.
|
Bool |
Ends( Void )
(inherits from SFXStreamReader)
Check whether or not the read pointer reaches the end of this stream.
|
SFCError |
Fetch( Void )
(inherits from SFXStreamReader)
Read data from the storage into this stream.
|
SFCError |
Fetch(
CallbackSPP spp
, VoidPtr reference
)
(inherits from SFXStreamReader)
Read data from the storage into this stream.
|
SInt32 |
FirstIndexOf(
Byte byte
, SInt32 index = SINT32_MINIMUM
)
(inherits from SFXStreamReader)
Get the first index to match the specified data, searching from the head of the stream buffer.
|
SInt32 |
FirstIndexOf(
SFXBufferConstRef buffer
, SInt32 index = SINT32_MINIMUM
)
(inherits from SFXStreamReader)
Get the first index to match the specified data, searching from the head of the stream buffer.
|
SInt32 |
FirstIndexOf(
VoidConstPtr buffer
, UInt32 size
, SInt32 index = SINT32_MINIMUM
)
(inherits from SFXStreamReader)
Get the first index to match the specified data, searching from the head of the stream buffer.
|
EndianEnum |
GetEndian( Void )
(inherits from SFXBinaryStream)
Get the endian of this stream.
|
UInt32 |
GetReadableSize( Void )
(inherits from SFXStreamReader)
Get the size of data that can be read from this stream. [in bytes]
|
SInt32 |
LastIndexOf(
Byte byte
, SInt32 index = SINT32_MAXIMUM
)
(inherits from SFXStreamReader)
Get the last index to match the specified data, searching from the tail of the stream buffer.
|
SInt32 |
LastIndexOf(
SFXBufferConstRef buffer
, SInt32 index = SINT32_MAXIMUM
)
(inherits from SFXStreamReader)
Get the last index to match the specified data, searching from the tail of the stream buffer.
|
SInt32 |
LastIndexOf(
VoidConstPtr buffer
, UInt32 size
, SInt32 index = SINT32_MAXIMUM
)
(inherits from SFXStreamReader)
Get the last index to match the specified data, searching from the tail of the stream buffer.
|
SFCError |
Read(
SFXBufferPtr buffer
)
(inherits from SFXStreamReader)
Read data from the stream.
|
SFCError |
Read(
VoidPtr buffer
, UInt32 size
)
(inherits from SFXStreamReader)
Read data from the stream.
|
Void |
Release( Void )
(inherits from SFXStreamReader)
Release this stream.
|
SFCError |
ResetTrigger( Void )
(inherits from SFXStreamReader)
Reset the trigger condition that the callback function will be booted up.
|
SFCError |
Seek(
UInt32 size
)
(inherits from SFXStreamReader)
Move the read pointer forward.
|
Void |
SetEndian(
EndianEnum param
)
(inherits from SFXBinaryStream)
Set the endian of this stream.
|
SFCError |
SetTrigger(
UInt32 size
)
(inherits from SFXStreamReader)
Set the trigger condition that the callback function will be booted up.
|
SFCError |
SetTrigger(
SFXBufferConstRef buffer
)
(inherits from SFXStreamReader)
Set the trigger condition that the callback function will be booted up.
|
SFCError |
SetTrigger(
VoidConstPtr buffer
, UInt32 size
)
(inherits from SFXStreamReader)
Set the trigger condition that the callback function will be booted up.
|
Bool |
Triggers( Void )
(inherits from SFXStreamReader)
Check whether or not the callback function is booted up by the trigger condition.
|
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 ] SFXBinaryStreamReader(Void);
This function reads data from the buffer of this binary stream and stores it into the specified variable of the Bool type.
Note | |
---|---|
The SFXBinaryStreamWriter::WriteBool function performs the reverse operation. |
[ public ] SFCError ReadFloat32( Float32Ptr param // pointer to the variable to be read );
This function reads data from the buffer of this binary stream and stores it into the specified variable of the Float32 type.
Note | |
---|---|
The SFXBinaryStreamWriter::WriteFloat32 function performs the reverse operation. |
SFXBinaryStreamReader::SeekFloat32 | SFXBinaryStreamWriter::WriteFloat32 | Floating Point Type
[ public ] SFCError ReadFloat64( Float64Ptr param // pointer to the variable to be read );
This function reads data from the buffer of this binary stream and stores it into the specified variable of the Float64 type.
Note | |
---|---|
The SFXBinaryStreamWriter::WriteFloat64 function performs the reverse operation. |
SFXBinaryStreamReader::SeekFloat64 | SFXBinaryStreamWriter::WriteFloat64 | Floating Point Type
[ public ] SFCError ReadSFXAnsiString( SFXAnsiStringPtr param // pointer to the variable to be read );
This function reads data from the buffer of this binary stream and stores it into the specified variable of the SFXAnsiString type.
Data until the next until '\0' (1 byte) of the AChar type will be read as one string. At this time, '\0' will not be included in the read string.
If no '\0' is found until the end, SFERR_INVALID_STATE will be returned.
Note | |
---|---|
The SFXAnsiStringStreamReader::ReadSFXAnsiString / SFXWideStringStreamReader::ReadSFXAnsiString function of the string stream will read data until the end as one string if no '\0' is found without returning SFERR_INVALID_STATE. |
Note | |
---|---|
The SFXBinaryStreamWriter::WriteAChar / SFXBinaryStreamWriter::WriteSFXAnsiString function performs the reverse operation. |
SFXBinaryStreamReader::SeekSFXAnsiString | SFXBinaryStreamWriter::WriteAChar | SFXBinaryStreamWriter::WriteSFXAnsiString | SFXAnsiStringStreamReader::ReadSFXAnsiString | SFXWideStringStreamReader::ReadSFXAnsiString | SFXAnsiString | Character Type
[ public ] SFCError ReadSFXWideString( SFXWideStringPtr param // pointer to the variable to be read );
This function reads data from the buffer of this binary stream and stores it into the specified variable of the SFXWideString type.
Data until the next until '\0' (2 byte) of the WChar type will be read as one string. At this time, '\0' will not be included in the read string.
If no '\0' is found until the end, SFERR_INVALID_STATE will be returned.
Note | |
---|---|
The SFXAnsiStringStreamReader::ReadSFXWideString / SFXWideStringStreamReader::ReadSFXWideString function of the string stream will read data until the end as one string if no '\0' is found without returning SFERR_INVALID_STATE. |
Note | |
---|---|
The SFXBinaryStreamWriter::WriteWChar / SFXBinaryStreamWriter::WriteSFXWideString function performs the reverse operation. |
SFXBinaryStreamReader::SeekSFXWideString | SFXBinaryStreamWriter::WriteWChar | SFXBinaryStreamWriter::WriteSFXWideString | SFXAnsiStringStreamReader::ReadSFXWideString | SFXWideStringStreamReader::ReadSFXWideString| SFXWideString | Character Type
This function reads data from the buffer of this binary stream and stores it into the specified variable of the SInt08 type.
Note | |
---|---|
The SFXBinaryStreamWriter::WriteSInt08 function performs the reverse operation. |
This function reads data from the buffer of this binary stream and stores it into the specified variable of the SInt16 type.
Note | |
---|---|
The SFXBinaryStreamWriter::WriteSInt16 function performs the reverse operation. |
This function reads data from the buffer of this binary stream and stores it into the specified variable of the SInt32 type.
Note | |
---|---|
The SFXBinaryStreamWriter::WriteSInt32 function performs the reverse operation. |
This function reads data from the buffer of this binary stream and stores it into the specified variable of the SInt64 type.
Note | |
---|---|
The SFXBinaryStreamWriter::WriteSInt64 function performs the reverse operation. |
This function reads data from the buffer of this binary stream and stores it into the specified variable of the UInt08 type.
Note | |
---|---|
The SFXBinaryStreamWriter::WriteUInt08 function performs the reverse operation. |
This function reads data from the buffer of this binary stream and stores it into the specified variable of the UInt16 type.
Note | |
---|---|
The SFXBinaryStreamWriter::WriteUInt16 function performs the reverse operation. |
This function reads data from the buffer of this binary stream and stores it into the specified variable of the UInt32 type.
Note | |
---|---|
The SFXBinaryStreamWriter::WriteUInt32 function performs the reverse operation. |
This function reads data from the buffer of this binary stream and stores it into the specified variable of the UInt64 type.
Note | |
---|---|
The SFXBinaryStreamWriter::WriteUInt64 function performs the reverse operation. |
[ public ] SFCError SeekBool(Void);
This function moves forward the read pointer of the buffer of this binary stream by the size of the Bool type.
Note | |
---|---|
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned. |
[ public ] SFCError SeekFloat32(Void);
This function moves forward the read pointer of the buffer of this binary stream by the size of the Float32 type.
Note | |
---|---|
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned. |
[ public ] SFCError SeekFloat64(Void);
This function moves forward the read pointer of the buffer of this binary stream by the size of the Float64 type.
Note | |
---|---|
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned. |
[ public ] SFCError SeekSFXAnsiString(Void);
This function moves forward the read pointer of the buffer of this binary stream next to the next '\0' (1 byte) of the AChar type.
Note | |
---|---|
If no '\0' is found until the end of the stream buffer, SFERR_FAILED will be returned. |
[ public ] SFCError SeekSFXWideString(Void);
This function moves forward the read pointer of the buffer of this binary stream next to the next '\0' (2 byte) of the WChar type.
Note | |
---|---|
If no '\0' is found until the end of the stream buffer, SFERR_FAILED will be returned. |
[ public ] SFCError SeekSInt08(Void);
This function moves forward the read pointer of the buffer of this binary stream by the size of the SInt08 type.
Note | |
---|---|
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned. |
[ public ] SFCError SeekSInt16(Void);
This function moves forward the read pointer of the buffer of this binary stream by the size of the SInt16 type.
Note | |
---|---|
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned. |
[ public ] SFCError SeekSInt32(Void);
This function moves forward the read pointer of the buffer of this binary stream by the size of the SInt32 type.
Note | |
---|---|
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned. |
[ public ] SFCError SeekSInt64(Void);
This function moves forward the read pointer of the buffer of this binary stream by the size of the SInt64 type.
Note | |
---|---|
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned. |
[ public ] SFCError SeekUInt08(Void);
This function moves forward the read pointer of the buffer of this binary stream by the size of the UInt08 type.
Note | |
---|---|
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned. |
[ public ] SFCError SeekUInt16(Void);
This function moves forward the read pointer of the buffer of this binary stream by the size of the UInt16 type.
Note | |
---|---|
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned. |
[ public ] SFCError SeekUInt32(Void);
This function moves forward the read pointer of the buffer of this binary stream by the size of the UInt32 type.
Note | |
---|---|
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned. |
[ public ] SFCError SeekUInt64(Void);
This function moves forward the read pointer of the buffer of this binary stream by the size of the UInt64 type.
Note | |
---|---|
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned. |
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream SFXBufferRef right // variable to be read );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream SFXBinaryStreamReader::ManipulatorSPP right // manipulator );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream SInt08Ref right // variable to be read );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream UInt08Ref right // variable to be read );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream SInt16Ref right // variable to be read );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream UInt16Ref right // variable to be read );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream SInt32Ref right // variable to be read );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream UInt32Ref right // variable to be read );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream SInt64Ref right // variable to be read );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream UInt64Ref right // variable to be read );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream Float32Ref right // variable to be read );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream Float64Ref right // variable to be read );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream SFXAnsiStringRef right // variable to be read );
[ public, friend ] SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left // stream SFXWideStringRef right // variable to be read );
This operator is the extractor (>> operator) to read the binary sequence of the arbitrary type from the buffer of this stream.
In case one of the following errors occurs, no data will be read from 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 extractor will not return the error value, it is the same as the SFXBinaryStreamReader::ReadBool / SFXBinaryStreamReader::ReadSInt08 / SFXBinaryStreamReader::ReadSInt16 / SFXBinaryStreamReader::ReadSInt32 / SFXBinaryStreamReader::ReadSInt64 / SFXBinaryStreamReader::ReadUInt08 / SFXBinaryStreamReader::ReadUInt16 / SFXBinaryStreamReader::ReadUInt32 / SFXBinaryStreamReader::ReadUInt64 / SFXBinaryStreamReader::ReadFloat32 / SFXBinaryStreamReader::ReadFloat64 / SFXBinaryStreamReader::ReadSFXAnsiString / SFXBinaryStreamReader::ReadSFXWideString function. |
Caution | |
---|---|
Memory region of the operand of this extractor needs to be allocated before this operator is performed. In case of the SFXBuffer type, you have to set the size with the SFXBuffer::SetSize function in advance. |
In Case of the String | |
---|---|
The string of the AChar / WChar type until '\0' will be read and stored into the variable of the string class specified in the operand. Type conversion will be performed, if necessary. If no '\0' is found until the end, an error will occur. At this time, the content of the right variable will remain the same as before execution. |
Note | |
---|---|
In case of the extractor (>> operator) of the string stream, even if no '\0' is found until the end, an error will not occur and the data until the end will be read as one string. |
SFXBinaryStreamWriter::operator< | SFXBinaryStreamReader::ReadBool | SFXBinaryStreamReader::ReadSInt08 | SFXBinaryStreamReader::ReadSInt16 | SFXBinaryStreamReader::ReadSInt32 | SFXBinaryStreamReader::ReadSInt64 | SFXBinaryStreamReader::ReadUInt08 | SFXBinaryStreamReader::ReadUInt16 | SFXBinaryStreamReader::ReadUInt32 | SFXBinaryStreamReader::ReadUInt64 | SFXBinaryStreamReader::ReadFloat32 | SFXBinaryStreamReader::ReadFloat64 | SFXBinaryStreamReader::ReadSFXAnsiString | SFXBinaryStreamReader::ReadSFXWideString
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |