while (cs.hasNext())
{
LinkStruct cc = (LinkStruct) cs.next();
Task from = pr(cc.from, p);
Task to = pr(cc.to, p);
if (from == null
&& to == null)
{
throw new Exception("from or to must be a reference");
}
c[i++] = new LinkImpl(new OutPortImpl(from, pr_port(cc.from)), new InPortImpl(to, pr_port(cc.to)), new DataImpl(cc.content));
}
InPort in1 = null;
InPort in2 = null;
OutPort out1 = null;
OutPort out2 = null;
if (binding != null)
{
in1 = new InPortImpl(pr(binding.in_1, p), pr_port(binding.in_1));
in2 = new InPortImpl(pr(binding.in_2, p), pr_port(binding.in_2));
out1 = new OutPortImpl(pr(binding.out_1, p), pr_port(binding.out_1));
out2 = new OutPortImpl(pr(binding.out_2, p), pr_port(binding.out_2));
}
Iterator p_v = p.values().iterator();
Task pa[] = new Task[p.values().size()];
i = 0;
while (p_v.hasNext())
{
pa[i++] = (Task) p_v.next();
}