PrevNextUpHome BREW C++ Class Library & GUI Framework & XML Middleware : SophiaFramework 4.1
SFXAnsiStringStreamWriter
Class for writing the data of SFXAnsiString string onto the output stream.
#include <SFXAnsiStringStreamWriter.h.hpp>
class SFXAnsiStringStreamWriter : public SFXStreamWriter, public SFXStringStream;
SFMTYPEDEFCLASS(SFXAnsiStringStreamWriter)

Inheritance diagram

 Inheritance diagram of SFXAnsiStringStreamWriterClass

Collaboration diagram

 Collaboration diagram of SFXAnsiStringStreamWriterClass

Description

The SFXAnsiStringStreamWriter class is used to write the SFXAnsiString object onto the output stream such as file, TCP socket, and so on.

Reference

SFXWideStringStreamWriter | SFXBinaryStreamWriter

Member

Constructor/Destructor
SFXAnsiStringStreamWriter( Void )
Constructor of SFXAnsiStringStreamWriter class.
Public Functions
SFCError WriteAChar( ACharConstPtr string , SInt32 length = -1 )
Write the Achar string of specified length to the output string as a SFXAnsiString string.
SFCError WriteSFXAnsiString( SFXAnsiStringConstRef param )
Write a SFXAnsiString string onto the output stream.
SFCError WriteSFXWideString( SFXWideStringConstRef param )
Write the SFXWideString string onto the output stream as a SFXAnsiString string
SFCError WriteWChar( WCharConstPtr string , SInt32 length = -1 )
Write the WChar string of specified length onto the output stream as a SFXAnsiString string
SFCError Writenull( Void )
Write a "\0" onto the output stream.
Void ends( SFXAnsiStringStreamWriterRef stream )
Manipulator for writing "\0".
SFXAnsiStringStreamWriterRef operator<<( SFXAnsiStringStreamWriterRef left , SFXAnsiStringStreamWriter::ManipulatorSPP right )
operator<<( SFXAnsiStringStreamWriterRef left , SFXWideStringConstRef right )
operator<<( SFXAnsiStringStreamWriterRef left , SFXAnsiStringConstRef right )
operator<<( SFXAnsiStringStreamWriterRef left , WCharConstPtr right )
operator<<( SFXAnsiStringStreamWriterRef left , ACharConstPtr right )
Write data onto the output stream as a SFXAnsiString string
Void Attach( SFXOutputStreamPtr stream ) (inherits from SFXStreamWriter)
Delegate the control privilege of SFXOutputStream object to the SFXStreamWriter object.
Void Cancel( Void ) (inherits from SFXStreamWriter)
Call the Cancel function for Storage class. And also unregister the callback functions.
SFXOutputStreamPtr Detach( Void ) (inherits from SFXStreamWriter)
Delegate the control privilege of SFXStreamWriter object to the SFXOutputStream object.
SFCError Flush( Void ) (inherits from SFXStreamWriter)
Flush( CallbackSPP spp , VoidPtr reference ) (inherits from SFXStreamWriter)
Flush the written data.
UInt32 GetWritableSize( Void ) (inherits from SFXStreamWriter)
Get the size of writable data.
Void Release( Void ) (inherits from SFXStreamWriter)
Release the stream.
SFCError ResetTrigger( Void ) (inherits from SFXStreamWriter)
Reset the trigger when the callback function will be called.
SFCError SetTrigger( UInt32 size ) (inherits from SFXStreamWriter)
SetTrigger( VoidConstPtr buffer , UInt32 size ) (inherits from SFXStreamWriter)
SetTrigger( SFXBufferConstRef buffer ) (inherits from SFXStreamWriter)
Set the trigger when the callback function will be called.
Bool Triggers( Void ) (inherits from SFXStreamWriter)
Check whether the callback function is called by trigger or not.
SFCError Write( SFXBufferConstRef buffer ) (inherits from SFXStreamWriter)
Write( VoidConstPtr buffer , UInt32 size ) (inherits from SFXStreamWriter)
Write data onto the stream.
Types
ManipulatorSPP
Constant that represents the manpulator of SFXAnsiStringStreamWriter class.
CallbackSPP (inherits from SFXStream)
Constant that represents Callback function.

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

SFXAnsiStringStreamWriter::WriteAChar
Write the Achar string of specified length to the output string as a SFXAnsiString string.
[ public ]
SFCError WriteAChar(
    ACharConstPtr string   // string of AChar type
    SInt32 length = -1     // length of string
);

Argument

string

String of AChar type.

length

string length. If specified with "-1", the length is until the "\0"( "\0" is not included ).

Return value

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

Description

Write a AChar string of the speficied length, but "\0" will not be appended automatically.

Reference

SFXAnsiStringStreamWriter::WriteSFXAnsiString | SFXAnsiStringStreamWriter::WriteWChar | SFXAnsiStringStreamWriter::WriteSFXWideString


SFXAnsiStringStreamWriter::Writenull
Write a "\0" onto the output stream.
[ public ]
SFCError Writenull(Void);

Return value

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

Reference

SFXAnsiStringStreamWriter::ends


SFXAnsiStringStreamWriter::WriteSFXAnsiString
Write a SFXAnsiString string onto the output stream.
[ public ]
SFCError WriteSFXAnsiString(
    SFXAnsiStringConstRef param   // string to write
);

Return value

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

Description

"\0" will not be appended automatically.

Reference

SFXAnsiStringStreamWriter::WriteAChar | SFXAnsiStringStreamWriter::WriteWChar | SFXAnsiStringStreamWriter::WriteSFXWideString


SFXAnsiStringStreamWriter::WriteSFXWideString
Write the SFXWideString string onto the output stream as a SFXAnsiString string
[ public ]
SFCError WriteSFXWideString(
    SFXWideStringConstRef param   // string to write
);

Return value

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

Description

"\0" will not be appended automatically.

Reference

SFXAnsiStringStreamWriter::WriteAChar | SFXAnsiStringStreamWriter::WriteSFXAnsiString | SFXAnsiStringStreamWriter::WriteWChar


SFXAnsiStringStreamWriter::WriteWChar
Write the WChar string of specified length onto the output stream as a SFXAnsiString string
[ public ]
SFCError WriteWChar(
    WCharConstPtr string   // string of WChar type
    SInt32 length = -1     // length of string
);

Argument

string

String of WChar type.

length

string length. If specified with "-1", the length is until the "\0"( "\0" is not included ).

Return value

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

Description

If write a AChar string of speficied length, "\0" will not be appended automatically.

Reference

SFXAnsiStringStreamWriter::WriteSFXWideString | SFXAnsiStringStreamWriter::WriteAChar | SFXAnsiStringStreamWriter::WriteSFXAnsiString


SFXAnsiStringStreamWriter::ends
Manipulator for writing "\0".
[ public, friend ]
Void ends(
    SFXAnsiStringStreamWriterRef stream   // stream
);

Description

SFXAnsiStringStreamWriter::ends is the same as SFXAnsiStringStreamWriter::Writenull function.

Reference

SFXAnsiStringStreamWriter::Writenull


SFXAnsiStringStreamWriter::operator<<
Write data onto the output stream as a SFXAnsiString string
[ public, friend ]
SFXAnsiStringStreamWriterRef operator<<(
    SFXAnsiStringStreamWriterRef left                 // stream
    SFXAnsiStringStreamWriter::ManipulatorSPP right   // manipulator
);
[ public, friend ]
SFXAnsiStringStreamWriterRef operator<<(
    SFXAnsiStringStreamWriterRef left   // stream
    ACharConstPtr right                 // string of AChar type
);
[ public, friend ]
SFXAnsiStringStreamWriterRef operator<<(
    SFXAnsiStringStreamWriterRef left   // stream
    WCharConstPtr right                 // string of WChar type
);
[ public, friend ]
SFXAnsiStringStreamWriterRef operator<<(
    SFXAnsiStringStreamWriterRef left   // stream
    SFXAnsiStringConstRef right         // string
);
[ public, friend ]
SFXAnsiStringStreamWriterRef operator<<(
    SFXAnsiStringStreamWriterRef left   // stream
    SFXWideStringConstRef right         // string
);

Description

SFXAnsiStringStreamWriter::operator<< is the same as SFXAnsiStringStreamWriter::WriteSFXAnsiString function or SFXAnsiStringStreamWriter::WriteSFXWideString function.

Reference

SFXAnsiStringStreamWriter::WriteAChar | SFXAnsiStringStreamWriter::WriteSFXAnsiString | SFXAnsiStringStreamWriter::WriteWChar | SFXAnsiStringStreamWriter::WriteSFXWideString


SFXAnsiStringStreamWriter::ManipulatorSPP
Constant that represents the manpulator of SFXAnsiStringStreamWriter class.
typedef Void(* SFXAnsiStringStreamWriter::ManipulatorSPP)(SFXAnsiStringStreamWriterRef stream)