weiman.transformations
Class StateFileManager

java.lang.Object
  extended by weiman.transformations.StateFileManager

public class StateFileManager
extends java.lang.Object

THIS CLASS IS A SINGLETON This class interfaces StateMemory data weiman.transformations and the file structure. - Storage and Retrieval of said files, parsing of said files - Printing of said memory and said files - File data structure stored in MyDocuments: name angles delta waveX waveY waveZ scales [ str, [[d, d, d, d, d, d], [d, d, d], [d, d, d], [d, d, d], [d, d]] ] where str must NOT be null, d = double, i = int (data structure is application/interpretation agnostic) Parsing is sufficiently flexible to apply to arbitrary lengths and numbers of inner lists.

Date: Nov 14, 2006 Time: 8:18 AM Copyright Carl Weiman, Nov 14, 2006


Method Summary
 java.util.ArrayList fileToMemory(int _numAngle, int _numWaveX, int _numWaveY, int _numWaveZ, int _numScale)
           
static StateFileManager getStateFileManager()
           
 java.util.ArrayList getStateMemory()
           
static void main(java.lang.String[] args)
           
 java.util.ArrayList parseStateFile(java.util.ArrayList _stateStringMemory)
           
 void readFile()
           
 java.util.ArrayList readStateFileToStringList()
          Reads a state file
 void setStateMemory(java.util.ArrayList stateMemory)
           
 java.lang.String toStringFromMemory()
           
 void writeMemoryToFile(java.util.ArrayList keyFrameMemory)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStateFileManager

public static StateFileManager getStateFileManager()

readStateFileToStringList

public java.util.ArrayList readStateFileToStringList()
Reads a state file

Returns:
into an ArrayList of Strings: [str1, str2, str3] where each string is the toString of a named state

fileToMemory

public java.util.ArrayList fileToMemory(int _numAngle,
                                        int _numWaveX,
                                        int _numWaveY,
                                        int _numWaveZ,
                                        int _numScale)
Parameters:
_numAngle - - a hack giving the number of angle sliders
_numWaveX, - Y, Z - a hack giving the number of wave sliders
_numScale - - a hack giving the number of scale sliders
Returns:
- Actual memory load for StateMemoryControl

parseStateFile

public java.util.ArrayList parseStateFile(java.util.ArrayList _stateStringMemory)
Parameters:
_stateStringMemory - - Each element of list is a single string of one named state todo - this parse is a copout. Should use parse stack via nested brackets todo - There must be a java class which inverts ArrayList.toString()???
Returns:
outputList is an entire memory load for processing!

writeMemoryToFile

public void writeMemoryToFile(java.util.ArrayList keyFrameMemory)

toStringFromMemory

public java.lang.String toStringFromMemory()

readFile

public void readFile()

main

public static void main(java.lang.String[] args)

getStateMemory

public java.util.ArrayList getStateMemory()

setStateMemory

public void setStateMemory(java.util.ArrayList stateMemory)