summaryrefslogtreecommitdiff
path: root/ACE/bin/DependencyGenerator/ObjectGeneratorFactory.pm
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/bin/DependencyGenerator/ObjectGeneratorFactory.pm')
-rw-r--r--ACE/bin/DependencyGenerator/ObjectGeneratorFactory.pm35
1 files changed, 35 insertions, 0 deletions
diff --git a/ACE/bin/DependencyGenerator/ObjectGeneratorFactory.pm b/ACE/bin/DependencyGenerator/ObjectGeneratorFactory.pm
new file mode 100644
index 00000000000..e161db948ab
--- /dev/null
+++ b/ACE/bin/DependencyGenerator/ObjectGeneratorFactory.pm
@@ -0,0 +1,35 @@
+package ObjectGeneratorFactory;
+
+# ************************************************************
+# Description : Create ObjectGenerator objects.
+# Author : Chad Elliott
+# Create Date : 5/23/2003
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+
+use GNUObjectGenerator;
+use NMakeObjectGenerator;
+use MakeObjectGenerator;
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub create {
+ switch: {
+ $_[0] eq 'gnu' && do { return new GNUObjectGenerator(); };
+ $_[0] eq 'nmake' && do { return new NMakeObjectGenerator(); };
+ $_[0] eq 'make' && do { return new MakeObjectGenerator(); };
+ print STDERR "WARNING: Invalid object generator type: $_[0]\n";
+ }
+
+ return new ObjectGenerator();
+}
+
+
+1;