Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

TextWriter Class Reference

Inheritance diagram for TextWriter:

DisplayWriter List of all members.

Public Types

typedef DisplayWriter put put

Public Member Functions

 this (IBuffer buffer, char[] delimiter)
void suppress (byte count)
IWriter put (IWritable x)
IWriter put (char[] x)
IWriter putw (wchar[] x)
IWriter putd (dchar[] x)

Private Types

typedef Number Radix Radix

Private Member Functions

final IWriter delimit ()
 this (IBuffer buffer)
 this (IConduit conduit)
void setPrecision (uint digits)
void setRadix (Radix radix)
void setFill (uint width, char fill= ' ')

Static Private Member Functions

 this ()

Private Attributes

byte ignore
char[] delimiter

Detailed Description

Print readable output to an IWriter seperated by delimiters. Note that the delimiter should be chosen such that it doesn't conflict with any other characters being written. For example, by choosing a comma-delimiter, you should ensure a comma is not output within a text string (so the output can be easily tokenized when read).

Definition at line 53 of file TextWriter.d.


Member Typedef Documentation

typedef DisplayWriter put put
 

Definition at line 55 of file TextWriter.d.

typedef Number Radix Radix [inherited]
 

Definition at line 63 of file DisplayWriter.d.

Referenced by DisplayWriter::setRadix().


Member Function Documentation

this IBuffer  buffer,
char[]  delimiter
[inline]
 

Construct a TextWriter using the provided buffer. Output is seperated with the given delimiter string.

Definition at line 67 of file TextWriter.d.

References delimiter.

void suppress byte  count  )  [inline]
 

Reset this writer, so it won't emit the specified series of subsequent delimeters

Definition at line 80 of file TextWriter.d.

References ignore.

Referenced by put().

IWriter put IWritable  x  )  [inline]
 

Intercept the IWritable method to catch newlines

Reimplemented from AbstractWriter.

Definition at line 91 of file TextWriter.d.

References suppress().

IWriter put char[]  x  )  [inline]
 

Intercept the output so we can append a delimiter.

Reimplemented from AbstractWriter.

Definition at line 107 of file TextWriter.d.

References delimit(), and IWriter::put().

IWriter putw wchar[]  x  )  [inline]
 

Intercept the output so we can append a delimiter.

Reimplemented from AbstractWriter.

Definition at line 119 of file TextWriter.d.

References delimit(), and IWriter::putw().

IWriter putd dchar[]  x  )  [inline]
 

Intercept the output so we can append a delimiter.

Reimplemented from AbstractWriter.

Definition at line 131 of file TextWriter.d.

References delimit(), and IWriter::putd().

final IWriter delimit  )  [inline, private]
 

write a delimiter after each token

Definition at line 143 of file TextWriter.d.

References delimiter, and ignore.

Referenced by put(), putd(), and putw().

this IBuffer  buffer  )  [inline, inherited]
 

Construct a DisplayWriter upon the specified IBuffer

Reimplemented from Writer.

Reimplemented in HttpWriter, and FlushWriter.

Definition at line 83 of file DisplayWriter.d.

References AbstractWriter::enableArrayPrefix().

this IConduit  conduit  )  [inline, inherited]
 

Construct a DisplayWriter upon the specified IConduit

Reimplemented from Writer.

Reimplemented in FlushWriter.

Definition at line 111 of file DisplayWriter.d.

this  )  [inline, static, inherited]
 

Construct some static exception instances

Reimplemented in ColumnWriter.

Definition at line 162 of file AbstractWriter.d.

References AbstractWriter::ovf.

void setPrecision uint  digits  )  [inline, inherited]
 

Set the number of floating point digits

Definition at line 122 of file DisplayWriter.d.

void setRadix Radix  radix  )  [inline, inherited]
 

Definition at line 131 of file DisplayWriter.d.

References DisplayWriter::Radix.

void setFill uint  width,
char  fill = ' '
[inline, inherited]
 

Definition at line 140 of file DisplayWriter.d.

References assert(), and DisplayWriter::tmp.


Member Data Documentation

byte ignore [private]
 

Definition at line 57 of file TextWriter.d.

Referenced by delimit(), and suppress().

char [] delimiter [private]
 

Definition at line 58 of file TextWriter.d.

Referenced by delimit(), and this().


The documentation for this class was generated from the following file:
Generated on Sat Apr 9 20:11:44 2005 for Mango by doxygen 1.3.6