gov.nasa.arc.brahms.common.rt
Interface IAreaCtx

All Superinterfaces:
IBrahmsObjectCtx, IConceptCtx
All Known Implementing Classes:
AreaCtx, VMAreaCtx

public interface IAreaCtx
extends IConceptCtx

The IAreaCtx interface is the interface for the runtime representation of areas defined in a Brahms model. The area context manages the creation and deletion time of the areas. Area contexts are also used to trace the traveled path of an active instance. In the case an area context is used to define a traveled path the start and end time represent the time the active instance arrived in the area and when the active instance left the area. The area context also manages a list of the active instances present in the location.

Version:
8 August 2000
Author:
Ron van Hoof

Method Summary
 void addInhabitant(ActiveInstanceCtx inhabitant)
          Adds the specified active instance to this location as an inhabitant
 java.util.Enumeration getInhabitants()
          Returns a list of all the inhabitants in this location
 boolean isInhabitant(ActiveInstanceCtx inhabitant)
          Returns whether or not the specified inhabitant is an inhabitant of this area.
 void removeAllInhabitants()
          Removes all inhabitants from this area.
 void removeInhabitant(ActiveInstanceCtx inhabitant)
          Removes the specified active instance from this location as an inhabitant
 
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime
 

Method Detail

addInhabitant

void addInhabitant(ActiveInstanceCtx inhabitant)
                   throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified active instance to this location as an inhabitant

Parameters:
inhabitant - the active instance to be added
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null inhabitant is specified

removeInhabitant

void removeInhabitant(ActiveInstanceCtx inhabitant)
                      throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the specified active instance from this location as an inhabitant

Parameters:
inhabitant - the active instance to be removed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null inhabitant is specified, if no inhabitants are present in the location or if the inhabitant is not found

isInhabitant

boolean isInhabitant(ActiveInstanceCtx inhabitant)
Returns whether or not the specified inhabitant is an inhabitant of this area. Returns true if it is, false if not.

Parameters:
inhabitant - the inhabitant to be tested
Returns:
boolean true if the specified inhabitant is an inhabitant of this area, false otherwise

getInhabitants

java.util.Enumeration getInhabitants()
Returns a list of all the inhabitants in this location

Returns:
Enumeration an enumeration of ActiveInstanceCtx

removeAllInhabitants

void removeAllInhabitants()
Removes all inhabitants from this area.



Copyright © 1997-2012 All Rights Reserved.