|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.swri.swiftvis.sources.AbstractSource
edu.swri.swiftvis.sources.BinaryPositionData
public class BinaryPositionData
This class represents a data file for the binary data output. Currently this uses the format for the old SWIFT and not for SWIFTER. That should probably be left as an option.
Nested Class Summary | |
---|---|
private static class |
BinaryPositionData.PositionElementPair
|
Field Summary | |
---|---|
private BinaryInput |
bis
|
private int |
coordinates
|
private static int |
ELEMENT_SIZE
|
private EditableDouble |
endRange
|
private java.util.List<BinaryPositionData.PositionElementPair> |
filePositions
|
private java.io.File |
fileToRead
|
private int |
maxAllowed
The number of elements to hold in memory at one time. |
private int |
offset
|
private EditableInt |
oneIn
|
private int |
program
|
private java.io.RandomAccessFile |
raf
|
private int |
saveFormat
|
private static long |
serialVersionUID
|
private EditableDouble |
startRange
|
private static int |
SWIFT
|
private static int |
SWIFTER
|
private int |
totalElements
|
private EditableBoolean |
useRange
|
Fields inherited from class edu.swri.swiftvis.sources.AbstractSource |
---|
dataVect, propPanel, sinkVector |
Constructor Summary | |
---|---|
BinaryPositionData()
|
|
BinaryPositionData(BinaryPositionData c,
java.util.List<GraphElement> l)
|
Method Summary | |
---|---|
BinaryPositionData |
copy(java.util.List<GraphElement> l)
|
java.lang.String |
getDescription()
|
DataElement |
getElement(int i)
Returns the specified data element for this source. |
int |
getNumElements()
Returns the number of data elements that this source has in it. |
int |
getNumParameters()
|
int |
getNumValues()
|
java.lang.String |
getParameterDescription(int which)
Tells you what a particular parameter is used for. |
java.lang.String |
getParameterName(int which,
int paramVal)
Tells you the text that should be used to describe a particular value of a given parameter. |
static java.lang.String |
getTypeDescription()
|
java.lang.String |
getValueDescription(int which)
Tells you what a particular value is used for. |
private void |
readFile()
|
private float |
readReal()
|
private int |
readTimestep(int[] paramArray,
float[] valueArray,
boolean store)
This reads in a single timestep. |
protected void |
redoAllElements()
|
private void |
redoBuffer(int elemNum)
|
private void |
selectFile()
|
protected void |
setupSpecificPanelProperties()
|
java.lang.String |
toString()
|
boolean |
useParameterNameString(int which)
If this returns true then the value of a parameter for this type should be listed as the strong value returned by getParameterName. |
Methods inherited from class edu.swri.swiftvis.sources.AbstractSource |
---|
abstractRedoAllElements, addOutput, clearData, getBounds, getNumOutputs, getOutput, getOutputInfoPanel, getPaint, getPropertiesPanel, notifySinks, relink, removeOutput, setBounds |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int program
private int coordinates
private int saveFormat
private EditableInt oneIn
private EditableBoolean useRange
private EditableDouble startRange
private EditableDouble endRange
private int maxAllowed
private int offset
private java.io.File fileToRead
private int totalElements
private static final int ELEMENT_SIZE
private transient BinaryInput bis
private transient java.io.RandomAccessFile raf
private transient java.util.List<BinaryPositionData.PositionElementPair> filePositions
private static final int SWIFT
private static final int SWIFTER
private static final long serialVersionUID
Constructor Detail |
---|
public BinaryPositionData()
public BinaryPositionData(BinaryPositionData c, java.util.List<GraphElement> l)
Method Detail |
---|
public java.lang.String getDescription()
public static java.lang.String getTypeDescription()
public java.lang.String toString()
toString
in class java.lang.Object
protected void setupSpecificPanelProperties()
setupSpecificPanelProperties
in class AbstractSource
public java.lang.String getParameterDescription(int which)
public boolean useParameterNameString(int which)
public java.lang.String getParameterName(int which, int paramVal)
public java.lang.String getValueDescription(int which)
public int getNumParameters()
public int getNumValues()
public DataElement getElement(int i)
DataSource
getElement
in interface DataSource
getElement
in class AbstractSource
i
- Which data element to return. Should be between 0 and getNumElements()-1.
public int getNumElements()
getNumElements
in interface DataSource
getNumElements
in class AbstractSource
public BinaryPositionData copy(java.util.List<GraphElement> l)
protected void redoAllElements()
redoAllElements
in class AbstractSource
private void selectFile()
private void readFile()
private float readReal() throws java.io.IOException
java.io.IOException
private int readTimestep(int[] paramArray, float[] valueArray, boolean store) throws java.io.IOException
paramArray
- An array of two ints. Passed for speed.valueArray
- An array of 7 floats. Passed for speed.
java.io.IOException
- This signals that the end of the file has been reached.private void redoBuffer(int elemNum)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |