sync w/ main trunk
[bioperl-live.git] / Bio / Factory / ObjectFactoryI.pm
blob5300cf8ca8aadba265d087f27dd6492a64c6f274
1 # $Id$
3 # BioPerl module for Bio::Factory::ObjectFactoryI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Jason Stajich <jason@bioperl.org>
9 # Copyright Jason Stajich
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
15 =head1 NAME
17 Bio::Factory::ObjectFactoryI - A General object creator factory
19 =head1 SYNOPSIS
21 # see the implementations of this interface for details but
22 # basically
24 my $obj = $factory->create(%args);
26 =head1 DESCRIPTION
28 This interface is the basic structure for a factory which creates new
29 objects. In this case it is up to the implementer to check arguments
30 and initialize whatever new object the implementing class is designed for.
32 =head1 FEEDBACK
34 =head2 Mailing Lists
36 User feedback is an integral part of the evolution of this and other
37 Bioperl modules. Send your comments and suggestions preferably to
38 the Bioperl mailing list. Your participation is much appreciated.
40 bioperl-l@bioperl.org - General discussion
41 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
43 =head2 Support
45 Please direct usage questions or support issues to the mailing list:
47 L<bioperl-l@bioperl.org>
49 rather than to the module maintainer directly. Many experienced and
50 reponsive experts will be able look at the problem and quickly
51 address it. Please include a thorough description of the problem
52 with code and data examples if at all possible.
54 =head2 Reporting Bugs
56 Report bugs to the Bioperl bug tracking system to help us keep track
57 of the bugs and their resolution. Bug reports can be submitted via the
58 web:
60 http://bugzilla.open-bio.org/
62 =head1 AUTHOR - Jason Stajich
64 Email jason@bioperl.org
66 =head1 APPENDIX
68 The rest of the documentation details each of the object methods.
69 Internal methods are usually preceded with a _
71 =cut
74 # Let the code begin...
77 package Bio::Factory::ObjectFactoryI;
78 use strict;
79 use Carp;
81 use base qw(Bio::Root::RootI);
83 =head2 create
85 Title : create
86 Usage : $factory->create(%args)
87 Function: Create a new object
88 Returns : a new object
89 Args : hash of initialization parameters
92 =cut
94 sub create{
95 my ($self,@args) = @_;
96 $self->throw_not_implemented();
99 =head2 create_object
101 Title : create_object
102 Usage : $obj = $factory->create_object(%args)
103 Function: Create a new object.
105 This is supposed to supercede create(). Right now it only delegates
106 to create().
107 Returns : a new object
108 Args : hash of initialization parameters
111 =cut
113 sub create_object{
114 my ($self,@args) = @_;
115 return $self->create(@args);