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

All Superinterfaces:
IBrahmsObjectCtx, IConditionCtx
All Known Implementing Classes:
PreconditionCtx, VMPreconditionCtx

public interface IPreconditionCtx
extends IConditionCtx

The IPreconditionCtx is the interface for precondition contexts that defines the beliefs or facts that made the precondition evaluate to true, the variables it bound and the frame for which the precondition evaluated to true.

Version:
1 August 2000
Author:
Ron van Hoof

Method Summary
 void addBoundVariable(IVariableCtx var)
          Adds the specified variable as a variable bound by this precondition.
 void addEvaluatedStatement(IStatementCtx statement)
          Adds the specified statement (belief or fact) as a statement evaluated by this precondition causing this precondition to evaluate to true.
 java.util.Enumeration getBoundVariables()
          Returns a list of all the variables bound by this precondition.
 java.util.Enumeration getEvaluatedStatements()
          Returns a list of all the statements (facts or beliefs) evaluated by this precondition to result in the precondition evaluating to true.
 IFrameCtx getParent()
          Returns the parent frame context in which this precondition is evaluated.
 void removeBoundVariable(IVariableCtx var)
          Removes the specified variable as a variable bound by this precondition.
 void removeEvaluatedStatement(IStatementCtx statement)
          Removes the specified statement (belief or fact) as a statement evaluated by this precondition.
 void setParent(IFrameCtx parent)
          Sets the parent frame context in which this precondition is evaluated.
 
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime
 

Method Detail

setParent

void setParent(IFrameCtx parent)
               throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Sets the parent frame context in which this precondition is evaluated.

Parameters:
parent - the IFrameCtx in which the precondition is evaluated.
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if a null parent is specified

getParent

IFrameCtx getParent()
                    throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns the parent frame context in which this precondition is evaluated.

Returns:
IFrameCtx the parent frame in which the precondition is evaluated.
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if no parent is specified

addEvaluatedStatement

void addEvaluatedStatement(IStatementCtx statement)
                           throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified statement (belief or fact) as a statement evaluated by this precondition causing this precondition to evaluate to true.

Parameters:
statement - the statement (IBeliefCtx or IFactCtx) to be added
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if statement is null

removeEvaluatedStatement

void removeEvaluatedStatement(IStatementCtx statement)
                              throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the specified statement (belief or fact) as a statement evaluated by this precondition.

Parameters:
statement - the statement to be removed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if statement is null, no statements are present, or the statements is not found

getEvaluatedStatements

java.util.Enumeration getEvaluatedStatements()
                                             throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns a list of all the statements (facts or beliefs) evaluated by this precondition to result in the precondition evaluating to true.

Returns:
Enumeration an enumeration of IBeliefCtx or IFactCtx
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if there are no statements

addBoundVariable

void addBoundVariable(IVariableCtx var)
                      throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified variable as a variable bound by this precondition.

Parameters:
var - the variable (IVariableCtx) to be added
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if var is null

removeBoundVariable

void removeBoundVariable(IVariableCtx var)
                         throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the specified variable as a variable bound by this precondition.

Parameters:
var - the variable (IVariableCtx) to be removed
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if variable is null, no variables are present, or the variable is not found

getBoundVariables

java.util.Enumeration getBoundVariables()
                                        throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns a list of all the variables bound by this precondition.

Returns:
Enumeration an enumeration of IVariableCtx
Throws:
gov.nasa.arc.brahms.common.exceptions.BrahmsException - if there are no variables


Copyright © 1997-2012 All Rights Reserved.