Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
elm::io::Output Class Reference

#include <elm/io/Output.h>

+ Inheritance diagram for elm::io::Output:

Public Member Functions

 Output (void)
 
 Output (OutStream &stream)
 
OutStreamstream (void) const
 
void setStream (OutStream &stream)
 
void flush (void)
 
void print (bool value)
 
void print (char chr)
 
void print (double value)
 
void print (void *value)
 
void print (const char *str)
 
void print (const CString str)
 
void print (const String &str)
 
void print (const IntFormat &fmt)
 
void print (const FloatFormat &fmt)
 
void format (CString fmt,...)
 
void format (CString fmt, VarArg &args)
 
void print (t::int32 value)
 
void print (t::uint32 value)
 
void print (t::int64 value)
 
void print (t::uint64 value)
 

Detailed Description

Formatted output class.

Formatting Integers

Formatting integers is maded using the class IntFormat that embeds the value to display and the format configuration. Then the result object is passed to the Output object that will perform the actual formatting of the output as in the example below.

void *p;

Constructor & Destructor Documentation

elm::io::Output::Output ( void  )

Build a formatted output on the standard output.

elm::io::Output::Output ( OutStream stream)

Build a formatted output on the given stream.

Member Function Documentation

void elm::io::Output::flush ( void  )

Flush the underlying stream.

Exceptions
IOExceptionIf there is a stream error.

References elm::io::OutStream::flush(), and elm::io::OutStream::lastErrorMessage().

Referenced by elm::xom::Serializer::flush(), and elm::trace().

void elm::io::Output::format ( CString  fmt,
  ... 
)

Print a formatted string a-la C prinf().

Parameters
fmtFormat string.
...Other arguments.
void elm::io::Output::format ( CString  fmt,
VarArg args 
)

Print a formatted string a-la C prinf().

Parameters
fmtFormat string.
argsOther arguments.

References elm::VarArg::args(), and elm::io::OutStream::write().

void elm::io::Output::print ( bool  value)

Print a boolean value, 'true' or 'false'.

Parameters
valueValue to write.

Referenced by elm::io::operator<<(), print(), elm::io::def_printer< T >::print(), and elm::io::enum_printer< T >::print().

void elm::io::Output::print ( char  chr)

Print a character.

Parameters
chrCharacter to print.

References elm::io::OutStream::lastErrorMessage(), and elm::io::OutStream::write().

void elm::io::Output::print ( double  value)

Print a double value.

Parameters
valueDouble value to print.

References elm::io::OutStream::lastErrorMessage(), and elm::io::OutStream::write().

void elm::io::Output::print ( void *  value)

Print a pointer.

Parameters
valuePointer value.

References elm::io::OutStream::lastErrorMessage(), print(), and elm::io::OutStream::write().

void elm::io::Output::print ( const char *  str)

References print().

Referenced by print().

void elm::io::Output::print ( const CString  str)

Print a C string.

Parameters
strC string to print.

References elm::CString::chars(), elm::io::OutStream::lastErrorMessage(), elm::CString::length(), and elm::io::OutStream::write().

void elm::io::Output::print ( const String str)
void elm::io::Output::print ( t::int32  value)

Print an integer.

Parameters
valueInteger to print.
Deprecated:

References elm::io::OutStream::lastErrorMessage(), elm::value(), and elm::io::OutStream::write().

void elm::io::Output::print ( t::uint32  value)

Print an unsigned integer.

Parameters
valueInteger to print.
Deprecated:

References elm::io::OutStream::lastErrorMessage(), and elm::io::OutStream::write().

void elm::io::Output::print ( t::int64  value)

Print a long long integer.

Parameters
valueLong long integer to print.
Deprecated:

References elm::io::OutStream::lastErrorMessage(), elm::value(), and elm::io::OutStream::write().

void elm::io::Output::print ( t::uint64  value)

Print an unsigned long long integer.

Parameters
valueInteger to print.
Deprecated:

References elm::io::OutStream::lastErrorMessage(), and elm::io::OutStream::write().

void elm::io::Output::setStream ( OutStream stream)
OutStream & elm::io::Output::stream ( void  ) const

Get the stream used by the output.

Returns
Output stream.

Referenced by print(), setStream(), and elm::xom::Serializer::writeRaw().


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