org.stellarium.command
Class StelCommandInterface

java.lang.Object
  extended by org.stellarium.command.CommandInterface
      extended by org.stellarium.command.StelCommandInterface

public class StelCommandInterface
extends CommandInterface

Version:
0.8.2
Author:
Jérôme Beau, Fred Simon
See Also:
stel_command_interface.h, stel_command_interface.cpp

Nested Class Summary
(package private) static class StelCommandInterface.SetFlagReturns
           
 
Field Summary
private  Audio audio
          for audio track from script
private  StelApp stapp
           
private  StelCore stcore
           
 
Constructor Summary
StelCommandInterface(StelCore core, StelApp someApp)
           
 
Method Summary
(package private)  java.lang.String doubleToStr(double dbl)
           
 void executeCommand(java.lang.String commandline)
           
 void executeCommand(java.lang.String command, boolean arg)
          for easy calling of simple commands with a boolean as last argument value
 void executeCommand(java.lang.String command, double arg)
          for easy calling of simple commands with a double as last argument value
 void executeCommand(java.lang.String command, int arg)
          for easy calling of simple commands with a int as last argument value
(package private)  long executeCommand(java.lang.String commandline, long wait, boolean trusted)
          Called by script executors

- TODO details TBD when needed

private  StelCommandInterface.SetFlagReturns setFlag(java.lang.String name, java.lang.String value, boolean trusted)
           
(package private)  double strToDouble(java.lang.String str)
           
(package private)  int strToInt(java.lang.String str)
           
 void update(int deltaTime)
           
 
Methods inherited from class org.stellarium.command.CommandInterface
main, parseCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stcore

private StelCore stcore

stapp

private StelApp stapp

audio

private Audio audio
for audio track from script

Constructor Detail

StelCommandInterface

public StelCommandInterface(StelCore core,
                            StelApp someApp)
Method Detail

executeCommand

public void executeCommand(java.lang.String commandline)
                    throws StellariumException
Specified by:
executeCommand in class CommandInterface
Throws:
StellariumException

executeCommand

public void executeCommand(java.lang.String command,
                           double arg)
                    throws StellariumException
for easy calling of simple commands with a double as last argument value

Throws:
StellariumException

executeCommand

public void executeCommand(java.lang.String command,
                           int arg)
                    throws StellariumException
for easy calling of simple commands with a int as last argument value

Throws:
StellariumException

executeCommand

public void executeCommand(java.lang.String command,
                           boolean arg)
                    throws StellariumException
for easy calling of simple commands with a boolean as last argument value

Throws:
StellariumException

executeCommand

long executeCommand(java.lang.String commandline,
                    long wait,
                    boolean trusted)
              throws StellariumException
Called by script executors

- TODO details TBD when needed

Parameters:
commandline -
wait -
trusted - Some key settings can't be modified by scripts unless they are "trusted"
Returns:
The new wait time
Throws:
StellariumException - If the command was not understood

setFlag

private StelCommandInterface.SetFlagReturns setFlag(java.lang.String name,
                                                    java.lang.String value,
                                                    boolean trusted)

update

public void update(int deltaTime)

strToDouble

double strToDouble(java.lang.String str)

strToInt

int strToInt(java.lang.String str)

doubleToStr

java.lang.String doubleToStr(double dbl)