PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFXBinaryStream
Base class which represents a stream for reading or writing the binary sequence.
#include <SFXBinaryStream.h.hpp>
class SFXBinaryStream;
SFMTYPEDEFCLASS(SFXBinaryStream)

Inheritance diagram

 Inheritance diagram of SFXBinaryStreamClass

Description

SFXBinaryStream is the base class of the binary stream to read from / write onto the binary sequence.

To read from / write onto the binary sequence actually, use the following classes derived from this class separately depending on the read / write type.

Table 191. Derived Classes of SFXBinaryStream [Binary Stream]

Data Type For Reading For Writing
Arbitrary Type SFXBinaryStreamReader SFXBinaryStreamWriter
[Note] Note
Other than string, data of the arbitrary type such as integer, floating point, or boolean can be read from or written into the binary stream.

Reference

SFXBinaryStreamReader | SFXBinaryStreamWriter | Binary Stream

Member

Constructor/Destructor
SFXBinaryStream( Void )
Constructor of the SFXBinaryStream class.
Public Functions
EndianEnum GetEndian( Void )
Get the endian of this stream.
Void SetEndian( EndianEnum param )
Set the endian of this stream.
Void big( SFXBinaryStreamRef stream )
Manipulator that sets the endian of this stream to Big-Endian.
Void little( SFXBinaryStreamRef stream )
Manipulator that sets the endian of this stream to Little-Endian.
Types
EndianEnum
Constants that represent the endian of this stream.
ManipulatorSPP
Type that represents the manipulator of the SFXBinaryStream class.

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

SFXBinaryStream::GetEndian
Get the endian of this stream.
[ public, const ]
EndianEnum GetEndian(Void);

Return value

  • If Little-Endian: SFXBinaryStream::ENDIAN_LITTLE
  • If Big-Endian: SFXBinaryStream::ENDIAN_BIG

Description

This function gets the endian of this stream.

Reference

SFXBinaryStream::EndianEnum | SFXBinaryStream::SetEndian | SFXBinaryStream::big | SFXBinaryStream::little


SFXBinaryStream::SetEndian
Set the endian of this stream.
[ public ]
Void SetEndian(
    EndianEnum param   // endian
);

Description

This function sets the endian of this stream to SFXBinaryStream::ENDIAN_LITTLE for Little-Endian or SFXBinaryStream::ENDIAN_BIG for Big-Endian.

[Tip] Tip
The endian of this stream can be also set by using the SFXBinaryStream::big or SFXBinaryStream::little manipulator.

Reference

SFXBinaryStream::EndianEnum | SFXBinaryStream::GetEndian | SFXBinaryStream::big | SFXBinaryStream::little


SFXBinaryStream::big
Manipulator that sets the endian of this stream to Big-Endian.
[ public, friend ]
Void big(
    SFXBinaryStreamRef stream   // stream
);

Description

This function is the manipulator that sets the endian of this stream to Big-Endian.

[Tip] Tip
The endian of this stream can be set also by using the SFXBinaryStream::SetEndian function.

Reference

SFXBinaryStream::little | SFXBinaryStream::SetEndian | SFXBinaryStream::GetEndian | SFXBinaryStream::ManipulatorSPP


SFXBinaryStream::little
Manipulator that sets the endian of this stream to Little-Endian.
[ public, friend ]
Void little(
    SFXBinaryStreamRef stream   
);

Description

This function is the manipulator that sets the endian of this stream to Little-Endian.

[Tip] Tip
The endian of this stream can be set also by using the SFXBinaryStream::SetEndian function.

Reference

SFXBinaryStream::big | SFXBinaryStream::SetEndian | SFXBinaryStream::GetEndian | SFXBinaryStream::ManipulatorSPP


SFXBinaryStream::EndianEnum
Constants that represent the endian of this stream.
enum EndianEnum {
    ENDIAN_LITTLE = 0,  // Little-Endian
    ENDIAN_BIG          // Big-Endian
};

Description

ENDIAN_LITTLE and ENDIAN_BIG mean Little-Endian and Big-Endian respectively.

Reference

SFXBinaryStream::SetEndian | SFXBinaryStream::GetEndian | SFXBinaryStream::big | SFXBinaryStream::little


SFXBinaryStream::ManipulatorSPP
Type that represents the manipulator of the SFXBinaryStream class.
typedef Void(* SFXBinaryStream::ManipulatorSPP)(SFXBinaryStreamRef stream)

Reference

SFXBinaryStream::big | SFXBinaryStream::little