agg.attribute.impl
Class CondMember

java.lang.Object
  extended by agg.attribute.impl.AttrObject
      extended by agg.attribute.impl.Member
          extended by agg.attribute.impl.ValueMember
              extended by agg.attribute.impl.CondMember
All Implemented Interfaces:
AttrConditionMember, AttrInstanceMember, AttrMember, AttrMsgCode, XMLObject, java.io.Serializable, java.util.Observer

public class CondMember
extends ValueMember
implements AttrConditionMember

Class for members of condition tuples that are used as application conditions in a context. This is an extension of ValueMember.

See Also:
Serialized Form

Field Summary
static int LHS
           
static int NAC
           
static int NAC_LHS
           
static int NAC_PAC
           
static int NAC_PAC_LHS
           
static int PAC
           
static int PAC_LHS
           
static int RHS
           
 
Fields inherited from class agg.attribute.impl.ValueMember
currentException, decl, EMPTY_VALUE_SYMBOL, errorMsg, expression, expressionObject, expressionText, isTransient, tuple
 
Fields inherited from class agg.attribute.impl.AttrObject
classHandlerExpr, classObject, classString, initialized
 
Fields inherited from interface agg.attribute.impl.AttrMsgCode
ATTR_DONT_MATCH, BAD_EXPR_TYPE, EXPR_EVAL_ERR, EXPR_MUST_BE_CONST, EXPR_MUST_BE_CONST_OR_VAR, EXPR_PARSE_ERR, EXPR_REQUIRED, MATCH_TARGETS_DIFFER, NAME_DUPLICATION, NO_SUCH_NAME, NO_SUCH_TYPE, OK, RULE_SOURCES_DIFFER, VAR_NOT_DECLARED
 
Constructor Summary
CondMember(CondTuple tuple, DeclMember decl)
          Creating a new instance with the specified type.
 
Method Summary
 boolean areVariablesSet()
           
 void copy(ValueMember fromInstance)
          copy the contents of a single entry instance into another.
 void delete()
          Removes this member from its tuple.
 java.util.Vector<java.lang.String> getAllVariables()
          Return a vector with names of used declared variables.
 int getMark()
           
 boolean isDefinite()
          Test, if the expression can yield true or false.
 boolean isEnabled()
           
 boolean isEvaluable(VarTuple vars)
           
 boolean isFalse()
          Test, if this condition can be evaluated and yield 'false'.
 boolean isTrue()
          Test, if the expression yields true.
 void setEnabled(boolean b)
           
 void setMark(int m)
          The mark m marks that this condition member, for example, is a condition of a NAC.
 void setName(java.lang.String n)
           
 void XreadObject(XMLHelper h)
           
 void XwriteObject(XMLHelper h)
           
 
Methods inherited from class agg.attribute.impl.ValueMember
apply, apply, apply, apply, canMatchTo, checkInContext, checkValidity, checkValidity, compareTo, equals, getAllVariableNamesOfExpression, getAttrHandlerExceptionMsg, getChildrenOfExpression, getContext, getDecl, getDeclaration, getErrorMsg, getExpr, getExprAsObject, getExprAsText, getHandler, getHoldingTuple, getName, getTuple, getType, getValidityReport, isEmpty, isSet, isTransient, isValid, matchTo, rawGetExpr, rawSetExpr, rawSetExprAsObject, rawSetExprAsText, setCheckedExpr, setExpr, setExprAsEvaluatedText, setExprAsObject, setExprAsText, setTransient, toString, typeChanged
 
Methods inherited from class agg.attribute.impl.Member
fireChanged, getIndexInTuple
 
Methods inherited from class agg.attribute.impl.AttrObject
defaultToString, err, err, getInstRepr, log, log, log, logEnteredMethod, logPrintln, logPrintln, stdoutPrintOnEnter, stdoutPrintOnExit, update, warn, warn, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface agg.attribute.AttrInstanceMember
getDeclaration, getExpr, getExprAsObject, getExprAsText, isSet, setExpr, setExprAsEvaluatedText, setExprAsObject, setExprAsText
 
Methods inherited from interface agg.attribute.AttrMember
getHoldingTuple, getIndexInTuple, getName, getValidityReport, isValid
 

Field Detail

LHS

public static final int LHS
See Also:
Constant Field Values

RHS

public static final int RHS
See Also:
Constant Field Values

NAC

public static final int NAC
See Also:
Constant Field Values

PAC

public static final int PAC
See Also:
Constant Field Values

NAC_LHS

public static final int NAC_LHS
See Also:
Constant Field Values

PAC_LHS

public static final int PAC_LHS
See Also:
Constant Field Values

NAC_PAC

public static final int NAC_PAC
See Also:
Constant Field Values

NAC_PAC_LHS

public static final int NAC_PAC_LHS
See Also:
Constant Field Values
Constructor Detail

CondMember

public CondMember(CondTuple tuple,
                  DeclMember decl)
Creating a new instance with the specified type.

Parameters:
tuple - Instance tuple that this value is a member of.
decl - Declaration for this member.
Method Detail

copy

public void copy(ValueMember fromInstance)
copy the contents of a single entry instance into another.

Overrides:
copy in class ValueMember

delete

public void delete()
Removes this member from its tuple.

Specified by:
delete in interface AttrConditionMember

areVariablesSet

public boolean areVariablesSet()

isDefinite

public boolean isDefinite()
Test, if the expression can yield true or false.

Specified by:
isDefinite in interface AttrConditionMember

isTrue

public boolean isTrue()
Test, if the expression yields true.

Specified by:
isTrue in interface AttrConditionMember

setEnabled

public void setEnabled(boolean b)

isEnabled

public boolean isEnabled()

isFalse

public boolean isFalse()
Test, if this condition can be evaluated and yield 'false'.


isEvaluable

public boolean isEvaluable(VarTuple vars)

getAllVariables

public java.util.Vector<java.lang.String> getAllVariables()
Return a vector with names of used declared variables.


setMark

public void setMark(int m)
The mark m marks that this condition member, for example, is a condition of a NAC. The possible marks are: CondMember.LHS, CondMember.NAC, CondMember.PAC, CondMember.NAC_LHS, CondMember.PAC_LHS, CondMember.NAC_PAC, CondMember.NAC_PAC_LHS.

See Also:
CondMember

getMark

public int getMark()

setName

public void setName(java.lang.String n)

XwriteObject

public void XwriteObject(XMLHelper h)
Specified by:
XwriteObject in interface XMLObject
Overrides:
XwriteObject in class ValueMember

XreadObject

public void XreadObject(XMLHelper h)
Specified by:
XreadObject in interface XMLObject
Overrides:
XreadObject in class ValueMember