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

All Superinterfaces:
IBrahmsObjectCtx, IConditionCtx
All Known Implementing Classes:
ConsequenceCtx, VMConsequenceCtx

public interface IConsequenceCtx
extends IConditionCtx

The IConsequenceCtx is the interface for consequence contexts defining the context for a fired consequence defining the consequence that was fired, what frame fired the consequence and defining what beliefs and/or facts were created by the consequence.

Version:
10 November 1999
Author:
Ron van Hoof

Method Summary
 void addCreatedStatement(IStatementCtx statement)
          Adds the specified statement (belief or fact) as a statement created by this consequence.
 void addUsedVariable(VariableCtx var)
          Adds the specified variable as a variable used by this consequence.
 java.util.Enumeration getCreatedStatements()
          Returns a list of all the statements (facts and beliefs) created by this consequence.
 IFrameCtx getParent()
          Returns the parent frame context in which this consequence is fired.
 java.util.Enumeration getUsedVariables()
          Returns a list of all the variables used by this consequence.
 void removeCreatedStatement(IStatementCtx statement)
          Removes the specified statement (belief or fact) as a statement created by this consequence.
 void removeUsedVariable(VariableCtx var)
          Removes the specified variable as a variable used by this consequence.
 void setParent(IFrameCtx parent)
          Sets the parent frame context in which this consequence is fired.
 
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 consequence is fired.

Parameters:
parent - the IFrameCtx in which the consequence is fired
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 consequence is fired.

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

addCreatedStatement

void addCreatedStatement(IStatementCtx statement)
                         throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified statement (belief or fact) as a statement created by this consequence.

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

removeCreatedStatement

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

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

getCreatedStatements

java.util.Enumeration getCreatedStatements()
                                           throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns a list of all the statements (facts and beliefs) created by this consequence.

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

addUsedVariable

void addUsedVariable(VariableCtx var)
                     throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Adds the specified variable as a variable used by this consequence.

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

removeUsedVariable

void removeUsedVariable(VariableCtx var)
                        throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Removes the specified variable as a variable used by this consequence.

Parameters:
var - the variable (VariableCtx) 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

getUsedVariables

java.util.Enumeration getUsedVariables()
                                       throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
Returns a list of all the variables used by this consequence.

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


Copyright © 1997-2012 All Rights Reserved.