|
sdr 0.21 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.cscott.sdr.CommandInput
public class CommandInput
CommandInput
implements the communication between some mechanism
for inputting commands (voice recognition, keyboard input, file on disk,
etc) and the rest of the SDR system. In particular, we give the
CommandInput
to the input mechanisms, and our App
class will deal with polling it for commands and feeding them to the
choreography engine and then to the animation system.
Note that a command is actually a lazy list of possible commands, ordered from most-likely to least-likely. We'll try each possibility and take the first one that works.
Nested Class Summary | |
---|---|
static class |
CommandInput.PossibleCommand
A CommandInput.PossibleCommand is an Apply corresponding to
the most likely interpretation of the user's input. |
Constructor Summary | |
---|---|
CommandInput()
Create a CommandInput object to synchronize communication between input routines and the choreography engine. |
Method Summary | |
---|---|
void |
addCommand(CommandInput.PossibleCommand c)
Called by input methods (voice recognition, keyboard input, filer readers, etc) when they have another (set of) CommandInput.PossibleCommand (s) to issue. |
CommandInput.PossibleCommand |
commandFromUnparsed(DanceState ds,
String userInput,
long startTime,
long endTime,
CommandInput.PossibleCommand next)
Create a PossibleCommand from an unparsed user input, along with the 'next worst' PossibleCommand. |
CommandInput.PossibleCommand |
getNextCommand()
Called by the main code to get the next command from the input method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandInput()
Method Detail |
---|
public void addCommand(CommandInput.PossibleCommand c)
CommandInput.PossibleCommand
(s) to issue.
public CommandInput.PossibleCommand getNextCommand() throws InterruptedException
InterruptedException
public CommandInput.PossibleCommand commandFromUnparsed(DanceState ds, String userInput, long startTime, long endTime, CommandInput.PossibleCommand next)
|
sdr 0.21 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |