Printer

public abstract class Printer

Abstract class for Text or HTML printer.

Constructors

Printer

protected Printer(String toFileName)

Printer

protected Printer(OutputStream p)

Methods

closeFile

public void closeFile()

Flush and close current OutputStreamWriter.

defineAnchor

public void defineAnchor(String ref)

endAnchorRef

public void endAnchorRef()

hasAnchors

public boolean hasAnchors()
Returns

true if the target language contains html-like anchors.

initFile

public void initFile(int language)

messageRef

public void messageRef(TapList<String> msgTty, boolean showMsg, int language)

Print a Tapenade message in the generated file.

Parameters
  • msgTty – Tapenade error or warning message.

  • showMsg – true with tapenade option -msginfile.

  • language – used add comment delimiter before the message.

Throws
  • IOException – if an output error is detected.

newLine

public abstract void newLine()

printText

public abstract void printText(String text, String kind)
Parameters
  • kind – determines the graphical syntax highlighting (e.g. for HTML). Possible values are {“plain”, “string”, “constant”, “comment”, “keyword”, “funcname”, “typename”, “label”, “modifier”, “vardecl”}

resetTargetNameAndZone

public void resetTargetNameAndZone()

setTargetNameAndZone

public void setTargetNameAndZone(String name, String zone)

space

public abstract void space(int nbSpaces)

startAnchorRef

public void startAnchorRef(String ref)

toFile

protected OutputStreamWriter toFile()