org.lsst.ccs.utilities.sa
Class CmndProc.Command

java.lang.Object
  extended by org.lsst.ccs.utilities.sa.CmndProc.Command
Enclosing class:
CmndProc

public static class CmndProc.Command
extends java.lang.Object

Inner class to implement command decoding


Constructor Summary
CmndProc.Command(int count)
          Constructor
 
Method Summary
 void add(java.lang.String command, int code, java.lang.String[] help)
          Add a command to the table
 int code(int index)
          Get the code for a command, given its index
 int count()
          Get the number of commands
 void disable(int index)
          Disable a command, given its index
 int find(java.lang.String command)
          Get the index of a command, given its name This routine compares the command string with the first part of all the table entries and returns one of the following: index (>= 0) If the command is fully matched CMD_UNKNOWN If the command is not in the table CMD_AMBIG If the command matches more than one entry CMD_AMBIG - 1 - index If the command is partially matched
 java.lang.String[] help(int index)
          Get the help for a command, given its index
 java.lang.String name(int index)
          Get the name of a command, given its index
 void showHelp(int index)
          Show help for a command, given its index
 void showHelpSumm(java.lang.String command)
          Show help summary for matching commands
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmndProc.Command

public CmndProc.Command(int count)
Constructor

Method Detail

add

public void add(java.lang.String command,
                int code,
                java.lang.String[] help)
Add a command to the table


count

public int count()
Get the number of commands


find

public int find(java.lang.String command)
Get the index of a command, given its name This routine compares the command string with the first part of all the table entries and returns one of the following: index (>= 0) If the command is fully matched CMD_UNKNOWN If the command is not in the table CMD_AMBIG If the command matches more than one entry CMD_AMBIG - 1 - index If the command is partially matched


disable

public void disable(int index)
Disable a command, given its index


name

public java.lang.String name(int index)
Get the name of a command, given its index


code

public int code(int index)
Get the code for a command, given its index


help

public java.lang.String[] help(int index)
Get the help for a command, given its index


showHelp

public void showHelp(int index)
Show help for a command, given its index


showHelpSumm

public void showHelpSumm(java.lang.String command)
Show help summary for matching commands



Copyright © 2012 LSST. All Rights Reserved.