PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFXBinaryStreamReader
Class for a stream to read the binary sequence from.
#include <SFXBinaryStreamReader.h.hpp>
class SFXBinaryStreamReader : public SFXStreamReader, public SFXBinaryStream;
SFMTYPEDEFCLASS(SFXBinaryStreamReader)

Inheritance diagram

 Inheritance diagram of SFXBinaryStreamReaderClass

Collaboration diagram

 Collaboration diagram of SFXBinaryStreamReaderClass

Description

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.

[Caution] 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.

Reference

SFXBinaryStreamWriter | SFXAnsiStringStreamReader | SFXWideStringStreamReader | SFXElasticStreamReader | Stream | | Binary Stream | Storage

Member

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.

SFXBinaryStreamReader::SFXBinaryStreamReader
Constructor of the SFXBinaryStreamReader class.
[ public, explicit ]
SFXBinaryStreamReader(Void);

SFXBinaryStreamReader::ReadBool
Read the Bool value from this stream.
[ public ]
SFCError ReadBool(
    BoolPtr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If the data bigger than the readable size of the buffer of this stream is read: SFERR_FAILED

Description

This function reads data from the buffer of this binary stream and stores it into the specified variable of the Bool type.

[Note] Note
The SFXBinaryStreamWriter::WriteBool function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekBool | SFXBinaryStreamWriter::WriteBool | Bool Type


SFXBinaryStreamReader::ReadFloat32
Read the Float32 value from this stream.
[ public ]
SFCError ReadFloat32(
    Float32Ptr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If the data bigger than the readable size of the buffer of this stream is read: SFERR_FAILED

Description

This function reads data from the buffer of this binary stream and stores it into the specified variable of the Float32 type.

[Note] Note
The SFXBinaryStreamWriter::WriteFloat32 function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekFloat32 | SFXBinaryStreamWriter::WriteFloat32 | Floating Point Type


SFXBinaryStreamReader::ReadFloat64
Read the Float64 value from this stream.
[ public ]
SFCError ReadFloat64(
    Float64Ptr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If the data bigger than the readable size of the buffer of this stream is read: SFERR_FAILED

Description

This function reads data from the buffer of this binary stream and stores it into the specified variable of the Float64 type.

[Note] Note
The SFXBinaryStreamWriter::WriteFloat64 function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekFloat64 | SFXBinaryStreamWriter::WriteFloat64 | Floating Point Type


SFXBinaryStreamReader::ReadSFXAnsiString
Read the AChar string from this stream.
[ public ]
SFCError ReadSFXAnsiString(
    SFXAnsiStringPtr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set or the next '\0' is not found: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY

Description

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] 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] Note
The SFXBinaryStreamWriter::WriteAChar / SFXBinaryStreamWriter::WriteSFXAnsiString function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekSFXAnsiString | SFXBinaryStreamWriter::WriteAChar | SFXBinaryStreamWriter::WriteSFXAnsiString | SFXAnsiStringStreamReader::ReadSFXAnsiString | SFXWideStringStreamReader::ReadSFXAnsiString | SFXAnsiString | Character Type


SFXBinaryStreamReader::ReadSFXWideString
Read the WChar string from this stream.
[ public ]
SFCError ReadSFXWideString(
    SFXWideStringPtr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set or the next '\0' is not found: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY

Description

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] 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] Note
The SFXBinaryStreamWriter::WriteWChar / SFXBinaryStreamWriter::WriteSFXWideString function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekSFXWideString | SFXBinaryStreamWriter::WriteWChar | SFXBinaryStreamWriter::WriteSFXWideString | SFXAnsiStringStreamReader::ReadSFXWideString | SFXWideStringStreamReader::ReadSFXWideString| SFXWideString | Character Type


SFXBinaryStreamReader::ReadSInt08
Read the SInt08 value from this stream.
[ public ]
SFCError ReadSInt08(
    SInt08Ptr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If the data bigger than the readable size of the buffer of this stream is read: SFERR_FAILED

Description

This function reads data from the buffer of this binary stream and stores it into the specified variable of the SInt08 type.

[Note] Note
The SFXBinaryStreamWriter::WriteSInt08 function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekSInt08 | SFXBinaryStreamWriter::WriteSInt08 | Integer Type


SFXBinaryStreamReader::ReadSInt16
Read the SInt16 value from this stream.
[ public ]
SFCError ReadSInt16(
    SInt16Ptr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If the data bigger than the readable size of the buffer of this stream is read: SFERR_FAILED

Description

This function reads data from the buffer of this binary stream and stores it into the specified variable of the SInt16 type.

[Note] Note
The SFXBinaryStreamWriter::WriteSInt16 function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekSInt16 | SFXBinaryStreamWriter::WriteSInt16 | Integer Type


SFXBinaryStreamReader::ReadSInt32
Read the SInt32 value from this stream.
[ public ]
SFCError ReadSInt32(
    SInt32Ptr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If the data bigger than the readable size of the buffer of this stream is read: SFERR_FAILED

Description

This function reads data from the buffer of this binary stream and stores it into the specified variable of the SInt32 type.

[Note] Note
The SFXBinaryStreamWriter::WriteSInt32 function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekSInt32 | SFXBinaryStreamWriter::WriteSInt32 | Integer Type


SFXBinaryStreamReader::ReadSInt64
Read the SInt64 value from this stream.
[ public ]
SFCError ReadSInt64(
    SInt64Ptr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If the data bigger than the readable size of the buffer of this stream is read: SFERR_FAILED

Description

This function reads data from the buffer of this binary stream and stores it into the specified variable of the SInt64 type.

[Note] Note
The SFXBinaryStreamWriter::WriteSInt64 function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekSInt64 | SFXBinaryStreamWriter::WriteSInt64 | Integer Type


SFXBinaryStreamReader::ReadUInt08
Read the UInt08 value from this stream.
[ public ]
SFCError ReadUInt08(
    UInt08Ptr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If the data bigger than the readable size of the buffer of this stream is read: SFERR_FAILED

Description

This function reads data from the buffer of this binary stream and stores it into the specified variable of the UInt08 type.

[Note] Note
The SFXBinaryStreamWriter::WriteUInt08 function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekUInt08 | SFXBinaryStreamWriter::WriteUInt08 | Integer Type


SFXBinaryStreamReader::ReadUInt16
Read the UInt16 value from this stream.
[ public ]
SFCError ReadUInt16(
    UInt16Ptr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If the data bigger than the readable size of the buffer of this stream is read: SFERR_FAILED

Description

This function reads data from the buffer of this binary stream and stores it into the specified variable of the UInt16 type.

[Note] Note
The SFXBinaryStreamWriter::WriteUInt16 function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekUInt16 | SFXBinaryStreamWriter::WriteUInt16 | Integer Type


SFXBinaryStreamReader::ReadUInt32
Read the UInt32 value from this stream.
[ public ]
SFCError ReadUInt32(
    UInt32Ptr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If the data bigger than the readable size of the buffer of this stream is read: SFERR_FAILED

Description

This function reads data from the buffer of this binary stream and stores it into the specified variable of the UInt32 type.

[Note] Note
The SFXBinaryStreamWriter::WriteUInt32 function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekUInt32 | SFXBinaryStreamWriter::WriteUInt32 | Integer Type


SFXBinaryStreamReader::ReadUInt64
Read the UInt64 value from this stream.
[ public ]
SFCError ReadUInt64(
    UInt64Ptr param   // pointer to the variable to be read
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If the data bigger than the readable size of the buffer of this stream is read: SFERR_FAILED

Description

This function reads data from the buffer of this binary stream and stores it into the specified variable of the UInt64 type.

[Note] Note
The SFXBinaryStreamWriter::WriteUInt64 function performs the reverse operation.

Reference

SFXBinaryStreamReader::SeekUInt64 | SFXBinaryStreamWriter::WriteUInt64 | Integer Type


SFXBinaryStreamReader::SeekBool
Move the read pointer forward by the size of the Bool value.
[ public ]
SFCError SeekBool(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the read pointer goes beyond the end of the buffer of this stream: SFERR_FAILED

Description

This function moves forward the read pointer of the buffer of this binary stream by the size of the Bool type.

[Note] Note
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadBool | Bool Type


SFXBinaryStreamReader::SeekFloat32
Move the read pointer forward by the size of the Float32 value.
[ public ]
SFCError SeekFloat32(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the read pointer goes beyond the end of the buffer of this stream: SFERR_FAILED

Description

This function moves forward the read pointer of the buffer of this binary stream by the size of the Float32 type.

[Note] Note
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadFloat32 | Floating Point Type


SFXBinaryStreamReader::SeekFloat64
Move the read pointer forward by the size of the Float64 value.
[ public ]
SFCError SeekFloat64(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the read pointer goes beyond the end of the buffer of this stream: SFERR_FAILED

Description

This function moves forward the read pointer of the buffer of this binary stream by the size of the Float64 type.

[Note] Note
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadFloat64 | Floating Point Type


SFXBinaryStreamReader::SeekSFXAnsiString
Move the read pointer next to the next '\0'.
[ public ]
SFCError SeekSFXAnsiString(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set or the next '\0' is not found: SFERR_INVALID_STATE

Description

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] Note
If no '\0' is found until the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadSFXAnsiString | SFXAnsiString | Character Type


SFXBinaryStreamReader::SeekSFXWideString
Move the read pointer next to the next '\0'.
[ public ]
SFCError SeekSFXWideString(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set or the next '\0' is not found: SFERR_INVALID_STATE

Description

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] Note
If no '\0' is found until the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadSFXWideString | SFXWideString | Character Type


SFXBinaryStreamReader::SeekSInt08
Move the read pointer forward by the size of the SInt08 value.
[ public ]
SFCError SeekSInt08(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the read pointer goes beyond the end of the buffer of this stream: SFERR_FAILED

Description

This function moves forward the read pointer of the buffer of this binary stream by the size of the SInt08 type.

[Note] Note
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadSInt08 | Integer Type


SFXBinaryStreamReader::SeekSInt16
Move the read pointer forward by the size of the SInt16 value.
[ public ]
SFCError SeekSInt16(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the read pointer goes beyond the end of the buffer of this stream: SFERR_FAILED

Description

This function moves forward the read pointer of the buffer of this binary stream by the size of the SInt16 type.

[Note] Note
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadSInt16 | Integer Type


SFXBinaryStreamReader::SeekSInt32
Move the read pointer forward by the size of the SInt32 value.
[ public ]
SFCError SeekSInt32(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the read pointer goes beyond the end of the buffer of this stream: SFERR_FAILED

Description

This function moves forward the read pointer of the buffer of this binary stream by the size of the SInt32 type.

[Note] Note
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadSInt32 | Integer Type


SFXBinaryStreamReader::SeekSInt64
Move the read pointer forward by the size of the SInt64 value.
[ public ]
SFCError SeekSInt64(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the read pointer goes beyond the end of the buffer of this stream: SFERR_FAILED

Description

This function moves forward the read pointer of the buffer of this binary stream by the size of the SInt64 type.

[Note] Note
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadSInt64 | Integer Type


SFXBinaryStreamReader::SeekUInt08
Move the read pointer forward by the size of the UInt08 value.
[ public ]
SFCError SeekUInt08(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the read pointer goes beyond the end of the buffer of this stream: SFERR_FAILED

Description

This function moves forward the read pointer of the buffer of this binary stream by the size of the UInt08 type.

[Note] Note
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadUInt08 | Integer Type


SFXBinaryStreamReader::SeekUInt16
Move the read pointer forward by the size of the UInt16 value.
[ public ]
SFCError SeekUInt16(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the read pointer goes beyond the end of the buffer of this stream: SFERR_FAILED

Description

This function moves forward the read pointer of the buffer of this binary stream by the size of the UInt16 type.

[Note] Note
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadUInt16 | Integer Type


SFXBinaryStreamReader::SeekUInt32
Move the read pointer forward by the size of the UInt32 value.
[ public ]
SFCError SeekUInt32(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the read pointer goes beyond the end of the buffer of this stream: SFERR_FAILED

Description

This function moves forward the read pointer of the buffer of this binary stream by the size of the UInt32 type.

[Note] Note
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadUInt32 | Integer Type


SFXBinaryStreamReader::SeekUInt64
Move the read pointer forward by the size of the UInt64 value.
[ public ]
SFCError SeekUInt64(Void);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If the stream is not set: SFERR_INVALID_STATE
  • If the read pointer goes beyond the end of the buffer of this stream: SFERR_FAILED

Description

This function moves forward the read pointer of the buffer of this binary stream by the size of the UInt64 type.

[Note] Note
If the read pointer goes beyond the end of the stream buffer, SFERR_FAILED will be returned.

Reference

SFXBinaryStreamReader::ReadUInt64 | Integer Type


SFXBinaryStreamReader::operator>
Read data from this stream.
[ 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
);

Description

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.

  • If the stream is not set or no '\0' is found until the end in reading a string: SFERR_INVALID_STATE error
  • If the memory region of the operand contains some of the buffer of this stream: SFERR_INVALID_PARAM error
  • If insufficient memory: SFERR_NO_MEMORY: SFERR_NO_MEMORY error
  • If the data bigger than the readable size of the buffer of this stream is read: SFERR_FAILED error

* The corresponding alternate function below will return the error value above.

[Caution] 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.

[Note] 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] 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.

Reference

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