diff options
Diffstat (limited to 'cpp/demo/Ice/value/ServantFactory.cpp')
-rw-r--r-- | cpp/demo/Ice/value/ServantFactory.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cpp/demo/Ice/value/ServantFactory.cpp b/cpp/demo/Ice/value/ServantFactory.cpp index 4d8e3398c52..6f774c4a014 100644 --- a/cpp/demo/Ice/value/ServantFactory.cpp +++ b/cpp/demo/Ice/value/ServantFactory.cpp @@ -15,13 +15,17 @@ using namespace std; Ice::ObjectPtr -Factory::create(const string& id) +ServantFactory::create(const string& type) { - if (id == "::Printer") + if (type == "::Printer") + { return new PrinterI; + } - if (id == "::DerivedPrinter") + if (type == "::DerivedPrinter") + { return new DerivedPrinterI; + } assert(false); return 0; |