Example #1
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="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);
        }
Example #2
0
        ///
        ///	 <summary> * get the Test element in the TestPool that is referenced by this action
        ///	 *  </summary>
        ///	 * <returns> JDFTest: the referenced test, null if none exists </returns>
        ///
        public virtual JDFTest getTest()
        {
            JDFTestPool testPool = getTestPool();

            if (testPool == null)
            {
                return(null);
            }
            return(testPool.getTest(getTestRef()));
        }
Example #3
0
        ///
        ///	 <summary> * get the testPool that all IDRefs in this action refer to
        ///	 *  </summary>
        ///	 * <returns> JDFTestPool: the neighboring TestPool </returns>
        ///
        public virtual JDFTestPool getTestPool()
        {
            KElement commonParent = getActionPool().getParentNode_KElement();

            if (commonParent == null)
            {
                return(null);
            }

            JDFTestPool testPool = (JDFTestPool)commonParent.getElement(ElementName.TESTPOOL);

            return(testPool);
        }
Example #4
0
        ///
        ///	 <summary> * get the test defined by PreflightAction/@SetRef
        ///	 *  </summary>
        ///	 * <returns> JDFTest: the test to use </returns>
        ///
        public virtual JDFTest getPreflightActionSetRef()
        {
            JDFPreflightAction pfa = getPreflightAction(0);

            if (pfa == null)
            {
                return(null);
            }
            string      setRef   = pfa.getSetRef();
            JDFTestPool testPool = getTestPool();

            if (testPool == null)
            {
                return(null);
            }
            return(testPool.getTest(setRef));
        }
Example #5
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);
        }