Exemplo n.º 1
0
 /// <summary>
 /// Instantiates a new AtomFunction.
 /// </summary>
 /// <param name="resolutionType">The type of resolution for the atom relation function.</param>
 /// <param name="negative">Negative Atom.</param>
 /// <param name="bob">The business object binder to use when evaluating the function.</param>
 /// <param name="type">The relation type of the Atom.</param>
 /// <param name="members">Array of predicates associated in the Atom.</param>
 public AtomFunction(RelationResolutionType resolutionType,
                     bool negative,
                     IBinder bob,
                     string type,
                     params IPredicate[] members) : this(resolutionType, negative, bob, type, members, null)
 {
 }
Exemplo n.º 2
0
        private AtomFunction(RelationResolutionType resolutionType,
                             bool negative,
                             IBinder bob,
                             string type,
                             IPredicate[] members,
                             string functionSignature) : base(negative, type, members)
        {
            if ((HasFunction) || (HasFormula))
            {
                throw new BREException("Atom with function relation can not have a function or formula has a member: " + ToString());
            }

            this.resolutionType = resolutionType;
            this.bob            = bob;

            if (resolutionType == RelationResolutionType.Binder)
            {
                // precalculate the function signature to use in the binder to evaluate the function
                if (functionSignature == null)
                {
                    this.functionSignature = Parameter.BuildFunctionSignature(type, members);
                }
                else
                {
                    this.functionSignature = functionSignature;
                }
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Private constructor used for cloning.
 /// </summary>
 /// <param name="source">The source AtomFunction to use for building the new one.</param>
 private AtomFunction(AtomFunction source)
     : base(source)
 {
     this.bob = source.bob;
     this.functionSignature = source.functionSignature;
     this.resolutionType = source.resolutionType;
 }
Exemplo n.º 4
0
        /// <summary>
        /// Instantiates a new AtomFunction.
        /// </summary>
        /// <param name="resolutionType">The type of resolution for the atom relation function.</param>
        /// <param name="negative">Negative Atom.</param>
        /// <param name="bob">The business object binder to use when evaluating the function.</param>
        /// <param name="type">The relation type of the Atom.</param>
        /// <param name="members">Array of predicates associated in the Atom.</param>
        public AtomFunction(RelationResolutionType resolutionType,
		                    bool negative,
		                    IBinder bob,
		                    string type,
		                    params IPredicate[] members)
            : this(resolutionType, negative, bob, type, members, null)
        {
        }
Exemplo n.º 5
0
		private AtomFunction(RelationResolutionType resolutionType,
		                    bool negative,
		                    IBinder bob,
		                    string type,
		                    IPredicate[] members,
		                    string functionSignature):base(negative, type, members) {
			
			if ((HasFunction) || (HasFormula))
				throw new BREException("Atom with function relation can not have a function or formula has a member: " + ToString());

			this.resolutionType = resolutionType;
			this.bob = bob;
			
			if (resolutionType == RelationResolutionType.Binder) {
				// precalculate the function signature to use in the binder to evaluate the function
				if (functionSignature == null)
					this.functionSignature = Parameter.BuildFunctionSignature(type, members);
				else
					this.functionSignature = functionSignature;
			}
		}
Exemplo n.º 6
0
 /// <summary>
 /// Private constructor used for cloning.
 /// </summary>
 /// <param name="source">The source AtomFunction to use for building the new one.</param>
 private AtomFunction(AtomFunction source) : base(source)
 {
     this.bob = source.bob;
     this.functionSignature = source.functionSignature;
     this.resolutionType    = source.resolutionType;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Private constructor used for cloning.
 /// </summary>
 /// <param name="source">The source AtomFunction to use for building the new one.</param>
 /// <param name="members">The members to use in the new AtomFunction.</param>
 private AtomFunction(AtomFunction source, IPredicate[] members) : base(source, members)
 {
     this.bob = source.bob;
     this.functionSignature = source.functionSignature;
     this.resolutionType    = source.resolutionType;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Private constructor used for cloning.
 /// </summary>
 /// <param name="source">The source AtomFunction to use for building the new one.</param>
 /// <param name="members">The members to use in the new AtomFunction.</param>
 private AtomFunction(AtomFunction source, IPredicate[] members)
     : base(source, members)
 {
     this.bob = source.bob;
     this.functionSignature = source.functionSignature;
     this.resolutionType = source.resolutionType;
 }