summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/value/Factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/Ice/value/Factory.cpp')
-rw-r--r--cpp/demo/Ice/value/Factory.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/cpp/demo/Ice/value/Factory.cpp b/cpp/demo/Ice/value/Factory.cpp
new file mode 100644
index 00000000000..a94b94dec81
--- /dev/null
+++ b/cpp/demo/Ice/value/Factory.cpp
@@ -0,0 +1,28 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <Factory.h>
+#include <ValueI.h>
+
+using namespace std;
+
+Ice::ObjectPtr
+Factory::create(const string& id)
+{
+ if (id == "::Printer")
+ return new PrinterI;
+
+ if (id == "::DerivedPrinter")
+ return new DerivedPrinterI;
+
+ assert(false);
+ return 0;
+}