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

AbstractWriter.d File Reference

Go to the source code of this file.

Classes

class  AbstractWriter
union  AbstractWriter::Encoder
class  NewlineWriter

Functions

 this ()

Variables

module mango io AbstractWriter
import mango io Exception
import mango io model IWriter
import mango io model mango
io model 
IBuffer
import mango io model mango
io model mango io model 
IConduit
import mango io FileConst
INewlineWriter CR


Detailed Description

Copyright (c) 2004 Kris Bell

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for damages of any kind arising from the use of this software.

Permission is hereby granted to anyone to use this software for any purpose, including commercial applications, and to alter it and/or redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment within documentation of said product would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.

3. This notice may not be removed or altered from any distribution of the source.

4. Derivative works are permitted, but they must carry this notice in full and credit the original source.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Version:
Initial version, October 2004
Author:
Kris, Ivan Senji (the "alias put put" idea)

Definition in file AbstractWriter.d.


Function Documentation

this  )  [static]
 

Definition at line 708 of file AbstractWriter.d.

References CR.


Variable Documentation

module mango io AbstractWriter
 

Definition at line 39 of file AbstractWriter.d.

import mango io Exception
 

Definition at line 41 of file AbstractWriter.d.

import mango io model IWriter
 

Definition at line 43 of file AbstractWriter.d.

import mango io model mango io model IBuffer
 

Definition at line 43 of file AbstractWriter.d.

import mango io model mango io model mango io model IConduit
 

Definition at line 43 of file AbstractWriter.d.

import mango io FileConst
 

A class to handle newline output. One might reasonable expect to emit a char[] for newlines; FileConst.NewlineString for example. Turns out that it's much more efficient to intercept line-breaks when they're implemented in a more formal manner (such as this).

For example, ColumnWriter() and TextWriter() both must intercept newline output so they can adjust formatting appropriately. It is much more efficient for such writers to intercept the IWritable put() method instead of scanning each char[] for the various \n combinations.

Please use the INewlineWriter interface for emitting newlines.

Definition at line 657 of file AbstractWriter.d.

INewlineWriter CR [static]
 

public newline adaptor

Definition at line 706 of file AbstractWriter.d.

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


Generated on Sat Apr 9 20:11:30 2005 for Mango by doxygen 1.3.6