Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | Protected Member Functions | List of all members
om::io::StringOutputStream Class Referenceabstract

A class that abstracts a destination for a stream of character information. More...

#include <omStringOutputStream.h>

Inheritance diagram for om::io::StringOutputStream:
om::io::FileWriter om::io::Log om::io::PrintStream

Public Member Functions

 StringOutputStream ()
 Create a StringOutputStream with the native output endianness. More...
 
 StringOutputStream (data::Endianness newEndianness)
 Create a StringOutputStream with the specified output endianness. More...
 
virtual ~StringOutputStream ()
 Destroy an output stream and free all of it's resources (close it). More...
 
Bool writeASCII (Char character)
 Write one ASCII character to the output stream. More...
 
Size writeASCII (const Char *characters)
 Write characters from the buffer until a NULl terminator is reached and return the number written. More...
 
Size writeASCII (const Char *characters, Size numCharacters)
 Write the specified number of characters from the buffer and return the number written. More...
 
Size writeASCII (const data::String &string)
 Write the specified string to the output string and return the number of characters written. More...
 
Bool writeUTF8 (UTF8Char character)
 Write one UTF-8 character to the output stream. More...
 
Size writeUTF8 (const UTF8Char *characters)
 Write characters from the buffer until a NULl terminator is reached and return the number written. More...
 
Size writeUTF8 (const UTF8Char *characters, Size numCharacters)
 Write the specified number of characters from the buffer and return the number written. More...
 
Size writeUTF8 (const data::UTF8String &string)
 Write the specified string to the output string and return the number of characters written. More...
 
Bool writeUTF16 (UTF16Char character)
 Write one UTF-16 character to the output stream. More...
 
Size writeUTF16 (const UTF16Char *characters)
 Write characters from the buffer until a NULL terminator is reached and return the number written. More...
 
Size writeUTF16 (const UTF16Char *characters, Size numCharacters)
 Write the specified number of characters from the buffer and return the number written. More...
 
Size writeUTF16 (const data::UTF16String &string)
 Write the specified string to the output string and return the number of characters written. More...
 
Bool writeUTF32 (UTF32Char character)
 Write one UTF-32 character to the output stream. More...
 
Size writeUTF32 (const UTF32Char *characters)
 Write characters from the buffer until a NULl terminator is reached and return the number written. More...
 
Size writeUTF32 (const UTF32Char *characters, Size numCharacters)
 Write the specified number of characters from the buffer and return the number written. More...
 
Size writeUTF32 (const data::UTF32String &string)
 Write the specified string to the output string and return the number of characters written. More...
 
virtual void flush ()=0
 Flush the output stream, sending all internally buffered output to it's destination. More...
 
data::Endianness getEndianness () const
 Get the current endianness of the wide characters being written to the stream. More...
 
void setEndianness (data::Endianness newEndianness)
 Set the stream to write wide characters in the specified endian format. More...
 

Protected Member Functions

virtual Size writeChars (const Char *characters, Size number)=0
 Write the specified number of characters from the character buffer and return the number written. More...
 
virtual Size writeUTF8Chars (const UTF8Char *characters, Size number)=0
 Write the specified number of UTF-8 characters from the character buffer and return the number written. More...
 
virtual Size writeUTF16Chars (const UTF16Char *characters, Size number)=0
 Write the specified number of UTF-16 characters from the character buffer and return the number written. More...
 
virtual Size writeUTF32Chars (const UTF32Char *characters, Size number)=0
 Write the specified number of UTF-32 characters from the character buffer and return the number written. More...
 

Detailed Description

A class that abstracts a destination for a stream of character information.

Constructor & Destructor Documentation

om::io::StringOutputStream::StringOutputStream ( )
inline

Create a StringOutputStream with the native output endianness.

om::io::StringOutputStream::StringOutputStream ( data::Endianness  newEndianness)
inline

Create a StringOutputStream with the specified output endianness.

virtual om::io::StringOutputStream::~StringOutputStream ( )
inlinevirtual

Destroy an output stream and free all of it's resources (close it).

Member Function Documentation

Bool om::io::StringOutputStream::writeASCII ( Char  character)
inline

Write one ASCII character to the output stream.

Size om::io::StringOutputStream::writeASCII ( const Char characters)
inline

Write characters from the buffer until a NULl terminator is reached and return the number written.

Size om::io::StringOutputStream::writeASCII ( const Char characters,
Size  numCharacters 
)
inline

Write the specified number of characters from the buffer and return the number written.

Size om::io::StringOutputStream::writeASCII ( const data::String string)
inline

Write the specified string to the output string and return the number of characters written.

Bool om::io::StringOutputStream::writeUTF8 ( UTF8Char  character)
inline

Write one UTF-8 character to the output stream.

Size om::io::StringOutputStream::writeUTF8 ( const UTF8Char characters)
inline

Write characters from the buffer until a NULl terminator is reached and return the number written.

Size om::io::StringOutputStream::writeUTF8 ( const UTF8Char characters,
Size  numCharacters 
)
inline

Write the specified number of characters from the buffer and return the number written.

Size om::io::StringOutputStream::writeUTF8 ( const data::UTF8String string)
inline

Write the specified string to the output string and return the number of characters written.

Bool om::io::StringOutputStream::writeUTF16 ( UTF16Char  character)
inline

Write one UTF-16 character to the output stream.

Size om::io::StringOutputStream::writeUTF16 ( const UTF16Char characters)
inline

Write characters from the buffer until a NULL terminator is reached and return the number written.

Size om::io::StringOutputStream::writeUTF16 ( const UTF16Char characters,
Size  numCharacters 
)
inline

Write the specified number of characters from the buffer and return the number written.

Size om::io::StringOutputStream::writeUTF16 ( const data::UTF16String string)
inline

Write the specified string to the output string and return the number of characters written.

Bool om::io::StringOutputStream::writeUTF32 ( UTF32Char  character)
inline

Write one UTF-32 character to the output stream.

Size om::io::StringOutputStream::writeUTF32 ( const UTF32Char characters)
inline

Write characters from the buffer until a NULl terminator is reached and return the number written.

Size om::io::StringOutputStream::writeUTF32 ( const UTF32Char characters,
Size  numCharacters 
)
inline

Write the specified number of characters from the buffer and return the number written.

Size om::io::StringOutputStream::writeUTF32 ( const data::UTF32String string)
inline

Write the specified string to the output string and return the number of characters written.

virtual void om::io::StringOutputStream::flush ( )
pure virtual

Flush the output stream, sending all internally buffered output to it's destination.

This method causes all currently pending output data to be sent to it's final destination. This method ensures that this is done and that all internal data buffers are emptied if they have any contents.

Implemented in om::io::Log, om::io::FileWriter, and om::io::PrintStream.

data::Endianness om::io::StringOutputStream::getEndianness ( ) const
inline

Get the current endianness of the wide characters being written to the stream.

void om::io::StringOutputStream::setEndianness ( data::Endianness  newEndianness)
inline

Set the stream to write wide characters in the specified endian format.

virtual Size om::io::StringOutputStream::writeChars ( const Char characters,
Size  number 
)
protectedpure virtual

Write the specified number of characters from the character buffer and return the number written.

Implemented in om::io::FileWriter, and om::io::PrintStream.

virtual Size om::io::StringOutputStream::writeUTF8Chars ( const UTF8Char characters,
Size  number 
)
protectedpure virtual

Write the specified number of UTF-8 characters from the character buffer and return the number written.

Implemented in om::io::FileWriter, and om::io::PrintStream.

virtual Size om::io::StringOutputStream::writeUTF16Chars ( const UTF16Char characters,
Size  number 
)
protectedpure virtual

Write the specified number of UTF-16 characters from the character buffer and return the number written.

Implemented in om::io::FileWriter, and om::io::PrintStream.

virtual Size om::io::StringOutputStream::writeUTF32Chars ( const UTF32Char characters,
Size  number 
)
protectedpure virtual

Write the specified number of UTF-32 characters from the character buffer and return the number written.

Implemented in om::io::FileWriter, and om::io::PrintStream.


The documentation for this class was generated from the following file: