diff options
author | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2010-02-24 20:20:21 +0000 |
---|---|---|
committer | Abdullah Sowayan <sowayan@users.noreply.github.com> | 2010-02-24 20:20:21 +0000 |
commit | 035b47c1a6985e2b884182ab0f3bb1afa714a48f (patch) | |
tree | 48d75721f242b7a0eb4398a65b672a152bdaa37f /ACE/MPC/modules/Depgen/DependencyWriterFactory.pm | |
parent | a3894e5127aa8cf1892e717ab30f02e053cdb482 (diff) | |
download | ATCD-035b47c1a6985e2b884182ab0f3bb1afa714a48f.tar.gz |
Diffstat (limited to 'ACE/MPC/modules/Depgen/DependencyWriterFactory.pm')
-rw-r--r-- | ACE/MPC/modules/Depgen/DependencyWriterFactory.pm | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ACE/MPC/modules/Depgen/DependencyWriterFactory.pm b/ACE/MPC/modules/Depgen/DependencyWriterFactory.pm new file mode 100644 index 00000000000..558793ea0a5 --- /dev/null +++ b/ACE/MPC/modules/Depgen/DependencyWriterFactory.pm @@ -0,0 +1,40 @@ +package DependencyWriterFactory; + +# ************************************************************ +# Description : Create DependencyWriter objects. +# Author : Chad Elliott +# Create Date : 5/23/2003 +# ************************************************************ + +# ************************************************************ +# Pragmas +# ************************************************************ + +use strict; + +use DependencyWriter; + +# ************************************************************ +# Data Section +# ************************************************************ + +my $writers = {}; + +# ************************************************************ +# Subroutine Section +# ************************************************************ + +sub register { + $writers = shift; +} + + +sub create { + return $$writers{$_[0]}->new() if (defined $$writers{$_[0]}); + + print STDERR "WARNING: Invalid dependency writer type: $_[0]\n"; + return new DependencyWriter(); +} + + +1; |