public void AddDep(SingleValue <T_targ> sv) { if (unnamed_deps == null) { unnamed_deps = new List <SingleValue <T_targ> > (); } unnamed_deps.Add(sv); }
public void AddTag(T_tag name, SingleValue <T_targ> value) { if (tags == null) { tags = new Dictionary <T_tag, SingleValue <T_targ> > (); } tags[name] = value; }
public void SetDefault(T_arg arg, SingleValue <T_targ> sv) { if (defaults == null) { defaults = new Dictionary <T_arg, SingleValue <T_targ> > (); } defaults[arg] = sv; }
public void AddDefaultOrdered(SingleValue <T_targ> sv) { if (deford_deps == null) { deford_deps = new List <SingleValue <T_targ> > (); } deford_deps.Add(sv); }
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); }
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)); }
// tags public void AddTag(string name, SingleValue <string> value) { AddTag(name, ConvertValue(value)); }
public void SetDefault(string arg, SingleValue <string> sv) { SetDefault(arg, ConvertValue(sv)); }
public void AddDefaultOrdered(SingleValue <string> sv) { AddDefaultOrdered(ConvertValue(sv)); }
public void AddDep(string arg_name, SingleValue <string> sv) { AddDep(arg_name, ConvertValue(sv)); }
// All of these just pass off to TargetInfoHolder with // conversion of the SingleValues. public void AddDep(SingleValue <string> sv) { AddDep(ConvertValue(sv)); }