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 opShl put
typedef DisplayWriter opShl opShl

Public Member Functions

 this (IBuffer buffer, char[] delimiter)
void suppress (byte count)
IWriter opShl (IWritable x)
IWriter opShl (char[] x)
IWriter opShlw (wchar[] x)
IWriter opShld (dchar[] x)

Private Member Functions

final IWriter delimit ()
 this (IBuffer buffer)
 this (IConduit conduit)
void setPrecision (uint digits)
void format (char[] fmt, void *src)
void format (void *src, uint count, uint width, char[] fmt)
void int8f (ubyte *src, uint count, char[] fmt)
void int16f (ushort *src, uint count, char[] fmt)
void fformat (void *src, uint count, uint width)
void int1 (void *src, uint count)
void int8 (void *src, uint count)
void int8u (void *src, uint count)
void int16 (void *src, uint count)
void int16u (void *src, uint count)
void int32 (void *src, uint count)
void int32u (void *src, uint count)
void int64 (void *src, uint count)
void int64u (void *src, uint count)
void float32 (void *src, uint count)
void float64 (void *src, uint count)
void float80 (void *src, uint count)

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

Reimplemented from AbstractWriter.

Definition at line 58 of file TextWriter.d.

typedef DisplayWriter opShl opShl
 

Definition at line 59 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 68 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 81 of file TextWriter.d.

References ignore.

Referenced by opShl().

IWriter opShl IWritable  x  )  [inline]
 

Intercept the IWritable method to catch newlines

Reimplemented from AbstractWriter.

Definition at line 92 of file TextWriter.d.

References suppress().

IWriter opShl char[]  x  )  [inline]
 

Intercept the output so we can append a delimiter.

Reimplemented from AbstractWriter.

Definition at line 108 of file TextWriter.d.

References delimit().

IWriter opShlw wchar[]  x  )  [inline]
 

Intercept the output so we can append a delimiter.

Reimplemented from AbstractWriter.

Definition at line 120 of file TextWriter.d.

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

IWriter opShld dchar[]  x  )  [inline]
 

Intercept the output so we can append a delimiter.

Reimplemented from AbstractWriter.

Definition at line 132 of file TextWriter.d.

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

final IWriter delimit  )  [inline, private]
 

write a delimiter after each token

Definition at line 144 of file TextWriter.d.

References delimiter, and ignore.

Referenced by opShl(), opShld(), and opShlw().

this IBuffer  buffer  )  [inline, inherited]
 

Construct a DisplayWriter upon the specified IBuffer

Reimplemented from Writer.

Reimplemented in HttpWriter, and FlushWriter.

Definition at line 74 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 102 of file DisplayWriter.d.

this  )  [inline, static, inherited]
 

Construct some static exception instances, and create the public 'newline' instance.

Reimplemented in ColumnWriter.

Definition at line 145 of file AbstractWriter.d.

References AbstractWriter::newline, and AbstractWriter::ovf.

void setPrecision uint  digits  )  [inline, inherited]
 

Set the number of floating point digits

Definition at line 113 of file DisplayWriter.d.

Referenced by testColumn().

void format char[]  fmt,
void *  src
[inline, inherited]
 

Convert to a string and send back through the framework such that it may be intercepted by a subclass.

Definition at line 125 of file DisplayWriter.d.

References AbstractWriter::put, and DisplayWriter::tmp.

Referenced by DisplayWriter::format(), DisplayWriter::int16f(), DisplayWriter::int32(), DisplayWriter::int32u(), DisplayWriter::int64(), DisplayWriter::int64u(), and DisplayWriter::int8f().

void format void *  src,
uint  count,
uint  width,
char[]  fmt
[inline, inherited]
 

Definition at line 166 of file DisplayWriter.d.

References DisplayWriter::format().

void int8f ubyte *  src,
uint  count,
char[]  fmt
[inline, inherited]
 

Definition at line 134 of file DisplayWriter.d.

References DisplayWriter::format().

Referenced by DisplayWriter::int8(), and DisplayWriter::int8u().

void int16f ushort *  src,
uint  count,
char[]  fmt
[inline, inherited]
 

Definition at line 150 of file DisplayWriter.d.

References DisplayWriter::format().

Referenced by DisplayWriter::int16(), and DisplayWriter::int16u().

void fformat void *  src,
uint  count,
uint  width
[inline, inherited]
 

Definition at line 181 of file DisplayWriter.d.

References DisplayWriter::digits, AbstractWriter::put, and DisplayWriter::tmp.

Referenced by DisplayWriter::float32(), DisplayWriter::float64(), and DisplayWriter::float80().

void int1 void *  src,
uint  count
[inline, inherited]
 

Definition at line 205 of file DisplayWriter.d.

void int8 void *  src,
uint  count
[inline, inherited]
 

Definition at line 223 of file DisplayWriter.d.

References DisplayWriter::int8f().

void int8u void *  src,
uint  count
[inline, inherited]
 

Definition at line 232 of file DisplayWriter.d.

References DisplayWriter::int8f().

void int16 void *  src,
uint  count
[inline, inherited]
 

Definition at line 241 of file DisplayWriter.d.

References DisplayWriter::int16f().

void int16u void *  src,
uint  count
[inline, inherited]
 

Definition at line 250 of file DisplayWriter.d.

References DisplayWriter::int16f().

void int32 void *  src,
uint  count
[inline, inherited]
 

Definition at line 259 of file DisplayWriter.d.

References DisplayWriter::format().

void int32u void *  src,
uint  count
[inline, inherited]
 

Definition at line 268 of file DisplayWriter.d.

References DisplayWriter::format().

void int64 void *  src,
uint  count
[inline, inherited]
 

Definition at line 277 of file DisplayWriter.d.

References DisplayWriter::format().

void int64u void *  src,
uint  count
[inline, inherited]
 

Definition at line 286 of file DisplayWriter.d.

References DisplayWriter::format().

void float32 void *  src,
uint  count
[inline, inherited]
 

Definition at line 295 of file DisplayWriter.d.

References DisplayWriter::fformat().

void float64 void *  src,
uint  count
[inline, inherited]
 

Definition at line 304 of file DisplayWriter.d.

References DisplayWriter::fformat().

void float80 void *  src,
uint  count
[inline, inherited]
 

Definition at line 313 of file DisplayWriter.d.

References DisplayWriter::fformat().


Member Data Documentation

byte ignore [private]
 

Definition at line 55 of file TextWriter.d.

Referenced by delimit(), and suppress().

char [] delimiter [private]
 

Definition at line 56 of file TextWriter.d.

Referenced by delimit(), and this().


The documentation for this class was generated from the following file:
Generated on Tue Jan 25 21:18:41 2005 for Mango by doxygen 1.3.6