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

Writer Class Reference

Inheritance diagram for Writer:

AbstractWriter DisplayWriter EndianWriter ColumnWriter HttpWriter TextWriter List of all members.

Public Types

typedef void function (void *dst, uint count) Mutator

Public Member Functions

 this (IBuffer buffer)
 this (IConduit conduit)
char[] toString ()
void write (void *src, uint count)
void write (void *src, uint count, uint mask, Mutator mutate)

Private Member Functions

IBuffer getBuffer ()
void setStringEncoder (IStringEncoder s)
IWriter flush ()
IWriter cr ()
void enableArrayPrefix (bool on)
IWriter put (IWritable x)
IWriter put (char x)
IWriter put (wchar x)
IWriter put (dchar x)
IWriter put (char[] x)
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 putw (wchar[] x)
IWriter putd (dchar[] x)

Static Private Member Functions

 this ()

Private Attributes

IBuffer buffer
StringEncoder string
NumericEncoder numeric

Static Private Attributes

INewlineWriter newline
IOException ovf
EofException eof

Detailed Description

Writer base-class. Writers provide the means to append formatted data to an IBuffer, and expose a convenient method of handling a variety of data types. In addition to writing native types such as integer and char[], writers also process any class which has implemented the IWritable interface (one method).

Definition at line 50 of file Writer.d.


Member Typedef Documentation

typedef void function(void* dst, uint count) Mutator
 

Definition at line 52 of file Writer.d.


Member Function Documentation

this IBuffer  buffer  )  [inline]
 

Construct a Writer upon the provided IBuffer. All formatted ouput will be appended to this buffer.

Reimplemented from AbstractWriter.

Reimplemented in HttpWriter, DisplayWriter, and EndianWriter.

Definition at line 61 of file Writer.d.

this IConduit  conduit  )  [inline]
 

Construct a Writer on the buffer associated with the given conduit.

Reimplemented in DisplayWriter.

Definition at line 89 of file Writer.d.

char [] toString  )  [inline]
 

Return the name of this writer

Reimplemented from AbstractWriter.

Reimplemented in ColumnWriter, DisplayWriter, EndianWriter, and TextWriter.

Definition at line 98 of file Writer.d.

void write void *  src,
uint  count
[inline]
 

Definition at line 107 of file Writer.d.

Referenced by EndianWriter::bits16(), EndianWriter::bits32(), EndianWriter::bits64(), and EndianWriter::bits80().

void write void *  src,
uint  count,
uint  mask,
Mutator  mutate
[inline]
 

Definition at line 120 of file Writer.d.

References IBuffer::flush(), IBuffer::getConduit(), IBuffer::grow(), IBuffer::put(), and IBuffer::writable().

this  )  [inline, static, inherited]
 

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

Reimplemented in ColumnWriter.

Definition at line 117 of file AbstractWriter.d.

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

IBuffer getBuffer  )  [inline, inherited]
 

Return the associated buffer

Reimplemented from IWriter.

Definition at line 143 of file AbstractWriter.d.

void setStringEncoder IStringEncoder  s  )  [inline, inherited]
 

Set the configured IStringEncoder. These are intended to be used as a conversion mechanism between various character representations. They are also expected to be used for the process of applying character encodings.

See IStringEncoder.

Reimplemented from IWriter.

Definition at line 159 of file AbstractWriter.d.

References IStringEncoder::char16(), AbstractWriter::StringEncoder::char16, IStringEncoder::char32(), AbstractWriter::StringEncoder::char32, IStringEncoder::char8(), and AbstractWriter::StringEncoder::char8.

IWriter flush  )  [inline, inherited]
 

Flush the output of this writer. Returns false if the operation failed, true otherwise.

Reimplemented from IWriter.

Definition at line 173 of file AbstractWriter.d.

References IBuffer::flush().

Referenced by testRandomAccess().

IWriter cr  )  [inline, inherited]
 

Output a newline. Do this indirectly so that it can be intercepted by subclasses.

Reimplemented from IWriter.

Definition at line 186 of file AbstractWriter.d.

References AbstractWriter::newline, and AbstractWriter::put().

void enableArrayPrefix bool  on  )  [inline, inherited]
 

Definition at line 195 of file AbstractWriter.d.

References AbstractWriter::prefixArray.

Referenced by DisplayWriter::this().

IWriter put IWritable  x  )  [inline, inherited]
 

Write a class to the current buffer-position

Reimplemented from IWriter.

Reimplemented in ColumnWriter, and TextWriter.

Definition at line 219 of file AbstractWriter.d.

References IWritable::write().

Referenced by AbstractWriter::cr(), DisplayWriter::format(), AbstractWriter::length(), AbstractWriter::VersionUseShiftOperators::opShl(), testBuffer(), testConduitFilters(), and testRandomAccess().

IWriter put char  x  )  [inline, inherited]
 

Write a char value to the current buffer-position

Reimplemented from IWriter.

Definition at line 232 of file AbstractWriter.d.

References AbstractWriter::StringEncoder::char8.

IWriter put wchar  x  )  [inline, inherited]
 

Write a wide char value to the current buffer-position

Reimplemented from IWriter.

Definition at line 244 of file AbstractWriter.d.

References AbstractWriter::StringEncoder::char16.

IWriter put dchar  x  )  [inline, inherited]
 

Write a double char value to the current buffer-position

Reimplemented from IWriter.

Definition at line 256 of file AbstractWriter.d.

References AbstractWriter::StringEncoder::char32.

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

Write a char array to the current buffer-position

Reimplemented from IWriter.

Reimplemented in ColumnWriter, and TextWriter.

Definition at line 268 of file AbstractWriter.d.

References AbstractWriter::StringEncoder::char8.

IWriter put bool  x  )  [inline, inherited]
 

Write a boolean value to the current buffer-position

Reimplemented from IWriter.

Definition at line 305 of file AbstractWriter.d.

References AbstractWriter::NumericEncoder::int1.

IWriter put ubyte  x  )  [inline, inherited]
 

Write an unsigned byte value to the current buffer-position

Reimplemented from IWriter.

Definition at line 317 of file AbstractWriter.d.

References AbstractWriter::NumericEncoder::int8u.

IWriter put byte  x  )  [inline, inherited]
 

Write a byte value to the current buffer-position

Reimplemented from IWriter.

Definition at line 329 of file AbstractWriter.d.

References AbstractWriter::NumericEncoder::int8.

IWriter put ushort  x  )  [inline, inherited]
 

Write an unsigned short value to the current buffer-position

Reimplemented from IWriter.

Definition at line 341 of file AbstractWriter.d.

References AbstractWriter::NumericEncoder::int16u.

IWriter put short  x  )  [inline, inherited]
 

Write a short value to the current buffer-position

Reimplemented from IWriter.

Definition at line 353 of file AbstractWriter.d.

References AbstractWriter::NumericEncoder::int16.

IWriter put uint  x  )  [inline, inherited]
 

Write a unsigned int value to the current buffer-position

Reimplemented from IWriter.

Definition at line 365 of file AbstractWriter.d.

References AbstractWriter::NumericEncoder::int32u.

IWriter put int  x  )  [inline, inherited]
 

Write an int value to the current buffer-position

Reimplemented from IWriter.

Definition at line 377 of file AbstractWriter.d.

References AbstractWriter::NumericEncoder::int32.

IWriter put ulong  x  )  [inline, inherited]
 

Write an unsigned long value to the current buffer-position

Reimplemented from IWriter.

Definition at line 389 of file AbstractWriter.d.

References AbstractWriter::NumericEncoder::int64u.

IWriter put long  x  )  [inline, inherited]
 

Write a long value to the current buffer-position

Reimplemented from IWriter.

Definition at line 401 of file AbstractWriter.d.

References AbstractWriter::NumericEncoder::int64.

IWriter put float  x  )  [inline, inherited]
 

Write a float value to the current buffer-position

Reimplemented from IWriter.

Definition at line 413 of file AbstractWriter.d.

References AbstractWriter::NumericEncoder::float32.

IWriter put double  x  )  [inline, inherited]
 

Write a double value to the current buffer-position

Reimplemented from IWriter.

Definition at line 425 of file AbstractWriter.d.

References AbstractWriter::NumericEncoder::float64.

IWriter put real  x  )  [inline, inherited]
 

Write a real value to the current buffer-position

Reimplemented from IWriter.

Definition at line 437 of file AbstractWriter.d.

References AbstractWriter::NumericEncoder::float80.

IWriter putw wchar[]  x  )  [inline, inherited]
 

Write a char array to the current buffer-position

Definition at line 280 of file AbstractWriter.d.

References AbstractWriter::StringEncoder::char16.

Referenced by AbstractWriter::VersionUseShiftOperators::opShl().

IWriter putd dchar[]  x  )  [inline, inherited]
 

Write a char array to the current buffer-position

Definition at line 293 of file AbstractWriter.d.

References AbstractWriter::StringEncoder::char32.

Referenced by AbstractWriter::VersionUseShiftOperators::opShl().


Member Data Documentation

INewlineWriter newline [static, inherited]
 

Definition at line 88 of file AbstractWriter.d.

Referenced by AbstractWriter::cr(), and AbstractWriter::this().

IOException ovf [static, protected, inherited]
 

Definition at line 91 of file AbstractWriter.d.

Referenced by AbstractWriter::this().

EofException eof [static, protected, inherited]
 

Definition at line 92 of file AbstractWriter.d.

IBuffer buffer [protected, inherited]
 

Definition at line 94 of file AbstractWriter.d.

StringEncoder string [protected, inherited]
 

Definition at line 96 of file AbstractWriter.d.

NumericEncoder numeric [protected, inherited]
 

Definition at line 98 of file AbstractWriter.d.


The documentation for this class was generated from the following file:
Generated on Sun Oct 24 22:31:33 2004 for Mango by doxygen 1.3.6