PrevNextUpHome BREW C++ Class Library & GUI Framework & XML Middleware : SophiaFramework 4.1
SFXBinaryStreamReader
Class for reading data of binary from the input stream.
#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 data of binary from the input stream such as file, TCP socket, and so on.

Reference

SFXAnsiStringStreamReader | SFXWideStringStreamReader

Member

Constructor/Destructor
SFXBinaryStreamReader( Void )
Constructor of SFXBinaryStreamReader class.
Public Functions
SFCError ReadBool( BoolPtr param )
Read data from the input stream as Bool value.
SFCError ReadFloat32( Float32Ptr param )
Read data from the input stream as Float32 value.
SFCError ReadFloat64( Float64Ptr param )
Read data from the input stream as Float64 value.
SFCError ReadSFXAnsiString( SFXAnsiStringPtr param )
Read data from the input stream as a SFXAnsiString string.
SFCError ReadSFXWideString( SFXWideStringPtr param )
Read data from the input stream as a SFXWideString string.
SFCError ReadSInt08( SInt08Ptr param )
Read data from the input stream as SInt08 value.
SFCError ReadSInt16( SInt16Ptr param )
Read data from the input stream as SInt16 value.
SFCError ReadSInt32( SInt32Ptr param )
Read data from the input stream as SInt32 value.
SFCError ReadSInt64( SInt64Ptr param )
Read data from the input stream as SInt64 value.
SFCError ReadUInt08( UInt08Ptr param )
Read data from the input stream as UInt08 value.
SFCError ReadUInt16( UInt16Ptr param )
Read data from the input stream as UInt16 value.
SFCError ReadUInt32( UInt32Ptr param )
Read data from the input stream as UInt32 value.
SFCError ReadUInt64( UInt64Ptr param )
Read data from the input stream as UInt64 value.
SFCError SeekBool( Void )
Move the pointer forward for sizeof( Bool ).
SFCError SeekFloat32( Void )
Move the pointer forward for sizeof( Float32 ).
SFCError SeekFloat64( Void )
Move the pointer forward for sizeof( Float64 ).
SFCError SeekSFXAnsiString( Void )
Move the pointer forward for SFXAnsiString.
SFCError SeekSFXWideString( Void )
Move the pointer forward for SFXWideString.
SFCError SeekSInt08( Void )
Move the pointer forward for sizeof( SInt08 ).
SFCError SeekSInt16( Void )
Move the pointer forward for sizeof( SInt16 ).
SFCError SeekSInt32( Void )
Move the pointer forward for sizeof( SInt32 ).
SFCError SeekSInt64( Void )
Move the pointer forward for sizeof( SInt64 ).
SFCError SeekUInt08( Void )
Move the pointer forward for sizeof( UInt08 ).
SFCError SeekUInt16( Void )
Move the pointer forward for sizeof( UInt16 ).
SFCError SeekUInt32( Void )
Move the pointer forward for sizeof( UInt32 ).
SFCError SeekUInt64( Void )
Move the pointer forward for sizeof( UInt64 ).
SFXBinaryStreamReaderRef operator>( SFXBinaryStreamReaderRef left , SFXBufferRef right )
operator>( SFXBinaryStreamReaderRef left , SFXWideStringRef right )
operator>( SFXBinaryStreamReaderRef left , SFXAnsiStringRef right )
operator>( SFXBinaryStreamReaderRef left , Float64Ref right )
operator>( SFXBinaryStreamReaderRef left , Float32Ref right )
operator>( SFXBinaryStreamReaderRef left , UInt64Ref right )
operator>( SFXBinaryStreamReaderRef left , SInt64Ref right )
operator>( SFXBinaryStreamReaderRef left , UInt32Ref right )
operator>( SFXBinaryStreamReaderRef left , SInt32Ref right )
operator>( SFXBinaryStreamReaderRef left , UInt16Ref right )
operator>( SFXBinaryStreamReaderRef left , SInt16Ref right )
operator>( SFXBinaryStreamReaderRef left , UInt08Ref right )
operator>( SFXBinaryStreamReaderRef left , SInt08Ref right )
operator>( SFXBinaryStreamReaderRef left , SFXBinaryStreamReader::ManipulatorSPP right )
Read data from the input stream.
Void Attach( SFXInputStreamPtr stream ) (inherits from SFXStreamReader)
Delegate the control privilege of SFXInputStream object to the SFXStreamReader object.
Void Cancel( Void ) (inherits from SFXStreamReader)
Call the Cancel function for Storage class. And also unregister the callback functions.
SFXInputStreamPtr Detach( Void ) (inherits from SFXStreamReader)
Delegate the control privilege of SFXStreamReader object to the SFXInputStream object.
Bool Ends( Void ) (inherits from SFXStreamReader)
Check whether the stream ends or not.
SFCError Fetch( Void ) (inherits from SFXStreamReader)
Fetch( CallbackSPP spp , VoidPtr reference ) (inherits from SFXStreamReader)
Fetch for reading data newly.
SInt32 FirstIndexOf( Byte byte , SInt32 index = SINT32_MINIMUM ) (inherits from SFXStreamReader)
FirstIndexOf( VoidConstPtr buffer , UInt32 size , SInt32 index = SINT32_MINIMUM ) (inherits from SFXStreamReader)
FirstIndexOf( SFXBufferConstRef buffer , SInt32 index = SINT32_MINIMUM ) (inherits from SFXStreamReader)
Get the first index of SFXStreamReader object to match with the specified data, searching from the beginning.
EndianEnum GetEndian( Void ) (inherits from SFXBinaryStream)
Get the endian.
UInt32 GetReadableSize( Void ) (inherits from SFXStreamReader)
Get the size of readable data.
SInt32 LastIndexOf( Byte byte , SInt32 index = SINT32_MAXIMUM ) (inherits from SFXStreamReader)
LastIndexOf( VoidConstPtr buffer , UInt32 size , SInt32 index = SINT32_MAXIMUM ) (inherits from SFXStreamReader)
LastIndexOf( SFXBufferConstRef buffer , SInt32 index = SINT32_MAXIMUM ) (inherits from SFXStreamReader)
Get the last index of SFXStreamReader object to match with the specified data, searching from the end.
SFCError Read( SFXBufferPtr buffer ) (inherits from SFXStreamReader)
Read( VoidPtr buffer , UInt32 size ) (inherits from SFXStreamReader)
Read data from the stream.
Void Release( Void ) (inherits from SFXStreamReader)
Release the stream.
SFCError ResetTrigger( Void ) (inherits from SFXStreamReader)
Reset the trigger when the callback function will be called.
SFCError Seek( UInt32 size ) (inherits from SFXStreamReader)
Move the read pointer foraward.
Void SetEndian( EndianEnum param ) (inherits from SFXBinaryStream)
Set the endian.
SFCError SetTrigger( UInt32 size ) (inherits from SFXStreamReader)
SetTrigger( VoidConstPtr buffer , UInt32 size ) (inherits from SFXStreamReader)
SetTrigger( SFXBufferConstRef buffer ) (inherits from SFXStreamReader)
Set the trigger when the callback function will be called.
Bool Triggers( Void ) (inherits from SFXStreamReader)
Check whether the callback function is called by trigger or not.
Void big( SFXBinaryStreamRef stream ) (inherits from SFXBinaryStream)
Manipulator that sets endian to the big endian.
Void little( SFXBinaryStreamRef stream ) (inherits from SFXBinaryStream)
Manipulator that sets endian to the little endian.
Types
CallbackSPP (inherits from SFXStream)
Constant that represents Callback function.
EndianEnum (inherits from SFXBinaryStream)
Constant that represents Endian.
ManipulatorSPP (inherits from SFXBinaryStream)
Constant that represents the manipulator of SFXBinaryStream class.

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

SFXBinaryStreamReader::ReadBool
Read data from the input stream as Bool value.
[ public ]
SFCError ReadBool(
    BoolPtr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If insufficient memory : SFERR_NO_MEMORY
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::ReadSInt08 | SFXBinaryStreamReader::ReadUInt08


SFXBinaryStreamReader::ReadFloat32
Read data from the input stream as Float32 value.
[ public ]
SFCError ReadFloat32(
    Float32Ptr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::ReadFloat64


SFXBinaryStreamReader::ReadFloat64
Read data from the input stream as Float64 value.
[ public ]
SFCError ReadFloat64(
    Float64Ptr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::ReadFloat32


SFXBinaryStreamReader::ReadSFXAnsiString
Read data from the input stream as a SFXAnsiString string.
[ public ]
SFCError ReadSFXAnsiString(
    SFXAnsiStringPtr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set, or "\0" is found : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If insufficient memory : SFERR_NO_MEMORY
  • If failed : SFERR_FAILED

Description

Read a AChar string until the next "\0"

If no "\0" is found until the end, return SFERR_INVALID_STATE.

Reference

SFXBinaryStreamReader::ReadSFXWideString


SFXBinaryStreamReader::ReadSFXWideString
Read data from the input stream as a SFXWideString string.
[ public ]
SFCError ReadSFXWideString(
    SFXWideStringPtr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set, or "\0" is found : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If insufficient memory : SFERR_NO_MEMORY
  • If failed : SFERR_FAILED

Description

Read a WChar string until the next "\0"

If no "\0" is found until the end, return SFERR_INVALID_STATE.

Reference

SFXBinaryStreamReader::ReadSFXAnsiString


SFXBinaryStreamReader::ReadSInt08
Read data from the input stream as SInt08 value.
[ public ]
SFCError ReadSInt08(
    SInt08Ptr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::ReadUInt08


SFXBinaryStreamReader::ReadSInt16
Read data from the input stream as SInt16 value.
[ public ]
SFCError ReadSInt16(
    SInt16Ptr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::ReadUInt16


SFXBinaryStreamReader::ReadSInt32
Read data from the input stream as SInt32 value.
[ public ]
SFCError ReadSInt32(
    SInt32Ptr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::ReadUInt32


SFXBinaryStreamReader::ReadSInt64
Read data from the input stream as SInt64 value.
[ public ]
SFCError ReadSInt64(
    SInt64Ptr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::ReadUInt64


SFXBinaryStreamReader::ReadUInt08
Read data from the input stream as UInt08 value.
[ public ]
SFCError ReadUInt08(
    UInt08Ptr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::ReadSInt08


SFXBinaryStreamReader::ReadUInt16
Read data from the input stream as UInt16 value.
[ public ]
SFCError ReadUInt16(
    UInt16Ptr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::ReadSInt16


SFXBinaryStreamReader::ReadUInt32
Read data from the input stream as UInt32 value.
[ public ]
SFCError ReadUInt32(
    UInt32Ptr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::ReadSInt32


SFXBinaryStreamReader::ReadUInt64
Read data from the input stream as UInt64 value.
[ public ]
SFCError ReadUInt64(
    UInt64Ptr param   // pointer to the result
);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If argument is null : SFERR_INVALID_PARAM
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::ReadSInt64


SFXBinaryStreamReader::SeekBool
Move the pointer forward for sizeof( Bool ).
[ public ]
SFCError SeekBool(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::SeekSInt08 | SFXBinaryStreamReader::SeekUInt08


SFXBinaryStreamReader::SeekFloat32
Move the pointer forward for sizeof( Float32 ).
[ public ]
SFCError SeekFloat32(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::SeekFloat64


SFXBinaryStreamReader::SeekFloat64
Move the pointer forward for sizeof( Float64 ).
[ public ]
SFCError SeekFloat64(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::SeekFloat32


SFXBinaryStreamReader::SeekSFXAnsiString
Move the pointer forward for SFXAnsiString.
[ public ]
SFCError SeekSFXAnsiString(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Description

Move the reading pointer to the next string ( next to the next "\0" ).

Reference

SFXBinaryStreamReader::SeekSFXWideString


SFXBinaryStreamReader::SeekSFXWideString
Move the pointer forward for SFXWideString.
[ public ]
SFCError SeekSFXWideString(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Description

Move the reading pointer to the next string ( next to the next "\0" ).

Reference

SFXBinaryStreamReader::SeekSFXAnsiString


SFXBinaryStreamReader::SeekSInt08
Move the pointer forward for sizeof( SInt08 ).
[ public ]
SFCError SeekSInt08(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::SeekUInt08


SFXBinaryStreamReader::SeekSInt16
Move the pointer forward for sizeof( SInt16 ).
[ public ]
SFCError SeekSInt16(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::SeekUInt16


SFXBinaryStreamReader::SeekSInt32
Move the pointer forward for sizeof( SInt32 ).
[ public ]
SFCError SeekSInt32(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::SeekUInt32


SFXBinaryStreamReader::SeekSInt64
Move the pointer forward for sizeof( SInt64 ).
[ public ]
SFCError SeekSInt64(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::SeekUInt64


SFXBinaryStreamReader::SeekUInt08
Move the pointer forward for sizeof( UInt08 ).
[ public ]
SFCError SeekUInt08(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::SeekUInt08


SFXBinaryStreamReader::SeekUInt16
Move the pointer forward for sizeof( UInt16 ).
[ public ]
SFCError SeekUInt16(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::SeekUInt16


SFXBinaryStreamReader::SeekUInt32
Move the pointer forward for sizeof( UInt32 ).
[ public ]
SFCError SeekUInt32(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::SeekUInt32


SFXBinaryStreamReader::SeekUInt64
Move the pointer forward for sizeof( UInt64 ).
[ public ]
SFCError SeekUInt64(Void);

Return value

  • Success : SFERR_NO_ERROR
  • If stream is not set : SFERR_INVALID_STATE
  • If failed : SFERR_FAILED

Reference

SFXBinaryStreamReader::SeekUInt64


SFXBinaryStreamReader::operator>
Read data from the input stream.
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    SFXBufferRef right              // buffer for the result
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left                 // stream
    SFXBinaryStreamReader::ManipulatorSPP right   // manipulator
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    SInt08Ref right                 // variable for the result
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    UInt08Ref right                 // variable for the result
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    SInt16Ref right                 // variable for the result
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    UInt16Ref right                 // variable for the result
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    SInt32Ref right                 // variable for the result
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    UInt32Ref right                 // variable for the result
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    SInt64Ref right                 // variable for the result
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    UInt64Ref right                 // variable for the result
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    Float32Ref right                // variable for the result
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    Float64Ref right                // variable for the result
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    SFXAnsiStringRef right          // string class for the result
);
[ public, friend ]
SFXBinaryStreamReaderRef operator>(
    SFXBinaryStreamReaderRef left   // stream
    SFXWideStringRef right          // string class for the result
);

Description

For details : API Reference of Read functions.

Reference

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