• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/CPANInternal-140/Tree-Simple/lib/Tree/

Lines Matching +refs:Tree +refs:see

2 package Tree::Simple;
14 ## Tree::Simple
24 *Tree::Simple::weaken = \&Scalar::Util::weaken;
60 if (blessed($parent) && $parent->isa("Tree::Simple")) {
68 die "Insufficient Arguments : parent argument must be a Tree::Simple object";
79 (($parent eq $self->ROOT) || (blessed($parent) && $parent->isa("Tree::Simple"))))
80 || die "Insufficient Arguments : parent also must be a Tree::Simple object";
162 (blessed($tree) && $tree->isa("Tree::Simple"))
163 || die "Insufficient Arguments : Child must be a Tree::Simple object";
246 (blessed($child_to_remove) && $child_to_remove->isa("Tree::Simple"))
247 || die "Insufficient Arguments : Only valid child type is a Tree::Simple object";
273 # in things like the Keyable Tree object
455 # either a Tree::Simple::Visitor object, or ...
456 ($visitor->isa("Tree::Simple::Visitor") ||
470 # create a new Tree::Simple object
519 # see if we can clone it
586 ## end Tree::Simple
595 Tree::Simple - A simple tree object
599 use Tree::Simple;
602 my $tree = Tree::Simple->new("0", Tree::Simple->ROOT);
605 $tree->addChild(Tree::Simple->new("1"));
609 my $sub_tree = Tree::Simple->new("2", $tree);
612 $tree->getChild(0)->addChild(Tree::Simple->new("1.1"));
616 Tree::Simple->new("2.1"),
617 Tree::Simple->new("2.2")
621 $sub_tree->addSibling(Tree::Simple->new("3"));
624 $sub_tree->insertChild(1, Tree::Simple->new("2.1a"));
633 therefore every B<Tree::Simple> object has both a parent and a set of
634 children (who themselves may have children, and so on). Every B<Tree::Simple>
649 argument to the constructor B<must> be a B<Tree::Simple> object or an object
650 derived from B<Tree::Simple>, otherwise an exception is thrown. This may seems
662 type of situation. If this module cannot keep up with your Tree needs, i suggest
686 The optional C<$parent> value must be a B<Tree::Simple> object, or an object
687 derived from B<Tree::Simple>. Setting this value implies that your new tree is a
704 This allows you to set your own unique ID for this specific Tree::Simple object.
709 about the Tree::Simple UID see the C<getUID> method.
713 This method accepts only B<Tree::Simple> objects or objects derived from
714 B<Tree::Simple>, an exception is thrown otherwise. This method will append
719 my $tree = Tree::Simple->new("root")->addChild(Tree::Simple->new("child one"));
723 my $tree = Tree::Simple->new("root")->addChild(
724 Tree::Simple->new("1.0")->addChild(
725 Tree::Simple->new("1.0.1")
731 This method accepts an array of B<Tree::Simple> objects, and adds them to
737 This method accepts a numeric C<$index> and a B<Tree::Simple> object (C<$tree>),
742 verified to be a B<Tree::Simple> or B<Tree::Simple> derived object, if
748 single B<Tree::Simple>, it inserts an array of B<Tree::Simple> objects. It
754 Accepts two different arguemnts. If given a B<Tree::Simple> object (C<$child>),
757 no match is found, and exception is thrown. If a non-B<Tree::Simple> object
805 The default is the hex-address extracted from the stringified Tree::Simple
809 many to choose from on CPAN) and the C<setUID> method (see above).
813 This returns the child (a B<Tree::Simple> object) found at the specified
818 This returns an array of all the children (all B<Tree::Simple> objects).
831 B<Tree::Simple> objects.
833 B<NOTE:> A C<ROOT> tree has the depth of -1. This be because Tree::Simple
841 B<Tree::Simple> object.
925 but a value stored in the Tree::Simple object itself, hopefully making it much
936 It accepts either a B<Tree::Simple::Visitor> object (which includes classes derived
937 from B<Tree::Simple::Visitor>), or an object who has the C<visit> method available
943 B<Tree::Simple::VisitorFactory>.
952 When a Tree::Simple object is cloned, the node is deep-copied in the following manner.
980 cloning of single B<Tree::Simple> object while retaining connections to the rest of the
1003 Tree::Simple will manage your tree's depth field for you using this method. You
1010 Tree::Simple will manage your tree's height field for you using this method.
1017 Tree::Simple will manage your tree's width field for you using this method. You
1027 Tree::Simple, here they are.
1049 I have revised the model by which Tree::Simple deals with ciruclar references.
1066 alleviates the need for the manual call to DESTROY and allows Tree::Simple
1070 use Tree::Simple 'use_weak_refs';
1072 And from that point on Tree::Simple will use weak references to allow for
1077 that Tree::Simple uses:
1080 | Tree::Simple1 |<---------------------+
1087 +->| Tree::Simple2 | |
1093 Here, Tree::Simple1 has a reference count of 2 (one for the original
1095 Tree::Simple2), and Tree::Simple2 has a reference count of 1 (for the
1096 child reference in Tree::Simple2).
1101 | Tree::Simple1 |.......................
1108 +->| Tree::Simple2 | :
1114 Now Tree::Simple1 has a reference count of 1 (for the variable it is
1116 Tree::Simple2). And Tree::Simple2 has a reference count of 1, just
1121 None that I am aware of. The code is pretty thoroughly tested (see
1135 Tree/Simple.pm 99.6 96.0 92.3 100.0 97.0 95.5 98.0
1136 Tree/Simple/Visitor.pm 100.0 96.2 88.2 100.0 100.0 4.5 97.7
1148 =item L<Tree::Parser> - A module for parsing formatted files into Tree::Simple hierarchies.
1150 =item L<Tree::Simple::View> - A set of classes for viewing Tree::Simple hierarchies in various output formats.
1152 =item L<Tree::Simple::VisitorFactory> - A set of several useful Visitor objects for Tree::Simple objects.
1154 =item L<Tree::Binary> - If you are looking for a binary tree, this you might want to check this one out.
1159 to make sure that B<Tree::Simple> and his module work well together.
1160 If you need a quick and handy way to dump out a Tree::Simple heirarchy,
1164 Tree::Simple for the various Unix flavors. Here are some links:
1168 =item FreeBSD Port - L<http://www.freshports.org/devel/p5-Tree-Simple/>
1172 =item Linux RPM - L<http://rpmpan.sourceforge.net/Tree.html>
1178 There are a few other Tree modules out there, here is a quick comparison
1179 between B<Tree::Simple> and them. Obviously I am biased, so take what I say
1180 with a grain of salt, and keep in mind, I wrote B<Tree::Simple> because I
1181 could not find a Tree module that suited my needs. If B<Tree::Simple> does
1183 I am only listing Tree::* modules I am familiar with here, if you think I
1185 modules outside of the Tree::* namespace, but most of them are part of
1186 another distribution (B<HTML::Tree>, B<Pod::Tree>, etc) and are likely
1191 =item L<Tree::DAG_Node>
1194 However, B<Tree::DAG_Node> does not come with any automated tests. It's
1197 see that. The module is approx. 3000 lines with POD, and 1,500 without the
1205 neutral approach in B<Tree::Simple> to the mother/daughter style of B<Tree::DAG_Node>.
1206 I also feel very strongly that B<Tree::DAG_Node> is trying to do much more
1210 However, of all the Tree::* modules out there, B<Tree::DAG_Node> seems to
1213 =item L<Tree::MultiNode>
1220 a cursor). However, like B<Tree::DAG_Node>, it is somewhat lacking in tests
1224 =item L<Tree::Nary>
1231 This module is similar in intent to B<Tree::Simple>. It implements a tree
1233 of the same methods as B<Tree::Simple> and a few others on top of that, but
1236 B<Tree::Simple> is a much more OO module than B<Tree::Nary>, so while they
1239 =item L<Tree>
1243 a binary and a balanced binary tree, B<Tree::Simple> is an I<n>-ary tree, and
1246 =item L<Tree::Ternary>
1248 This module is older than B<Tree>, last update was Sept. 24th, 1999. It
1250 not general purpose like B<Tree::Simple>.
1252 =item L<Tree::Ternary_XS>
1256 =item L<Tree::Trie>
1258 This too is a specialized tree type, it sounds similar to the B<Tree::Ternary>,
1262 =item L<Tree::M>
1264 Is a wrapper for a C++ library, whereas B<Tree::Simple> is pure-perl. It also
1266 the same as B<Tree::Simple>.
1268 =item L<Tree::Fat>
1270 Is a wrapper around a C library, again B<Tree::Simple> is pure-perl. The author
1271 describes FAT-trees as a combination of a Tree and an array. It looks like a
1284 with B<Tree::Simple>.