ua.gradsoft.termware.printers
Class AbstractPrinter

java.lang.Object
  extended by ua.gradsoft.termware.printers.AbstractPrinter
All Implemented Interfaces:
IPrinter
Direct Known Subclasses:
AbstractPrettyPrinter

public abstract class AbstractPrinter
extends Object
implements IPrinter

abstract class for custom term output.

See Also:
IPrinterFactory

Field Summary
protected  PrintWriter out_
           
protected  String outTag_
           
static String WS
          whitespace.
 
Constructor Summary
protected AbstractPrinter(PrintWriter out, String outTag)
          create AbstractPrinter
 
Method Summary
 PrintWriter getOut()
          get output PrinWriter
 String getTag()
          get tag of output stream
 void printWs(int n)
          print whitespace n times
abstract  void writeTerm(Term t)
          write term
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ua.gradsoft.termware.IPrinter
flush
 

Field Detail

WS

public static final String WS
whitespace.

See Also:
Constant Field Values

out_

protected PrintWriter out_

outTag_

protected String outTag_
Constructor Detail

AbstractPrinter

protected AbstractPrinter(PrintWriter out,
                          String outTag)
create AbstractPrinter

Parameters:
out - - output stream.
outTag - - tag of output, usially - filename of output file.
Method Detail

writeTerm

public abstract void writeTerm(Term t)
                        throws TermWareException
write term

Specified by:
writeTerm in interface IPrinter
Throws:
TermWareException

getOut

public final PrintWriter getOut()
get output PrinWriter


getTag

public final String getTag()
get tag of output stream


printWs

public final void printWs(int n)
print whitespace n times