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

A class that allows the user to print messages to an abstract string output stream. More...

#include <omLog.h>

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

Public Member Functions

 Log ()
 Create a Log which prints its output to standard output. More...
 
 Log (StringOutputStream *newStream)
 Create a Log which sends its output to the specified StringOutputStream. More...
 
StringOutputStreamgetStream () const
 Return a pointer to the StringOutputStream which this log is outputing to. More...
 
void setStream (StringOutputStream *newStream)
 Set the StringOutputStream which this log should output to. More...
 
Logoperator< (Char character)
 
Logoperator< (const Char *characters)
 
Logoperator< (const data::String &string)
 
Logoperator< (const data::UTF8String &string)
 
Logoperator< (const data::UTF16String &string)
 
Logoperator< (const data::UTF32String &string)
 
Logoperator< (Bool value)
 Write the specified boolean value to this output log. More...
 
Logoperator< (Short value)
 Write the specified short integer value to this output log. More...
 
Logoperator< (UShort value)
 Write the specified unsigned short integer value to this output log. More...
 
Logoperator< (Int value)
 Write the specified integer value to this output log. More...
 
Logoperator< (UInt value)
 Write the specified unsigned integer value to this output log. More...
 
Logoperator< (Long value)
 Write the specified long integer value to this output log. More...
 
Logoperator< (ULong value)
 Write the specified unsigned long integer value to this output log. More...
 
Logoperator< (LongLong value)
 Write the specified long long integer value to this output log. More...
 
Logoperator< (ULongLong value)
 Write the specified unsigned long long integer value to this output log. More...
 
Logoperator< (Float value)
 Write the specified floating point value to this output log. More...
 
Logoperator< (Double value)
 Write the specified double floating point value to this output log. More...
 
Logoperator< (const void *pointer)
 Write the specified pointer to this output log. More...
 
Logoperator< (void *pointer)
 Write the specified pointer to this output log. More...
 
template<typename T >
Logoperator< (T *pointer)
 Write the specified pointer to this output log. More...
 
template<typename T >
Logoperator< (const T *pointer)
 Write the specified pointer to this output log. More...
 
template<typename T >
Logoperator< (const typename lang::Shared< T > &pointer)
 Write the specified pointer to this output log. More...
 
template<typename T >
Logoperator< (const typename util::Array< T > &array)
 Write the specified array to this output log. More...
 
template<typename T , Size size>
Logoperator< (const typename util::StaticArray< T, size > &array)
 Write the specified static array to this output log. More...
 
template<typename T >
Logoperator< (const T &object)
 Convert the specified templated object to a string and write it to the output log. More...
 
template<typename T >
Logoperator<< (const T &object)
 Write a new line character and then log the specified object, using one of the standard '<' operators. More...
 
virtual void flush ()
 Flush the output stream, sending all internally buffered output to it's destination. More...
 
- Public Member Functions inherited from om::io::StringOutputStream
 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...
 
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...
 

Additional Inherited Members

Detailed Description

A class that allows the user to print messages to an abstract string output stream.

Constructor & Destructor Documentation

om::io::Log::Log ( )

Create a Log which prints its output to standard output.

om::io::Log::Log ( StringOutputStream newStream)

Create a Log which sends its output to the specified StringOutputStream.

If the stream is NULL, the log outputs to the standard output.

Member Function Documentation

StringOutputStream* om::io::Log::getStream ( ) const
inline

Return a pointer to the StringOutputStream which this log is outputing to.

If the stream is NULL, the log outputs to the standard output.

void om::io::Log::setStream ( StringOutputStream newStream)
inline

Set the StringOutputStream which this log should output to.

If the stream is NULL, the log outputs to the standard output.

Log& om::io::Log::operator< ( Char  character)
inline
Log& om::io::Log::operator< ( const Char characters)
inline
Log& om::io::Log::operator< ( const data::String string)
inline
Log& om::io::Log::operator< ( const data::UTF8String string)
inline
Log& om::io::Log::operator< ( const data::UTF16String string)
inline
Log& om::io::Log::operator< ( const data::UTF32String string)
inline
Log& om::io::Log::operator< ( Bool  value)
inline

Write the specified boolean value to this output log.

Log& om::io::Log::operator< ( Short  value)
inline

Write the specified short integer value to this output log.

Log& om::io::Log::operator< ( UShort  value)
inline

Write the specified unsigned short integer value to this output log.

Log& om::io::Log::operator< ( Int  value)
inline

Write the specified integer value to this output log.

Log& om::io::Log::operator< ( UInt  value)
inline

Write the specified unsigned integer value to this output log.

Log& om::io::Log::operator< ( Long  value)
inline

Write the specified long integer value to this output log.

Log& om::io::Log::operator< ( ULong  value)
inline

Write the specified unsigned long integer value to this output log.

Log& om::io::Log::operator< ( LongLong  value)
inline

Write the specified long long integer value to this output log.

Log& om::io::Log::operator< ( ULongLong  value)
inline

Write the specified unsigned long long integer value to this output log.

Log& om::io::Log::operator< ( Float  value)
inline

Write the specified floating point value to this output log.

Log& om::io::Log::operator< ( Double  value)
inline

Write the specified double floating point value to this output log.

Log& om::io::Log::operator< ( const void *  pointer)

Write the specified pointer to this output log.

The basic implementation for this method writes either 'NULL' if the pointer is NULL, or converts the pointer to a hexadecimal integer representation and writes that.

Log& om::io::Log::operator< ( void *  pointer)
inline

Write the specified pointer to this output log.

The basic implementation for this method writes either 'NULL' if the pointer is NULL, or converts the pointer to a hexadecimal integer representation and writes that.

template<typename T >
Log& om::io::Log::operator< ( T *  pointer)
inline

Write the specified pointer to this output log.

The basic implementation for this method writes either 'NULL' if the pointer is NULL, or converts the pointer to a hexadecimal integer representation and writes that.

template<typename T >
Log& om::io::Log::operator< ( const T *  pointer)
inline

Write the specified pointer to this output log.

The basic implementation for this method writes either 'NULL' if the pointer is NULL, or converts the pointer to a hexadecimal integer representation and writes that.

template<typename T >
Log& om::io::Log::operator< ( const typename lang::Shared< T > &  pointer)
inline

Write the specified pointer to this output log.

The basic implementation for this method writes either 'NULL' if the pointer is NULL, or converts the pointer to a hexadecimal integer representation and writes that.

template<typename T >
Log& om::io::Log::operator< ( const typename util::Array< T > &  array)
inline

Write the specified array to this output log.

The basic implementation for this method writes either '[NULL]' if the array is NULL, or writes an array representation of every element in the array.

template<typename T , Size size>
Log& om::io::Log::operator< ( const typename util::StaticArray< T, size > &  array)
inline

Write the specified static array to this output log.

The basic implementation for this method writes either '[NULL]' if the array is NULL, or writes an array representation of every element in the array.

template<typename T >
Log& om::io::Log::operator< ( const T &  object)
inline

Convert the specified templated object to a string and write it to the output log.

This method uses the specified object's string cast operator to convert it to a string.

template<typename T >
Log& om::io::Log::operator<< ( const T &  object)
inline

Write a new line character and then log the specified object, using one of the standard '<' operators.

virtual void om::io::Log::flush ( )
virtual

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

Implements om::io::StringOutputStream.


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