Exemple #1
0
		internal override bool Evaluate(QCandidate a_candidate)
		{
			if (!a_candidate.FieldIsAvailable())
			{
				VisitOnNull(a_candidate.GetRoot());
			}
			return true;
		}
Exemple #2
0
 internal override bool Evaluate(QCandidate a_candidate)
 {
     if (!a_candidate.FieldIsAvailable())
     {
         VisitOnNull(a_candidate.GetRoot());
     }
     return(true);
 }
Exemple #3
0
 public QCandidate Add(QCandidate candidate)
 {
     i_root = Tree.Add(i_root, candidate);
     if (candidate._size == 0)
     {
         // This means that the candidate was already present
         // and QCandidate does not allow duplicates.
         // In this case QCandidate#isDuplicateOf will have
         // placed the existing QCandidate in the i_root
         // variable of the new candidate. We return it here:
         return(candidate.GetRoot());
     }
     return(candidate);
 }
Exemple #4
0
        public void Visit(object a_tree)
        {
            QCandidate parent = (QCandidate)a_tree;

            if (parent.CreateChild(this))
            {
                return;
            }
            // No object found.
            // All children constraints are necessarily false.
            // Check immediately.
            IEnumerator i = IterateConstraints();

            while (i.MoveNext())
            {
                ((QCon)i.Current).VisitOnNull(parent.GetRoot());
            }
        }
Exemple #5
0
        public override void Visit(object obj)
        {
            QCandidate qc        = (QCandidate)obj;
            bool       res       = true;
            bool       processed = false;

            if (_checkClassMetadataOnly)
            {
                ClassMetadata yc = qc.ReadClassMetadata();
                if (yc != null)
                {
                    res       = i_evaluator.Not(_classMetadata.GetHigherHierarchy(yc) == _classMetadata);
                    processed = true;
                }
            }
            if (!processed)
            {
                res = Evaluate(qc);
            }
            Visit1(qc.GetRoot(), this, res);
        }
Exemple #6
0
        public override void Visit(object obj)
        {
            QCandidate candidate = (QCandidate)obj;

            // force activation outside the try block
            // so any activation errors bubble up
            ForceActivation(candidate);
            try
            {
                Platform4.EvaluationEvaluate(i_evaluation, candidate);
            }
            catch (Exception)
            {
                candidate.Include(false);
            }
            // TODO: implement Exception callback for the user coder
            // at least for test cases
            if (!candidate._include)
            {
                DoNotInclude(candidate.GetRoot());
            }
        }
Exemple #7
0
		public QCandidate Add(QCandidate candidate)
		{
			i_root = Tree.Add(i_root, candidate);
			if (candidate._size == 0)
			{
				// This means that the candidate was already present
				// and QCandidate does not allow duplicates.
				// In this case QCandidate#isDuplicateOf will have
				// placed the existing QCandidate in the i_root
				// variable of the new candidate. We return it here: 
				return candidate.GetRoot();
			}
			return candidate;
		}
Exemple #8
0
        public virtual void Visit(object obj)
        {
            QCandidate qc = (QCandidate)obj;

            Visit1(qc.GetRoot(), this, Evaluate(qc));
        }
Exemple #9
0
 public void Visit(object a_object)
 {
     _enclosing.GetRoot().Evaluate((QPending)a_object);
 }