parsedtree
Class ParticipantsInScope

java.lang.Object
  extended byparsedtree.ParticipantsInScope

public class ParticipantsInScope
extends java.lang.Object

This class keeps a list of names that are valid participants. At the start of a figure, it is set to the list of participants to the figure. (The local names are stored). As units are formed and disbanded, these are added and removed from this list. Thus at any point of time it contains the list of names that are valid participants in moves and figures.

People are still in the list even if they are currently in a unit, so technically they are not valid participants. However such errors are detected by the caller and this gives a better error message.


Constructor Summary
ParticipantsInScope()
           
 
Method Summary
 void addParticipant(BaseParticipantDefinition newParticipant)
          DOCUMENT ME!
 BaseParticipantDefinition getParticipant(java.lang.String name)
          DOCUMENT ME!
 BaseParticipantDefinition removeUnit(java.lang.String name)
          Finds, removes, and returns a participant from the list of participants in scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParticipantsInScope

public ParticipantsInScope()
Method Detail

addParticipant

public void addParticipant(BaseParticipantDefinition newParticipant)
                    throws org.xml.sax.SAXException
DOCUMENT ME!

Parameters:
newParticipant - DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!

getParticipant

public BaseParticipantDefinition getParticipant(java.lang.String name)
                                         throws org.xml.sax.SAXException
DOCUMENT ME!

Parameters:
name - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!

removeUnit

public BaseParticipantDefinition removeUnit(java.lang.String name)
                                     throws org.xml.sax.SAXException
Finds, removes, and returns a participant from the list of participants in scope. This method is called when a unit is disbanded.

Parameters:
name - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!


Copyright © 2003 Nigel Westbury