public class DSPPrinter
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DSPPrinter.Flags |
| Modifier and Type | Field and Description |
|---|---|
protected CEConstraint |
ce |
protected static int |
COLUMNS |
protected DSP |
dsp |
protected java.util.EnumSet<DSPPrinter.Flags> |
flags |
protected static char |
LBRACE |
protected static char |
LBRACKET |
protected static char |
LPAREN |
protected static int |
NILFLAGS |
protected static int |
NONAME |
protected static int |
NONNIL |
protected static int |
PERLINE |
protected IndentWriter |
printer |
protected static char |
RBRACE |
protected static char |
RBRACKET |
protected static char |
RPAREN |
protected java.io.PrintWriter |
writer |
| Modifier | Constructor and Description |
|---|---|
protected |
DSPPrinter() |
|
DSPPrinter(DSP dsp,
CEConstraint ce,
java.io.Writer writer) |
|
DSPPrinter(DSP dsp,
java.io.Writer writer) |
| Modifier and Type | Method and Description |
|---|---|
DSPPrinter |
close() |
DSPPrinter |
flag(DSPPrinter.Flags flag) |
DSPPrinter |
flush() |
protected static java.lang.String |
getPrintValue(java.lang.Object value) |
protected static char |
hexchar(int i) |
protected java.lang.String |
indicesToString(Index indices) |
DSPPrinter |
print()
Print data from a DSP
- optionally constrained
|
protected void |
printArray(DataCursor data,
java.util.List<Slice> slices) |
protected void |
printAtomicInstance(DataCursor datav,
Index pos) |
protected void |
printAtomicVector(DataCursor data,
java.util.List<Slice> slices,
Odometer odom) |
protected void |
printCompoundInstance(DataCursor datav)
Print a single structure or sequence or record instance
|
protected void |
printScalar(DataCursor data) |
protected void |
printVariable(DataCursor data,
java.util.List<Slice> slices)
Print an arbitrary DataVariable using a constraint.
|
protected java.lang.String |
valueString(java.lang.Object vector,
long pos,
DapType basetype) |
protected static final int COLUMNS
protected static final char LPAREN
protected static final char RPAREN
protected static final char LBRACE
protected static final char RBRACE
protected static final char LBRACKET
protected static final char RBRACKET
protected static final int NILFLAGS
protected static final int PERLINE
protected static final int NONAME
protected static final int NONNIL
protected java.io.PrintWriter writer
protected IndentWriter printer
protected DSP dsp
protected CEConstraint ce
protected java.util.EnumSet<DSPPrinter.Flags> flags
protected DSPPrinter()
public DSPPrinter(DSP dsp, java.io.Writer writer)
public DSPPrinter(DSP dsp, CEConstraint ce, java.io.Writer writer)
public DSPPrinter flag(DSPPrinter.Flags flag)
public DSPPrinter flush()
public DSPPrinter close()
public DSPPrinter print() throws DapException
DapExceptionprotected void printVariable(DataCursor data, java.util.List<Slice> slices) throws DapException
Handling newlines is a bit tricky so the rule is that the last newline is elided and left for the caller to print. Exceptions: ?
data - - the cursor to printDapException - Note that the PrintWriter and CEConstraint are global.protected void printScalar(DataCursor data) throws DapException
DapExceptionprotected void printArray(DataCursor data, java.util.List<Slice> slices) throws DapException
DapExceptionprotected void printAtomicVector(DataCursor data, java.util.List<Slice> slices, Odometer odom) throws DapException
DapExceptionprotected void printAtomicInstance(DataCursor datav, Index pos) throws DapException
DapExceptionprotected void printCompoundInstance(DataCursor datav) throws DapException
datav - DapExceptionprotected java.lang.String indicesToString(Index indices) throws DapException
DapExceptionprotected java.lang.String valueString(java.lang.Object vector,
long pos,
DapType basetype)
throws DapException
DapExceptionprotected static char hexchar(int i)
protected static java.lang.String getPrintValue(java.lang.Object value)