/// /// <summary> * set PreflightAction/@SetRef to the value of test/@ID /// * </summary> /// * <param name="test"> /// * the test to use </param> /// public virtual void setPreflightActionSetRef(JDFTest test) { test.appendAnchor(null); // just in case it is missing string id2 = test.getID(); getCreatePreflightAction(0).setSetRef(id2); }
/// /// <summary> * append element <code>Test</code> /// * </summary> /// * <param name="term"> /// * type of term to append to this test </param> /// * <returns> JDFTest - the appended element /// * </returns> /// public virtual JDFTest appendTestTerm(EnumTerm term) { JDFTest test = appendTest(); test.appendTerm(term); return(test); }
/// /// <summary> * set testRef to the value of test/@ID /// * </summary> /// * <param name="test"> /// * the value to set testRef to </param> /// public virtual void setTest(JDFTest test) { test.appendAnchor(null); // just in case it is missing string id2 = test.getID(); setTestRef(id2); }
/// /// <summary> * append an action to this that references a Test with a term of type term /// * in the parallel TestPool /// * </summary> /// * <param name="term"> /// * the type of term in the test </param> /// * <param name="setTerm"> /// * the term referenced by PreflightAction@SetRef </param> /// * <param name="bActionFailsOnTestTrue"> /// * if true the term is linked directly, if false a the term is /// * inverted by enclosing it in a <not> term note that the setTest /// * always MUST be true to evaluate. /// * </param> /// * <returns> the newly created action </returns> /// public virtual JDFAction appendActionSetTest(EnumTerm term, EnumTerm setTerm, bool bActionFailsOnTestTrue) { JDFAction action = appendActionTest(term, bActionFailsOnTestTrue); JDFTestPool testPool = (JDFTestPool)getParentNode_KElement().getCreateElement(ElementName.TESTPOOL); JDFTest setTest = testPool.appendTestTerm(setTerm); action.setPreflightActionSetRef(setTest); return(action); }
/// /// <summary> * get the term defined by PreflightAction/@SetRef /// * </summary> /// * <returns> JDFTerm: the term to use </returns> /// public virtual JDFTerm getPreflightActionSetTerm() { JDFTest test = getPreflightActionSetRef(); if (test == null) { return(null); } return(test.getTerm()); }
/// /// <summary> * get the root Term of the Test element in the TestPool that is referenced /// * by this action /// * </summary> /// * <returns> JDFTerm: the referenced term, null if none exists </returns> /// public virtual JDFTerm getTestTerm() { JDFTest test = getTest(); if (test == null) { return(null); } return(test.getTerm(null, 0)); }
/// /// <summary> * append an action to this that references a Test with a term of type term /// * in the parallel TestPool /// * </summary> /// * <param name="term"> /// * the type of term in the test </param> /// * <param name="bActionFailsOnTestTrue"> /// * if true the term is linked directly, if false a the term is /// * inverted by enclosing it in a <not> term </param> /// public virtual JDFAction appendActionTest(EnumTerm term, bool bActionFailsOnTestTrue) { JDFAction action = appendAction(); JDFTestPool testPool = (JDFTestPool)getParentNode_KElement().getCreateElement(ElementName.TESTPOOL); JDFTest test = null; if (bActionFailsOnTestTrue) { test = testPool.appendTestTerm(term); } else { test = testPool.appendTest(); ((JDFnot)test.appendTerm(EnumTerm.not)).appendTerm(term); } action.setTest(test); return(action); }