AXCEL C++ Framework
Elegance through abstraction
Public Member Functions
axcel::io::output Class Reference

Output stream. More...

#include <axcel.h>

Inheritance diagram for axcel::io::output:
axcel::io::iob axcel::object axcel::io::ios axcel::console axcel::data axcel::fs::file axcel::net::socket::tcp axcel::proc::pstream axcel::string

List of all members.

Public Member Functions

virtual string type ()
 Get type of object.
virtual int putc (int c)=0
 Write byte.
virtual int puts (const char *s)
 Write string.
virtual int printf (const char *format,...)
 Formatted output.
virtual size_t write (const char *ptr, size_t size, size_t nmemb)
 Write raw data.
virtual size_t write (data d)
 Write raw data.
outputoperator<< (object &o)
 Print object.
outputoperator<< (bool val)
outputoperator<< (short val)
outputoperator<< (unsigned short val)
outputoperator<< (int val)
outputoperator<< (unsigned int val)
outputoperator<< (long val)
outputoperator<< (unsigned long val)
outputoperator<< (float val)
outputoperator<< (double val)
outputoperator<< (long double val)
outputoperator<< (const void *val)
outputoperator<< (char c)
outputoperator<< (signed char c)
outputoperator<< (unsigned char c)
outputoperator<< (const char *s)
outputoperator<< (string s)
outputput (object &o)
 Print object.
outputput (bool val)
outputput (short val)
outputput (unsigned short val)
outputput (int val)
outputput (long val)
outputput (unsigned long val)
outputput (float val)
outputput (double val)
outputput (long double val)
outputput (const void *val)
outputput (char c)
outputput (signed char c)
outputput (unsigned char c)
outputput (const char *s)
outputecho (object &o)
 Print object on new line.
outputecho ()
outputecho (bool val)
outputecho (short val)
outputecho (unsigned short val)
outputecho (int val)
outputecho (size_t val)
outputecho (long val)
outputecho (unsigned long val)
outputecho (float val)
outputecho (double val)
outputecho (long double val)
outputecho (const void *val)
outputecho (char c)
outputecho (signed char c)
outputecho (unsigned char c)
outputecho (const char *s)
outputput (string s)
outputecho (string s)

Detailed Description

Output stream.

Definition at line 375 of file axcel.h.


Member Function Documentation

io::output & axcel::io::output::echo ( object o)

Print object on new line.

Parameters:
oobject to output
Returns:
Reference to this stream

Casts object o to string to get suitable string representation of the object's data. The string is then written to this stream followed by a '\n' character.

Reimplemented in axcel::io::ios.

Definition at line 319 of file axcel.cpp.

output& axcel::io::output::echo ( ) [inline]

Reimplemented in axcel::io::ios.

Definition at line 427 of file axcel.h.

output& axcel::io::output::echo ( bool  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 428 of file axcel.h.

output& axcel::io::output::echo ( const char *  s) [inline]

Reimplemented in axcel::io::ios.

Definition at line 442 of file axcel.h.

output& axcel::io::output::echo ( short  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 429 of file axcel.h.

output& axcel::io::output::echo ( unsigned short  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 430 of file axcel.h.

output& axcel::io::output::echo ( int  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 431 of file axcel.h.

output& axcel::io::output::echo ( size_t  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 432 of file axcel.h.

output& axcel::io::output::echo ( long  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 433 of file axcel.h.

output& axcel::io::output::echo ( unsigned long  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 434 of file axcel.h.

output& axcel::io::output::echo ( float  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 435 of file axcel.h.

output& axcel::io::output::echo ( double  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 436 of file axcel.h.

output& axcel::io::output::echo ( long double  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 437 of file axcel.h.

output& axcel::io::output::echo ( const void *  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 438 of file axcel.h.

output& axcel::io::output::echo ( char  c) [inline]

Reimplemented in axcel::io::ios.

Definition at line 439 of file axcel.h.

output& axcel::io::output::echo ( signed char  c) [inline]

Reimplemented in axcel::io::ios.

Definition at line 440 of file axcel.h.

output& axcel::io::output::echo ( unsigned char  c) [inline]

Reimplemented in axcel::io::ios.

Definition at line 441 of file axcel.h.

io::output & axcel::io::output::echo ( string  s)

Reimplemented in axcel::io::ios.

Definition at line 322 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( bool  val)

Reimplemented in axcel::io::ios.

Definition at line 1197 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( char  c)

Reimplemented in axcel::io::ios.

Definition at line 1298 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( double  val)

Reimplemented in axcel::io::ios.

Definition at line 1271 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( long double  val)

Reimplemented in axcel::io::ios.

Definition at line 1280 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( short  val)

Reimplemented in axcel::io::ios.

Definition at line 1208 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( const void *  val)

Reimplemented in axcel::io::ios.

Definition at line 1289 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( unsigned short  val)

Reimplemented in axcel::io::ios.

Definition at line 1217 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( signed char  c)

Reimplemented in axcel::io::ios.

Definition at line 1307 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( unsigned char  c)

Reimplemented in axcel::io::ios.

Definition at line 1316 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( unsigned int  val)

Reimplemented in axcel::io::ios.

Definition at line 1235 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( const char *  s)

Reimplemented in axcel::io::ios.

Definition at line 1325 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( string  s)

Reimplemented in axcel::io::ios.

Definition at line 1761 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( object o)

Print object.

Parameters:
oobject to output
Returns:
Reference to this stream

Casts object o to string to get suitable string representation of the object's data. The string is then written to this stream.

Reimplemented in axcel::io::ios.

Definition at line 300 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( long  val)

Reimplemented in axcel::io::ios.

Definition at line 1244 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( int  val)

Reimplemented in axcel::io::ios.

Definition at line 1226 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( unsigned long  val)

Reimplemented in axcel::io::ios.

Definition at line 1253 of file axcel.cpp.

io::output & axcel::io::output::operator<< ( float  val)

Reimplemented in axcel::io::ios.

Definition at line 1262 of file axcel.cpp.

int axcel::io::output::printf ( const char *  format,
  ... 
) [virtual]

Formatted output.

Parameters:
formatFormat string
...Token value arguments
Returns:
Number of characters written (not including trailing '\0')

This method calls vsnprintf() to create the formatted string before writing it to the stream. See printf() documentation from the Standard C libraryrary for details on using this method.

Definition at line 1137 of file axcel.cpp.

output& axcel::io::output::put ( long  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 416 of file axcel.h.

output& axcel::io::output::put ( char  c) [inline]

Reimplemented in axcel::io::ios.

Definition at line 422 of file axcel.h.

output& axcel::io::output::put ( bool  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 412 of file axcel.h.

output& axcel::io::output::put ( const char *  s) [inline]

Reimplemented in axcel::io::ios.

Definition at line 425 of file axcel.h.

output& axcel::io::output::put ( signed char  c) [inline]

Reimplemented in axcel::io::ios.

Definition at line 423 of file axcel.h.

output& axcel::io::output::put ( double  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 419 of file axcel.h.

output& axcel::io::output::put ( long double  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 420 of file axcel.h.

output& axcel::io::output::put ( short  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 413 of file axcel.h.

io::output & axcel::io::output::put ( object o)

Print object.

Parameters:
oobject to output
Returns:
Reference to this stream

Casts object o to string to get suitable string representation of the object's data. The string is then written to this stream.

Reimplemented in axcel::io::ios.

Definition at line 309 of file axcel.cpp.

output& axcel::io::output::put ( unsigned char  c) [inline]

Reimplemented in axcel::io::ios.

Definition at line 424 of file axcel.h.

output& axcel::io::output::put ( unsigned long  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 417 of file axcel.h.

output& axcel::io::output::put ( const void *  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 421 of file axcel.h.

output& axcel::io::output::put ( float  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 418 of file axcel.h.

output& axcel::io::output::put ( unsigned short  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 414 of file axcel.h.

output& axcel::io::output::put ( int  val) [inline]

Reimplemented in axcel::io::ios.

Definition at line 415 of file axcel.h.

io::output & axcel::io::output::put ( string  s)

Reimplemented in axcel::io::ios.

Definition at line 321 of file axcel.cpp.

virtual int axcel::io::output::putc ( int  c) [pure virtual]

Write byte.

Parameters:
cCharacter to write
Returns:
Character written or EOF on end of file or error

Writes character c to stream and returns a non-negative number on success or EOF on error. Before returning from within this method, one of the following methods must be called:

  • If end of file is reached, the method must call drain()
  • If an error occurs, the method must call kill()
  • If successful, the method must call heal()

Implemented in axcel::data, axcel::string, axcel::fs::file, axcel::net::socket::tcp, axcel::console, and axcel::proc::pstream.

int axcel::io::output::puts ( const char *  s) [virtual]

Write string.

Parameters:
sstring to write
Returns:
Number of bytes written

Writes string s to the stream, without its trailing '\0'.

Reimplemented in axcel::net::socket::tcp.

Definition at line 1101 of file axcel.cpp.

string axcel::io::output::type ( ) [virtual]

Get type of object.

Returns:
string containing name of object's class.

Reimplemented from axcel::io::iob.

Reimplemented in axcel::io::ios, axcel::data, axcel::string, axcel::fs::file, axcel::net::socket::tcp, axcel::console, and axcel::proc::pstream.

Definition at line 256 of file axcel.cpp.

size_t axcel::io::output::write ( data  d) [virtual]

Write raw data.

Parameters:
ddata object containing data to write
Returns:
Number of bytes written

Definition at line 6691 of file axcel.cpp.

size_t axcel::io::output::write ( const char *  ptr,
size_t  size,
size_t  nmemb 
) [virtual]

Write raw data.

Parameters:
ptrBuffer
sizeElement size
nmembNumber of elements to write
Returns:
Number of elements successfully written or EOF on end of fs::file or error.

Writes nmemb elements of data, each size bytes long, to the stream, obtaining them from the location given by ptr.

Definition at line 1118 of file axcel.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Defines