예제 #1
0
        public void AddDep(SingleValue <T_targ> sv)
        {
            if (unnamed_deps == null)
            {
                unnamed_deps = new List <SingleValue <T_targ> > ();
            }

            unnamed_deps.Add(sv);
        }
예제 #2
0
        public void AddTag(T_tag name, SingleValue <T_targ> value)
        {
            if (tags == null)
            {
                tags = new Dictionary <T_tag, SingleValue <T_targ> > ();
            }

            tags[name] = value;
        }
예제 #3
0
        public void SetDefault(T_arg arg, SingleValue <T_targ> sv)
        {
            if (defaults == null)
            {
                defaults = new Dictionary <T_arg, SingleValue <T_targ> > ();
            }

            defaults[arg] = sv;
        }
예제 #4
0
        public void AddDefaultOrdered(SingleValue <T_targ> sv)
        {
            if (deford_deps == null)
            {
                deford_deps = new List <SingleValue <T_targ> > ();
            }

            deford_deps.Add(sv);
        }
예제 #5
0
        public void AddDep(T_arg arg, SingleValue <T_targ> sv)
        {
            if (named_deps == null)
            {
                named_deps = new Dictionary <T_arg, List <SingleValue <T_targ> > > ();
            }

            List <SingleValue <T_targ> > list;

            if (!named_deps.ContainsKey(arg))
            {
                list            = new List <SingleValue <T_targ> > ();
                named_deps[arg] = list;
            }
            else
            {
                list = named_deps[arg];
            }

            list.Add(sv);
        }
예제 #6
0
        SingleValue <TargetBuilder> ConvertValue(SingleValue <string> value)
        {
            if (value.IsResult)
            {
                return(new SingleValue <TargetBuilder> ((Result)value));
            }

            string target = (string)value;

            target = StrUtils.CanonicalizeTarget(target, pb.Basis);

            TargetBuilder tb;

            if (target.StartsWith(pb.Basis))
            {
                tb = pb.Owner.RequestTarget(target);
            }
            else
            {
                tb = pb.Owner.ReferenceTarget(target);
            }

            return(new SingleValue <TargetBuilder> (tb));
        }
예제 #7
0
        // tags

        public void AddTag(string name, SingleValue <string> value)
        {
            AddTag(name, ConvertValue(value));
        }
예제 #8
0
 public void SetDefault(string arg, SingleValue <string> sv)
 {
     SetDefault(arg, ConvertValue(sv));
 }
예제 #9
0
 public void AddDefaultOrdered(SingleValue <string> sv)
 {
     AddDefaultOrdered(ConvertValue(sv));
 }
예제 #10
0
 public void AddDep(string arg_name, SingleValue <string> sv)
 {
     AddDep(arg_name, ConvertValue(sv));
 }
예제 #11
0
        // All of these just pass off to TargetInfoHolder with
        // conversion of the SingleValues.

        public void AddDep(SingleValue <string> sv)
        {
            AddDep(ConvertValue(sv));
        }