public class DisplayFormat extends AbstractFormat
| Modifier and Type | Field and Description |
|---|---|
boolean |
checkSharing
This field is set true by Scheme when it creates a shared write format
|
static ThreadLocation |
outBase
Fluid parameter to specify default output base for printing rationals.
|
static ThreadLocation |
outRadix
True if we should print a radix indicator when printing rationals.
|
| Constructor and Description |
|---|
DisplayFormat(boolean readable,
char language)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static DisplayFormat |
getCommonLispFormat(boolean readable) |
static DisplayFormat |
getEmacsLispFormat(boolean readable) |
boolean |
getReadableOutput() |
static DisplayFormat |
getSchemeFormat(boolean readable) |
void |
write(int v,
Consumer out) |
void |
writeBoolean(boolean v,
Consumer out) |
void |
writeList(LList value,
OutPort out)
Format a list.
|
void |
writeObject(java.lang.Object obj,
Consumer out) |
void |
writeObjectRaw(java.lang.Object obj,
Consumer out) |
endAttribute, endElement, format, format, parseObject, startAttribute, startElement, write, writeInt, writeLong, writeObject, writeObjectpublic static final ThreadLocation outBase
public static final ThreadLocation outRadix
public boolean checkSharing
public DisplayFormat(boolean readable,
char language)
readable - if output should be formatted so it could be read
back in again, for example strings shoudl be quoted.language - the programming language style to use, where
'S' is Scheme, 'C' is Common Lisp, and 'E' is Emacs Lisp.public static DisplayFormat getEmacsLispFormat(boolean readable)
public static DisplayFormat getCommonLispFormat(boolean readable)
public static DisplayFormat getSchemeFormat(boolean readable)
public boolean getReadableOutput()
public void writeBoolean(boolean v,
Consumer out)
writeBoolean in class AbstractFormatpublic void write(int v,
Consumer out)
write in class AbstractFormatpublic void writeList(LList value, OutPort out)
value - The list on which the method CDR's, termination occurs when
this becomes a non-pair or the empty listout - The output port that is responsible for the pretty printingpublic void writeObject(java.lang.Object obj,
Consumer out)
writeObject in class AbstractFormatpublic void writeObjectRaw(java.lang.Object obj,
Consumer out)