POGO Java Program


pogo.gene
Class DevStateTable

java.lang.Object
  |
  +--pogo.gene.DevStateTable

public class DevStateTable
extends java.lang.Object
implements PogoDefs

This class is a just a vector containing the DevState objects, for the PogoClass object.

Version:
$Revision: 1.22 $
Author:
$Author: verdier $
See Also:
Vector

Field Summary
 java.util.Vector vect
           
 
Fields inherited from interface pogo.gene.PogoDefs
ALREADY_OVERRIDING, ATTR_IMAGE, ATTR_READ, ATTR_READ_WITH_WRITE, ATTR_READ_WRITE, ATTR_SCALAR, ATTR_SPECTRUM, ATTR_WRITE, AttrDataArray, AttrRWtypeArray, AttrTypeArray, authorRes, classDescRes, cppAddAttrib, cppAddCommands, cppExtention, cppFile, cppLang, dataCommands, dataExtention, dataFile, dataStartCmd, dataStartStates, endGeneTag, errDetected, javaAddAttrib, javaAddCommands, javaExtention, javaFile, javaLang, languageRes, NEW_STR, NOT_OVERRIDE, outputFiles, OVERRIDE, pageTitleRes, pogoLang, projectTitleRes, readAttrProto1, readAttrProto2, readAttrProto3, readFile, revisionRes, startGeneTag, STATE, statesDescRes, STATUS, Tango_ALARM, Tango_CLOSE, Tango_CONST_DEV_STRING, Tango_DISABLE, Tango_EXTRACT, Tango_FAULT, Tango_INSERT, Tango_MOVING, Tango_OFF, Tango_ON, Tango_OPEN, Tango_RUNNING, Tango_STANDBY, Tango_TYPE_UNKNOWN, Tango_UNKNOWN, Tango_WARMUP, TangoStatesArray, templateBlock, templateClass, templateClassCmd, templateCmd, templateExecuteCmd, templateFile, writeAttrProto, writeFile
 
Constructor Summary
DevStateTable()
          Default constructs for DevStateTable object.
DevStateTable(java.lang.String filename)
          Constructor for State Table from an input file (.pogo, .cpp or .java).
DevStateTable(java.util.Vector v_in)
          Constructor for State Table from a java.util.Vector class.
 
Method Summary
 void addElement(DevState st)
          Add a new DevState in the vector.
 void clear()
           
 DevState elementAt(int idx)
          Return a the state class for an index.
 void remove(DevState st)
           
 int size()
          Return the number of elements in the vector.
 java.lang.String toString()
          Build a String including state name and descrition.
 java.lang.String toStringComments()
          Build a String including state name and descrition in comments.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

vect

public java.util.Vector vect
Constructor Detail

DevStateTable

public DevStateTable()
Default constructs for DevStateTable object.

DevStateTable

public DevStateTable(java.util.Vector v_in)
Constructor for State Table from a java.util.Vector class.
Parameters:
v_in - The input commands vector to be copied.

DevStateTable

public DevStateTable(java.lang.String filename)
              throws java.io.FileNotFoundException,
                     java.lang.SecurityException,
                     java.io.IOException,
                     PogoException
Constructor for State Table from an input file (.pogo, .cpp or .java).
Parameters:
filename - Name of the file to read states list and decriptions.
Throws:
java.io.FileNotFoundException - if occured when reading file.
java.lang.SecurityException - if occured when reading file.
java.io.IOException - if occured when reading file.
PogoException - if a synthax error occured when reading file.
Method Detail

addElement

public void addElement(DevState st)
Add a new DevState in the vector.
Parameters:
st - DevState to be added.

elementAt

public DevState elementAt(int idx)
Return a the state class for an index.
Parameters:
idx - Index of the state.
Returns:
DevState class of this index.

size

public int size()
Return the number of elements in the vector.
Returns:
the number of elements in the vector.

clear

public void clear()

remove

public void remove(DevState st)

toString

public java.lang.String toString()
Build a String including state name and descrition.
Overrides:
toString in class java.lang.Object
Returns:
A String containing name and description for the all states in the vector.

toStringComments

public java.lang.String toStringComments()
Build a String including state name and descrition in comments.
Returns:
A String containing name and description for the all states in the vector. Each line is in comments.

POGO Java Program