GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Tree::Binary::VisitorFactory(3) User Contributed Perl Documentation Tree::Binary::VisitorFactory(3)

Tree::Binary::VisitorFactory - A factory object for dispensing Visitor objects

  use Tree::Binary::VisitorFactory;

  my $tf = Tree::Binary::VisitorFactory->new();

  my $visitor = $tf->get('InOrderTraveral');

  # Or call it as a class method:

  my $visitor = Tree::Binary::VisitorFactory->getVisitor('PostOrderTraveral');

This object is really just a factory for dispensing Tree::Binary::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.

I considered making this a Singleton, but I did not because I thought that some people might not want that. I know that I am very picky about using Singletons, especially in multiprocess environments like mod_perl, so I implemented the smallest instance I knew how to, and made sure all other methods could be called as class methods too.

new
Returns an minimal instance of this object, basically just a reference back to the package (literally, see the source if you care).
get ($visitor_type)
Attempts to load the $visitor_type and returns an instance of it if successfull. If no $visitor_type is specified an exception is thrown, if $visitor_type fails to load, and exception is thrown.
getVisitor ($visitor_type)
This is an alias of "get".

None that I am aware of. Of course, if you find a bug, let me know, and I will be sure to fix it.

See the CODE COVERAGE section of Tree::Binary for details.

<https://github.com/ronsavage/Tree-Binary>

stevan little, <stevan@iinteractive.com>

Copyright 2004, 2005 by Infinity Interactive, Inc.

<http://www.iinteractive.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2016-07-15 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.