1 # $Id: Node.pm,v 1.1 2006-10-06 11:33:07 mike Exp $
3 package ZOOM::IRSpy::Node;
12 my($name, @subtests) = @_;
15 subtests => \@subtests,
26 return @{ $this->{subtests} };
33 print "\t" x $level, $this->name();
34 if (my @sub = $this->subtests()) {
36 foreach my $sub (@sub) {
37 $sub->print($level+1);
39 print "\t" x $level, "}";
44 # Addresses are of the form:
46 # 2 - subtree #2 (i.e. the third subtree) of the root
47 # 2:1 - subtree #1 of subtree #2, etc
52 my @sub = $this->subtests();
55 } elsif (my($head, $tail) = $address =~ /(.*):(.*)/) {
56 return $sub[$head]->select($tail);
58 return $sub[$address];