ZStrimW Class Reference
[StrimsUnicode]

Inheritance diagram for ZStrimW:

ZStrimW_NativeUTF16 ZStrimW_NativeUTF32 ZStrimW_NativeUTF8 ZStrimW_Null ZStrimW_StreamUTF16BE ZStrimW_StreamUTF16LE ZStrimW_CRLFInsert ZStrimW_CRLFRemove ZStrimW_Escapify ZStrimW_Limited ZStrimW_StreamEncoder ZStrimW_StreamUTF32BE ZStrimW_StreamUTF32LE ZStrimW_Tee ZStrimW_ML ZStrimW_StreamUTF8 ZStrimW_String List of all members.

Single code point

void WriteCP (UTF32 iCP) const

Zero-terminated strings

void Write (const UTF32 *iString) const
void Write (const UTF16 *iString) const
void Write (const UTF8 *iString) const

Standard library strings

void Write (const string32 &iString) const
void Write (const string16 &iString) const
void Write (const string8 &iString) const

String buffers

void Write (const UTF32 *iSource, size_t iCountCU) const
void Write (const UTF16 *iSource, size_t iCountCU) const
void Write (const UTF8 *iSource, size_t iCountCU) const

String buffers, report CUs written

void Write (const UTF32 *iSource, size_t iCountCU, size_t *oCountCU) const
void Write (const UTF16 *iSource, size_t iCountCU, size_t *oCountCU) const
void Write (const UTF8 *iSource, size_t iCountCU, size_t *oCountCU) const

String buffers, limiting and reporting both CU and CP

void Write (const UTF32 *iSource, size_t iCountCU, size_t *oCountCU, size_t iCountCP, size_t *oCountCP) const
void Write (const UTF16 *iSource, size_t iCountCU, size_t *oCountCU, size_t iCountCP, size_t *oCountCP) const
void Write (const UTF8 *iSource, size_t iCountCU, size_t *oCountCU, size_t iCountCP, size_t *oCountCP) const

Formatted strings

size_t Writef (const UTF8 *iString,...) const

Copy from

Read code points from iStrimR and write it to this strim.

void CopyAllFrom (const ZStrimR &iStrimR) const
void CopyAllFrom (const ZStrimR &iStrimR, size_t *oCountCPRead, size_t *oCountCPWritten) const
void CopyFrom (const ZStrimR &iStrimR, size_t iCountCP) const
void CopyFrom (const ZStrimR &iStrimR, size_t iCountCP, size_t *oCountCPRead, size_t *oCountCPWritten) const

Flushing potentially buffered data

void Flush () const
 If this strim buffers data then pass it on to its ultimate destination.

Essential overrides

These methods must be overridden by subclasses.

virtual void Imp_WriteUTF32 (const UTF32 *iSource, size_t iCountCU, size_t *oCountCU)=0
virtual void Imp_WriteUTF16 (const UTF16 *iSource, size_t iCountCU, size_t *oCountCU)=0
virtual void Imp_WriteUTF8 (const UTF8 *iSource, size_t iCountCU, size_t *oCountCU)=0

Optional overrides

virtual void Imp_CopyFromDispatch (const ZStrimR &iStrimR, size_t iCountCP, size_t *oCountCPRead, size_t *oCountCPWritten)
 Invoke iStrimR's Imp_CopyTo method.
virtual void Imp_CopyFrom (const ZStrimR &iStrimR, size_t iCountCP, size_t *oCountCPRead, size_t *oCountCPWritten)
 Actually copy data to this strim from iStrimR.
virtual void Imp_Flush ()
 If this strim buffers data then pass it on to its ultimate destination.

Canonical Methods

The canonical methods are protected, thus you cannot create, destroy or assign through a ZStrimW reference, you must work with some derived class.

 ZStrimW ()
 ~ZStrimW ()
 ZStrimW (const ZStrimW &)
ZStrimWoperator= (const ZStrimW &)

Detailed Description

See also:
Strims

Unicode


Member Function Documentation

void ZStrimW::WriteCP ( UTF32  iCP  )  const

Write the single code point iCP. May throw an end of write strim exception.

void ZStrimW::Write ( const UTF32 *  iString  )  const

Write the zero terminated UTF-32 string starting at iString. May throw an end of write strim exception.

void ZStrimW::Write ( const UTF16 *  iString  )  const

Write the zero terminated UTF-16 string starting at iString. May throw an end of write strim exception.

void ZStrimW::Write ( const UTF8 *  iString  )  const

Write the zero terminated UTF-8 string starting at iString. May throw an end of write strim exception.

void ZStrimW::Write ( const string32 &  iString  )  const

Write the UTF-32 string in iString. May throw an end of write strim exception.

void ZStrimW::Write ( const string16 &  iString  )  const

Write the UTF-16 string in iString. May throw an end of write strim exception.

void ZStrimW::Write ( const string8 &  iString  )  const

Write the UTF-8 string in iString. May throw an end of write strim exception.

void ZStrimW::Write ( const UTF32 *  iSource,
size_t  iCountCU 
) const

Write the UTF-32 string starting at iSource and continuing to iSource + iCountCU. May throw an end of write strim exception.

void ZStrimW::Write ( const UTF16 *  iSource,
size_t  iCountCU 
) const

Write the UTF-16 string starting at iSource and continuing to iSource + iCountCU. May throw an end of write strim exception.

void ZStrimW::Write ( const UTF8 *  iSource,
size_t  iCountCU 
) const

Write the UTF-8 string starting at iSource and continuing to iSource + iCountCU. May throw an end of write strim exception.

void ZStrimW::Write ( const UTF32 *  iSource,
size_t  iCountCU,
size_t *  oCountCU 
) const

Write the UTF-32 string starting at iSource and continuing to iSource + iCountCU. Report the number of code units succesfully written in the optional output parameter oCountCU.

void ZStrimW::Write ( const UTF16 *  iSource,
size_t  iCountCU,
size_t *  oCountCU 
) const

Write the UTF-16 string starting at iSource and continuing to iSource + iCountCU. Report the number of code units succesfully written in the optional output parameter oCountCU.

void ZStrimW::Write ( const UTF8 *  iSource,
size_t  iCountCU,
size_t *  oCountCU 
) const

Write the UTF-8 string starting at iSource and continuing to iSource + iCountCU. Report the number of code units succesfully written in the optional output parameter oCountCU.

void ZStrimW::Write ( const UTF32 *  iSource,
size_t  iCountCU,
size_t *  oCountCU,
size_t  iCountCP,
size_t *  oCountCP 
) const

Write the UTF-32 string starting at iSource and continuing to iSource + iCountCU. Do not write more code units than those required to represent iCountCP code points. Report the number of code units and code points succesfully written in the optional output parameters oCountCU and oCountCP.

void ZStrimW::Write ( const UTF16 *  iSource,
size_t  iCountCU,
size_t *  oCountCU,
size_t  iCountCP,
size_t *  oCountCP 
) const

Write the UTF-16 string starting at iSource and continuing to iSource + iCountCU. Do not write more code units than those required to represent iCountCP code points. Report the number of code units and code points succesfully written in the optional output parameters oCountCU and oCountCP.

void ZStrimW::Write ( const UTF8 *  iSource,
size_t  iCountCU,
size_t *  oCountCU,
size_t  iCountCP,
size_t *  oCountCP 
) const

Write the UTF-8 string starting at iSource and continuing to iSource + iCountCU. Do not write more code units than those required to represent iCountCP code points. Report the number of code units and code points succesfully written in the optional output parameters oCountCU and oCountCP.

size_t ZStrimW::Writef ( const UTF8 *  iString,
  ... 
) const

Write the zero-terminated UTF-8 string starting at iString. Standard printf-style parameter substitution is applied to the string before writing. The number of UTF-8 code units successfully written is returned.

void ZStrimW::Flush (  )  const

If this strim buffers data then pass it on to its ultimate destination.

Some write strims buffer the data written to them, or are built atop a foundation that may buffer data. Such strims should override Imp_Flush and push that buffered data on to its ultimate destination. When the method returns the data may still not have reached its ultimate destination, but is guaranteed to do at some point in the future with no further action necessary on the caller's part.

void ZStrimW::Imp_CopyFromDispatch ( const ZStrimR iStrimR,
size_t  iCountCP,
size_t *  oCountCPRead,
size_t *  oCountCPWritten 
) [virtual]

Invoke iStrimR's Imp_CopyTo method.

The first part of the two-stage dispatch initiated by CopyFrom and CopyAllFrom. Override if your strim's data is in memory and thus iStrimR can have its Read method called with your strim's data as its destination.

Reimplemented in ZStrimW_Null.

void ZStrimW::Imp_CopyFrom ( const ZStrimR iStrimR,
size_t  iCountCP,
size_t *  oCountCPRead,
size_t *  oCountCPWritten 
) [virtual]

Actually copy data to this strim from iStrimR.

The second part of the two-stage dispatch initiated by CopyFrom and CopyAllFrom. The default implementation calls sCopyReadToWrite. Override this method if your strim's data is in memory and thus can be modified by calling iStrimR's Read method.

See also:
sCopyReadToWrite

Reimplemented in ZStrimW_Null.

void ZStrimW::Imp_Flush (  )  [virtual]

If this strim buffers data then pass it on to its ultimate destination.

Some write strims buffer the data written to them, or are built atop a foundation that may buffer data. Such strims should override Flush and push that buffered data on to its ultimate destination. When the method returns the data may still not have reached its ultimate destination, but is guaranteed to do at some point in the future with no further action necessary on the caller's part.

Reimplemented in ZStrimW_Limited, ZStrimW_StreamUTF32BE, ZStrimW_StreamUTF32LE, ZStrimW_StreamUTF16BE, ZStrimW_StreamUTF16LE, ZStrimW_StreamUTF8, ZStrimW_StreamEncoder, ZStrimW_Tee, and ZStrimW_ML.


The documentation for this class was generated from the following files:
Generated on Thu Jul 26 11:22:07 2007 for ZooLib by  doxygen 1.4.7