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

TextWriter Class Reference

Inheritance diagram for TextWriter:

FlushWriter List of all members.

Public Types

typedef FlushWriter 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 Member Functions

final IWriter delimit ()
IWriter put ()
IWriter put (bool x)
IWriter put (ubyte x)
IWriter put (byte x)
IWriter put (ushort x)
IWriter put (short x)
IWriter put (uint x)
IWriter put (int x)
IWriter put (ulong x)
IWriter put (long x)
IWriter put (float x)
IWriter put (double x)
IWriter put (real x)
IWriter put (char x)
IWriter put (wchar x)
IWriter put (dchar x)
IWriter put (byte[] x)
IWriter put (ubyte[] x)
IWriter put (short[] x)
IWriter put (ushort[] x)
IWriter put (int[] x)
IWriter put (uint[] x)
IWriter put (long[] x)
IWriter put (ulong[] x)
IWriter put (float[] x)
IWriter put (double[] x)
IWriter put (real[] x)
 this (IBuffer buffer)
 this (IConduit conduit)
 this (IBuffer buffer, char[] workspace=null, Format.DblFormat df=&Double.format)

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 FlushWriter put put
 

Reimplemented from FlushWriter.

Definition at line 55 of file TextWriter.d.


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 FlushWriter.

Definition at line 91 of file TextWriter.d.

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

IWriter put char[]  x  )  [inline]
 

Intercept the output so we can append a delimiter.

Reimplemented from FlushWriter.

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 Writer.

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 Writer.

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().

IWriter put  )  [inline, inherited]
 

Flush this writer. This is a convenience method used by the "whisper" syntax.

Reimplemented from IWriter.

Definition at line 299 of file Writer.d.

References Writer::flush().

Referenced by Writer::cr(), Writer::length(), DisplayWriter::println(), testBuffer(), and DisplayWriter::utf8().

IWriter put bool  x  )  [inline, inherited]
 

Write a boolean value to the current buffer-position

Reimplemented from IWriter.

Definition at line 323 of file Writer.d.

References Writer::write().

IWriter put ubyte  x  )  [inline, inherited]
 

Write an unsigned byte value to the current buffer-position

Reimplemented from IWriter.

Definition at line 334 of file Writer.d.

References Writer::write().

IWriter put byte  x  )  [inline, inherited]
 

Write a byte value to the current buffer-position

Reimplemented from IWriter.

Definition at line 345 of file Writer.d.

References Writer::write().

IWriter put ushort  x  )  [inline, inherited]
 

Write an unsigned short value to the current buffer-position

Reimplemented from IWriter.

Definition at line 356 of file Writer.d.

References Writer::write().

IWriter put short  x  )  [inline, inherited]
 

Write a short value to the current buffer-position

Reimplemented from IWriter.

Definition at line 367 of file Writer.d.

References Writer::write().

IWriter put uint  x  )  [inline, inherited]
 

Write a unsigned int value to the current buffer-position

Reimplemented from IWriter.

Definition at line 378 of file Writer.d.

References Writer::write().

IWriter put int  x  )  [inline, inherited]
 

Write an int value to the current buffer-position

Reimplemented from IWriter.

Definition at line 389 of file Writer.d.

References Writer::write().

IWriter put ulong  x  )  [inline, inherited]
 

Write an unsigned long value to the current buffer-position

Reimplemented from IWriter.

Definition at line 400 of file Writer.d.

References Writer::write().

IWriter put long  x  )  [inline, inherited]
 

Write a long value to the current buffer-position

Reimplemented from IWriter.

Definition at line 411 of file Writer.d.

References Writer::write().

IWriter put float  x  )  [inline, inherited]
 

Write a float value to the current buffer-position

Reimplemented from IWriter.

Definition at line 422 of file Writer.d.

References Writer::write().

IWriter put double  x  )  [inline, inherited]
 

Write a double value to the current buffer-position

Reimplemented from IWriter.

Definition at line 433 of file Writer.d.

References Writer::write().

IWriter put real  x  )  [inline, inherited]
 

Write a real value to the current buffer-position

Reimplemented from IWriter.

Definition at line 444 of file Writer.d.

References Writer::write().

IWriter put char  x  )  [inline, inherited]
 

Write a char value to the current buffer-position

Reimplemented from IWriter.

Definition at line 455 of file Writer.d.

References Writer::Encoder::char8, and Writer::encode.

IWriter put wchar  x  )  [inline, inherited]
 

Write a wchar value to the current buffer-position

Reimplemented from IWriter.

Definition at line 467 of file Writer.d.

References Writer::Encoder::char16, and Writer::encode.

IWriter put dchar  x  )  [inline, inherited]
 

Write a dchar value to the current buffer-position

Reimplemented from IWriter.

Definition at line 479 of file Writer.d.

References Writer::Encoder::char32, and Writer::encode.

IWriter put byte[]  x  )  [inline, inherited]
 

Write a byte array to the current buffer-position

Reimplemented from IWriter.

Definition at line 491 of file Writer.d.

References Writer::length(), and Writer::write().

IWriter put ubyte[]  x  )  [inline, inherited]
 

Write an unsigned byte array to the current buffer-position

Reimplemented from IWriter.

Definition at line 502 of file Writer.d.

References Writer::length(), and Writer::write().

IWriter put short[]  x  )  [inline, inherited]
 

Write a short array to the current buffer-position

Reimplemented from IWriter.

Definition at line 513 of file Writer.d.

References Writer::length(), and Writer::write().

IWriter put ushort[]  x  )  [inline, inherited]
 

Write an unsigned short array to the current buffer-position

Reimplemented from IWriter.

Definition at line 524 of file Writer.d.

References Writer::length(), and Writer::write().

IWriter put int[]  x  )  [inline, inherited]
 

Write an int array to the current buffer-position

Reimplemented from IWriter.

Definition at line 535 of file Writer.d.

References Writer::length(), and Writer::write().

IWriter put uint[]  x  )  [inline, inherited]
 

Write an unsigned int array to the current buffer-position

Reimplemented from IWriter.

Definition at line 546 of file Writer.d.

References Writer::length(), and Writer::write().

IWriter put long[]  x  )  [inline, inherited]
 

Write a long array to the current buffer-position

Reimplemented from IWriter.

Definition at line 557 of file Writer.d.

References Writer::length(), and Writer::write().

IWriter put ulong[]  x  )  [inline, inherited]
 

Write an unsigned long array to the current buffer-position

Reimplemented from IWriter.

Definition at line 568 of file Writer.d.

References Writer::length(), and Writer::write().

IWriter put float[]  x  )  [inline, inherited]
 

Write a float array to the current buffer-position

Reimplemented from IWriter.

Definition at line 579 of file Writer.d.

References Writer::length(), and Writer::write().

IWriter put double[]  x  )  [inline, inherited]
 

Write a double array to the current buffer-position

Reimplemented from IWriter.

Definition at line 590 of file Writer.d.

References Writer::length(), and Writer::write().

IWriter put real[]  x  )  [inline, inherited]
 

Write a real array to the current buffer-position

Reimplemented from IWriter.

Definition at line 601 of file Writer.d.

References Writer::length(), and Writer::write().

this IBuffer  buffer  )  [inline, inherited]
 

Construct a FlushWriter upon the specified IBuffer

Reimplemented from Writer.

Definition at line 61 of file FlushWriter.d.

this IConduit  conduit  )  [inline, inherited]
 

Construct a FlushWriter upon the specified IConduit

Reimplemented from DisplayWriter.

Definition at line 72 of file FlushWriter.d.

this IBuffer  buffer,
char[]  workspace = null,
Format.DblFormat  df = &Double.format
[inline, inherited]
 

Construct a DisplayWriter upon the specified IBuffer. One can override the default floating-point formatting by providing an appropriate handler to this constructor. For example, one might configure the DGDouble.format() function instead.

Definition at line 95 of file DisplayWriter.d.

References Writer::enableArrayPrefix(), DisplayWriter::style, DisplayWriter::utf8(), and DisplayWriter::workspace.


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 Fri May 27 18:12:04 2005 for Mango by  doxygen 1.4.0