* sync with trunk
[bioperl-live.git] / Bio / Factory / ObjectFactoryI.pm
blob982e171e8042968b6fefa3df8e998b540e5cfcf5
1 # $Id$
3 # BioPerl module for Bio::Factory::ObjectFactoryI
5 # Cared for by Jason Stajich <jason@bioperl.org>
7 # Copyright Jason Stajich
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
13 =head1 NAME
15 Bio::Factory::ObjectFactoryI - A General object creator factory
17 =head1 SYNOPSIS
19 # see the implementations of this interface for details but
20 # basically
22 my $obj = $factory->create(%args);
24 =head1 DESCRIPTION
26 This interface is the basic structure for a factory which creates new
27 objects. In this case it is up to the implementer to check arguments
28 and initialize whatever new object the implementing class is designed for.
30 =head1 FEEDBACK
32 =head2 Mailing Lists
34 User feedback is an integral part of the evolution of this and other
35 Bioperl modules. Send your comments and suggestions preferably to
36 the Bioperl mailing list. Your participation is much appreciated.
38 bioperl-l@bioperl.org - General discussion
39 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
41 =head2 Reporting Bugs
43 Report bugs to the Bioperl bug tracking system to help us keep track
44 of the bugs and their resolution. Bug reports can be submitted via the
45 web:
47 http://bugzilla.open-bio.org/
49 =head1 AUTHOR - Jason Stajich
51 Email jason@bioperl.org
53 =head1 APPENDIX
55 The rest of the documentation details each of the object methods.
56 Internal methods are usually preceded with a _
58 =cut
61 # Let the code begin...
64 package Bio::Factory::ObjectFactoryI;
65 use strict;
66 use Carp;
68 use base qw(Bio::Root::RootI);
70 =head2 create
72 Title : create
73 Usage : $factory->create(%args)
74 Function: Create a new object
75 Returns : a new object
76 Args : hash of initialization parameters
79 =cut
81 sub create{
82 my ($self,@args) = @_;
83 $self->throw_not_implemented();
86 =head2 create_object
88 Title : create_object
89 Usage : $obj = $factory->create_object(%args)
90 Function: Create a new object.
92 This is supposed to supercede create(). Right now it only delegates
93 to create().
94 Returns : a new object
95 Args : hash of initialization parameters
98 =cut
100 sub create_object{
101 my ($self,@args) = @_;
102 return $self->create(@args);