Searched +refs:Tree +refs:find (Results 1 - 25 of 53) sorted by relevance

123

/macosx-10.9.5/CPANInternal-140/Tree-Simple-VisitorFactory/lib/Tree/Simple/
H A DVisitorFactory.pm2 package Tree::Simple::VisitorFactory;
17 $visitor = "Tree::Simple::Visitor::$visitor";
31 Tree::Simple::VisitorFactory - A factory object for dispensing Visitor objects
35 use Tree::Simple::VisitorFactory;
37 my $tf = Tree::Simple::VisitorFactory->new();
42 my $visitor = Tree::Simple::VisitorFactory->getVisitor("PathToRoot");
46 This object is really just a factory for dispensing Tree::Simple::Visitor::* objects. It is not required to use this package in order to use all the Visitors, it is just a somewhat convienient way to avoid having to type thier long class names.
72 This factory will load any module contained inside the B<Tree::Simple::Visitor::*> namespace. Given a name, it will attempt to C<require> the module B<Tree::Simple::Visitor::E<lt>I<Name>E<gt>.pm>. This allows others to create Visitors which can be accessed with this factory, without needed to include them in this distrobution.
80 Given a Tree
[all...]
/macosx-10.9.5/CPANInternal-140/Tree-Simple-VisitorFactory-0.10/lib/Tree/Simple/
H A DVisitorFactory.pm2 package Tree::Simple::VisitorFactory;
17 $visitor = "Tree::Simple::Visitor::$visitor";
31 Tree::Simple::VisitorFactory - A factory object for dispensing Visitor objects
35 use Tree::Simple::VisitorFactory;
37 my $tf = Tree::Simple::VisitorFactory->new();
42 my $visitor = Tree::Simple::VisitorFactory->getVisitor("PathToRoot");
46 This object is really just a factory for dispensing Tree::Simple::Visitor::* objects. It is not required to use this package in order to use all the Visitors, it is just a somewhat convienient way to avoid having to type thier long class names.
72 This factory will load any module contained inside the B<Tree::Simple::Visitor::*> namespace. Given a name, it will attempt to C<require> the module B<Tree::Simple::Visitor::E<lt>I<Name>E<gt>.pm>. This allows others to create Visitors which can be accessed with this factory, without needed to include them in this distrobution.
80 Given a Tree
[all...]
/macosx-10.9.5/CPANInternal-140/Tree-Simple-VisitorFactory/lib/Tree/Simple/Visitor/
H A DToNestedArray.pm2 package Tree::Simple::Visitor::ToNestedArray;
11 use base qw(Tree::Simple::Visitor);
24 (blessed($tree) && $tree->isa("Tree::Simple"))
25 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
58 Tree::Simple::Visitor::ToNestedArray - A Visitor for creating nested array trees from Tree::Simple objects.
62 use Tree::Simple::Visitor::ToNestedArray;
64 my $visitor = Tree::Simple::Visitor::ToNestedArray->new();
66 # given this Tree::Simple tree
67 my $tree = Tree
[all...]
H A DToNestedHash.pm2 package Tree::Simple::Visitor::ToNestedHash;
11 use base qw(Tree::Simple::Visitor);
24 (blessed($tree) && $tree->isa("Tree::Simple"))
25 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
60 Tree::Simple::Visitor::ToNestedHash - A Visitor for creating nested hash trees from Tree::Simple objects.
64 use Tree::Simple::Visitor::ToNestedHash;
66 my $visitor = Tree::Simple::Visitor::ToNestedHash->new();
68 # given this Tree::Simple tree
69 my $tree = Tree
[all...]
H A DFindByNodeValue.pm2 package Tree::Simple::Visitor::FindByNodeValue;
11 use base qw(Tree::Simple::Visitor);
37 (blessed($visitor) && $visitor->isa("Tree::Simple::Visitor"))
38 || die "Insufficient Arguments : You must supply a valid Tree::Simple::Visitor object";
44 (blessed($tree) && $tree->isa("Tree::Simple"))
45 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
96 # if we caught a Tree::Simple object
98 if (blessed($@) && $@->isa('Tree::Simple')) {
103 # however, if it is not a Tree::Simple
133 Tree
[all...]
H A DFindByPath.pm2 package Tree::Simple::Visitor::FindByPath;
11 use base qw(Tree::Simple::Visitor);
37 (blessed($tree) && $tree->isa("Tree::Simple"))
38 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
96 # if we find a match, then
107 # if we do not find a match, then we can fall off
136 Tree::Simple::Visitor::FindByPath - A Visitor for finding an element in a Tree::Simple hierarchy with a path
140 use Tree::Simple::Visitor::FindByPath;
143 my $visitor = Tree
[all...]
H A DPathToRoot.pm2 package Tree::Simple::Visitor::PathToRoot;
11 use base qw(Tree::Simple::Visitor);
24 (blessed($tree) && $tree->isa("Tree::Simple"))
25 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
65 Tree::Simple::Visitor::PathToRoot - A Visitor for finding the path back a Tree::Simple object's root
69 use Tree::Simple::Visitor::PathToRoot;
72 my $visitor = Tree::Simple::Visitor::PathToRoot->new();
74 # pass the visitor to a Tree::Simple object
98 Given a Tree
[all...]
H A DBreadthFirstTraversal.pm2 package Tree::Simple::Visitor::BreadthFirstTraversal;
11 use base qw(Tree::Simple::Visitor);
29 (blessed($tree) && $tree->isa("Tree::Simple"))
30 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
71 Tree::Simple::Visitor::BreadthFirstTraversal - A Visitor for breadth-first traversal a Tree::Simple hierarchy
75 use Tree::Simple::Visitor::BreadthFirstTraversal;
78 my $visitor = Tree::Simple::Visitor::BreadthFirstTraversal->new();
100 This implements a breadth-first traversal of a Tree::Simple hierarchy. This can be an alternative to the built in depth-first traversal of the Tree
[all...]
H A DGetAllDescendents.pm2 package Tree::Simple::Visitor::GetAllDescendents;
11 use base qw(Tree::Simple::Visitor);
30 (blessed($visitor) && $visitor->isa("Tree::Simple::Visitor"))
31 || die "Insufficient Arguments : You must supply a valid Tree::Simple::Visitor object";
37 (blessed($tree) && $tree->isa("Tree::Simple"))
38 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
75 Tree::Simple::Visitor::GetAllDescendents - A Visitor for fetching all the descendents of a Tree::Simple object
79 use Tree::Simple::Visitor::GetAllDescendents;
82 my $visitor = Tree
[all...]
H A DVariableDepthClone.pm2 package Tree::Simple::Visitor::VariableDepthClone;
11 use base qw(Tree::Simple::Visitor);
42 (blessed($tree) && $tree->isa("Tree::Simple"))
43 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
54 Tree::Simple::_cloneNode($tree->getNodeValue())
72 Tree::Simple::_cloneNode($child->getNodeValue())
86 Tree::Simple::Visitor::VariableDepthClone - A Visitor for cloning parts of Tree::Simple hierarchy
90 use Tree::Simple::Visitor::VariableDepthClone;
93 my $visitor = Tree
[all...]
H A DFindByUID.pm2 package Tree::Simple::Visitor::FindByUID;
11 use base qw(Tree::Simple::Visitor);
37 (blessed($visitor) && $visitor->isa("Tree::Simple::Visitor"))
38 || die "Insufficient Arguments : You must supply a valid Tree::Simple::Visitor object";
44 (blessed($tree) && $tree->isa("Tree::Simple"))
45 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
96 # if we caught a Tree::Simple object
98 if (blessed($@) && $@->isa('Tree::Simple')) {
103 # however, if it is not a Tree::Simple
133 Tree
[all...]
H A DPostOrderTraversal.pm2 package Tree::Simple::Visitor::PostOrderTraversal;
11 use base qw(Tree::Simple::Visitor);
24 (blessed($tree) && $tree->isa("Tree::Simple"))
25 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
64 Tree::Simple::Visitor::PostOrderTraversal - A Visitor for post-order traversal a Tree::Simple hierarchy
68 use Tree::Simple::Visitor::PostOrderTraversal;
71 my $visitor = Tree::Simple::Visitor::PostOrderTraversal->new();
93 Post-order traversal is a variation of the depth-first traversal in which the sub-tree's are processed I<before> the parent. It is another alternative to Tree::Simple's C<traverse> method which implements a depth-first, pre-order traversal.
109 This method accepts a CODE reference as its C<$filter_function> argument and throws an exception if it is not a code reference. This code reference is used to filter the tree nodes as they are collected. This can be used to customize output, or to gather specific information from a more complex tree node. The filter function should accept a single argument, which is the current Tree
[all...]
H A DPreOrderTraversal.pm2 package Tree::Simple::Visitor::PreOrderTraversal;
9 use base qw(Tree::Simple::Visitor);
26 Tree::Simple::Visitor::PreOrderTraversal - A Visitor for pre-order traversal a Tree::Simple hierarchy
30 use Tree::Simple::Visitor::PreOrderTraversal;
33 my $visitor = Tree::Simple::Visitor::PreOrderTraversal->new();
55 Pre-order traversal is a depth-first traversal method in which the sub-tree's are processed I<after> the parent. It is essentially a wrapper around the base Tree::Simple::Visitor class, and is a seperate module here for completeness. (If you have a post-order, you should have a pre-order too).
71 This method accepts a CODE reference as its C<$filter_function> argument and throws an exception if it is not a code reference. This code reference is used to filter the tree nodes as they are collected. This can be used to customize output, or to gather specific information from a more complex tree node. The filter function should accept a single argument, which is the current Tree::Simple object.
75 This is the method that is used by Tree::Simple's C<accept> method. It can also be used on its own, it requires the C<$tree> argument to be a Tree
[all...]
/macosx-10.9.5/CPANInternal-140/Tree-Simple-VisitorFactory-0.10/lib/Tree/Simple/Visitor/
H A DToNestedArray.pm2 package Tree::Simple::Visitor::ToNestedArray;
11 use base qw(Tree::Simple::Visitor);
24 (blessed($tree) && $tree->isa("Tree::Simple"))
25 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
58 Tree::Simple::Visitor::ToNestedArray - A Visitor for creating nested array trees from Tree::Simple objects.
62 use Tree::Simple::Visitor::ToNestedArray;
64 my $visitor = Tree::Simple::Visitor::ToNestedArray->new();
66 # given this Tree::Simple tree
67 my $tree = Tree
[all...]
H A DToNestedHash.pm2 package Tree::Simple::Visitor::ToNestedHash;
11 use base qw(Tree::Simple::Visitor);
24 (blessed($tree) && $tree->isa("Tree::Simple"))
25 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
60 Tree::Simple::Visitor::ToNestedHash - A Visitor for creating nested hash trees from Tree::Simple objects.
64 use Tree::Simple::Visitor::ToNestedHash;
66 my $visitor = Tree::Simple::Visitor::ToNestedHash->new();
68 # given this Tree::Simple tree
69 my $tree = Tree
[all...]
H A DFindByNodeValue.pm2 package Tree::Simple::Visitor::FindByNodeValue;
11 use base qw(Tree::Simple::Visitor);
37 (blessed($visitor) && $visitor->isa("Tree::Simple::Visitor"))
38 || die "Insufficient Arguments : You must supply a valid Tree::Simple::Visitor object";
44 (blessed($tree) && $tree->isa("Tree::Simple"))
45 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
96 # if we caught a Tree::Simple object
98 if (blessed($@) && $@->isa('Tree::Simple')) {
103 # however, if it is not a Tree::Simple
133 Tree
[all...]
H A DFindByPath.pm2 package Tree::Simple::Visitor::FindByPath;
11 use base qw(Tree::Simple::Visitor);
37 (blessed($tree) && $tree->isa("Tree::Simple"))
38 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
96 # if we find a match, then
107 # if we do not find a match, then we can fall off
136 Tree::Simple::Visitor::FindByPath - A Visitor for finding an element in a Tree::Simple hierarchy with a path
140 use Tree::Simple::Visitor::FindByPath;
143 my $visitor = Tree
[all...]
H A DPathToRoot.pm2 package Tree::Simple::Visitor::PathToRoot;
11 use base qw(Tree::Simple::Visitor);
24 (blessed($tree) && $tree->isa("Tree::Simple"))
25 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
65 Tree::Simple::Visitor::PathToRoot - A Visitor for finding the path back a Tree::Simple object's root
69 use Tree::Simple::Visitor::PathToRoot;
72 my $visitor = Tree::Simple::Visitor::PathToRoot->new();
74 # pass the visitor to a Tree::Simple object
98 Given a Tree
[all...]
H A DBreadthFirstTraversal.pm2 package Tree::Simple::Visitor::BreadthFirstTraversal;
11 use base qw(Tree::Simple::Visitor);
29 (blessed($tree) && $tree->isa("Tree::Simple"))
30 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
71 Tree::Simple::Visitor::BreadthFirstTraversal - A Visitor for breadth-first traversal a Tree::Simple hierarchy
75 use Tree::Simple::Visitor::BreadthFirstTraversal;
78 my $visitor = Tree::Simple::Visitor::BreadthFirstTraversal->new();
100 This implements a breadth-first traversal of a Tree::Simple hierarchy. This can be an alternative to the built in depth-first traversal of the Tree
[all...]
H A DGetAllDescendents.pm2 package Tree::Simple::Visitor::GetAllDescendents;
11 use base qw(Tree::Simple::Visitor);
30 (blessed($visitor) && $visitor->isa("Tree::Simple::Visitor"))
31 || die "Insufficient Arguments : You must supply a valid Tree::Simple::Visitor object";
37 (blessed($tree) && $tree->isa("Tree::Simple"))
38 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
75 Tree::Simple::Visitor::GetAllDescendents - A Visitor for fetching all the descendents of a Tree::Simple object
79 use Tree::Simple::Visitor::GetAllDescendents;
82 my $visitor = Tree
[all...]
H A DVariableDepthClone.pm2 package Tree::Simple::Visitor::VariableDepthClone;
11 use base qw(Tree::Simple::Visitor);
42 (blessed($tree) && $tree->isa("Tree::Simple"))
43 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
54 Tree::Simple::_cloneNode($tree->getNodeValue())
72 Tree::Simple::_cloneNode($child->getNodeValue())
86 Tree::Simple::Visitor::VariableDepthClone - A Visitor for cloning parts of Tree::Simple hierarchy
90 use Tree::Simple::Visitor::VariableDepthClone;
93 my $visitor = Tree
[all...]
H A DFindByUID.pm2 package Tree::Simple::Visitor::FindByUID;
11 use base qw(Tree::Simple::Visitor);
37 (blessed($visitor) && $visitor->isa("Tree::Simple::Visitor"))
38 || die "Insufficient Arguments : You must supply a valid Tree::Simple::Visitor object";
44 (blessed($tree) && $tree->isa("Tree::Simple"))
45 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
96 # if we caught a Tree::Simple object
98 if (blessed($@) && $@->isa('Tree::Simple')) {
103 # however, if it is not a Tree::Simple
133 Tree
[all...]
H A DPostOrderTraversal.pm2 package Tree::Simple::Visitor::PostOrderTraversal;
11 use base qw(Tree::Simple::Visitor);
24 (blessed($tree) && $tree->isa("Tree::Simple"))
25 || die "Insufficient Arguments : You must supply a valid Tree::Simple object";
64 Tree::Simple::Visitor::PostOrderTraversal - A Visitor for post-order traversal a Tree::Simple hierarchy
68 use Tree::Simple::Visitor::PostOrderTraversal;
71 my $visitor = Tree::Simple::Visitor::PostOrderTraversal->new();
93 Post-order traversal is a variation of the depth-first traversal in which the sub-tree's are processed I<before> the parent. It is another alternative to Tree::Simple's C<traverse> method which implements a depth-first, pre-order traversal.
109 This method accepts a CODE reference as its C<$filter_function> argument and throws an exception if it is not a code reference. This code reference is used to filter the tree nodes as they are collected. This can be used to customize output, or to gather specific information from a more complex tree node. The filter function should accept a single argument, which is the current Tree
[all...]
/macosx-10.9.5/CPANInternal-140/Tree-Simple/lib/Tree/
H A DSimple.pm2 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
[all...]
/macosx-10.9.5/CPANInternal-140/Tree-Simple-1.18/lib/Tree/
H A DSimple.pm2 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
[all...]

Completed in 192 milliseconds

123