Exemplo n.º 1
0
        public IEnumerable <TargetTagInfo> GetTargetsWithTag(int tag)
        {
            XmlNodeList nl = doc.SelectNodes(String.Format("/mbuild-graph/targets/t/tags/*[@id={0}]",
                                                           tag));

            foreach (XmlNode n in nl)
            {
                TargetTagInfo tti;

                int targ = Int32.Parse(n.ParentNode.ParentNode.Attributes["id"].Value);

                if (n.Name == "rt")
                {
                    tti = new TargetTagInfo(tag, targ, ReadResult(n));
                }
                else if (n.Name == "tt")
                {
                    int val = Int32.Parse(n.Attributes["target"].Value);
                    tti = new TargetTagInfo(tag, targ, val);
                }
                else
                {
                    throw new Exception("Unexpected tag node: " + tagcache_node.ToString());
                }

                yield return(tti);
            }
        }
Exemplo n.º 2
0
	internal BuildServices (WrenchProject proj, TargetTagInfo tti)
	    : this (proj, tti.Target)
	{
	    cached_tag = tti.Tag;
	    cached_tag_rval = tti.ValResult;
	    cached_tag_tval = tti.ValTarget;
	}
Exemplo n.º 3
0
        public IEnumerable <TargetTagInfo> GetTargetsWithTag(int tag)
        {
            int start, bound;

            GetOffsetRange(tag, tag_offsets, tag_data.Length, out start, out bound);

            if (((bound - start) & 0x1) != 0)
            {
                throw ExHelp.App("Target tag data segment length {0} is odd!", bound - start);
            }

            for (int idx = start; idx < bound; idx += 2)
            {
                TargetTagInfo tti;
                int           valcode = tag_data[idx + 1];

                if ((valcode & 0x7FFF0000) == 0x7FFF0000)
                {
                    tti = new TargetTagInfo(tag, tag_data[idx], ResultFromCode(valcode));
                }
                else
                {
                    tti = new TargetTagInfo(tag, tag_data[idx], valcode);
                }

                yield return(tti);
            }
        }
Exemplo n.º 4
0
	public IEnumerable<TargetTagInfo> GetTargetsWithTag (int tag)
	{
	    XmlNodeList nl = doc.SelectNodes (String.Format ("/mbuild-graph/targets/t/tags/*[@id={0}]", 
							     tag));

	    foreach (XmlNode n in nl) {
		TargetTagInfo tti;

		int targ = Int32.Parse (n.ParentNode.ParentNode.Attributes["id"].Value);

		if (n.Name == "rt")
		    tti = new TargetTagInfo (tag, targ, ReadResult (n));
		else if (n.Name == "tt") {
		    int val = Int32.Parse (n.Attributes["target"].Value);
		    tti = new TargetTagInfo (tag, targ, val);
		} else
		    throw new Exception ("Unexpected tag node: " + tagcache_node.ToString ());
		
		yield return tti;
	    }
	}
Exemplo n.º 5
0
	public IEnumerable<TargetTagInfo> GetTargetsWithTag (int tag)
	{
	    int start, bound;
	    GetOffsetRange (tag, tag_offsets, tag_data.Length, out start, out bound);

	    if (((bound - start) & 0x1) != 0)
		throw ExHelp.App ("Target tag data segment length {0} is odd!", bound - start);

	    for (int idx = start; idx < bound; idx += 2) {
		TargetTagInfo tti;
		int valcode = tag_data[idx + 1];

		if ((valcode & 0x7FFF0000) == 0x7FFF0000)
		    tti = new TargetTagInfo (tag, tag_data[idx], ResultFromCode (valcode));
		else
		    tti = new TargetTagInfo (tag, tag_data[idx], valcode);
		
		yield return tti;
	    }
	}