PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFXWideStringStreamReader
Class for a stream to read the WChar string from.
#include <SFXWideStringStreamReader.h.hpp>
class SFXWideStringStreamReader : public SFXStreamReader, public SFXStringStream;
SFMTYPEDEFCLASS(SFXWideStringStreamReader)

Inheritance diagram

 Inheritance diagram of SFXWideStringStreamReaderClass

Collaboration diagram

 Collaboration diagram of SFXWideStringStreamReaderClass

Description

The SFXWideStringStreamReader class is used to read the string of the WChar type from the string 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] Extractor(>> Operator)

In the string stream, the extractor(>> operator) whose right operand is of the SFXBuffer type is not defined. Therefore, the SFXBuffer instance cannot be specified as the right operand.

However, since it is defined in the binary stream, the SFXBuffer instance can be specified as the right operand.

Reference

SFXWideStringStreamWriter | SFXAnsiStringStreamReader | SFXBinaryStreamReader | SFXElasticStreamReader | SFXWideString | Character Type | String Stream | Storage

Member

Constructor/Destructor
SFXWideStringStreamReader( Void )
Constructor of the SFXWideStringStreamReader class.
Public Functions
SFCError ReadSFXAnsiString( SFXAnsiStringPtr param )
Read the WChar string from this stream.
SFCError ReadSFXWideString( SFXWideStringPtr param )
Read the WChar string from this stream.
SFXWideStringStreamReaderRef operator>>( SFXWideStringStreamReaderRef left , SFXWideStringRef right )
Read the WChar string from this stream.
SFXWideStringStreamReaderRef operator>>( SFXWideStringStreamReaderRef left , SFXAnsiStringRef right )
Read the WChar string 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.
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.
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.
Types
CallbackSPP (inherits from SFXStream)
Type that represents the callback function.

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

SFXWideStringStreamReader::ReadSFXAnsiString
Read the WChar 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: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY

Description

This function reads the string of the WChar type from the buffer of this stream and stores it into the variable of the SFXAnsiString type specified in the argument.

Data until the next '\0' (2 byte) of the WChar type or the tail will be read as a string. At this time, '\0' will not be included in the read SFXAnsiString string.

[Note] Note

In case of the SFXBinaryStreamReader::ReadSFXAnsiString function of the binary stream, SFERR_INVALID_STATE will be returned if '\0' is not found until the tail in reading.

Reference

SFXWideStringStreamWriter::WriteSFXAnsiString | SFXWideStringStreamWriter::WriteAChar | SFXWideStringStreamReader::ReadSFXWideString | SFXWideStringStreamReader::operator>> | SFXBinaryStreamReader::ReadSFXAnsiString | SFXWideString | SFXAnsiString | Character Type


SFXWideStringStreamReader::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: SFERR_INVALID_STATE
  • If the param argument is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY

Description

This function reads the string of the WChar type from the buffer of this stream and stores it into the variable of the SFXWideString type specified in the argument.

Data until the next '\0' (2 byte) of the WChar type or the tail will be read as a string. At this time, '\0' will not be included in the read SFXWideString string.

[Note] Note

In case of the SFXBinaryStreamReader::ReadSFXWideString function of the binary stream, SFERR_INVALID_STATE will be returned if '\0' is not found until the tail in reading.

Reference

SFXWideStringStreamWriter::WriteSFXWideString | SFXWideStringStreamWriter::WriteWChar | SFXWideStringStreamReader::ReadSFXAnsiString | SFXWideStringStreamReader::operator>> | SFXBinaryStreamReader::ReadSFXWideString | SFXWideString | Character Type


SFXWideStringStreamReader::operator>>
Read the WChar string from this stream.
[ public, friend ]
SFXWideStringStreamReaderRef operator>(
    SFXWideStringStreamReaderRef left   // stream
    SFXWideStringRef right              // variable to be read
);
[ public, friend ]
SFXWideStringStreamReaderRef operator>(
    SFXWideStringStreamReaderRef left   // stream
    SFXAnsiStringRef right              // variable to be read
);

Description

This operator is the extractor (>> operator) to read the string of the WChar type from the buffer of this stream.

Data until the next '\0' (2 byte) of the WChar type or the tail will be read as a string and stored into the variable of the string class specified in the operand. If necessary, type conversion will be performed automatically. At this time, '\0' will not be included in the read string.

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: SFERR_INVALID_STATE error
  • If the param argument is null: SFERR_INVALID_PARAM error
  • If insufficient memory: SFERR_NO_MEMORY error

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

[Note] Alternate Function

Except that the extractor will not return the error value, it is the same as the SFXWideStringStreamReader::ReadSFXAnsiString / SFXWideStringStreamReader::ReadSFXWideString function.

Reference

SFXWideStringStreamWriter::operator<< | SFXWideStringStreamReader::ReadSFXAnsiString | SFXWideStringStreamReader::ReadSFXWideString SFXWideString | SFXAnsiString | Character Type