summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/value/ServantFactory.cpp
blob: 4d8e3398c5289de9e82504ff3796b188e1a3d537 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// **********************************************************************
//
// Copyright (c) 2001
// MutableRealms, Inc.
// Huntsville, AL, USA
//
// All Rights Reserved
//
// **********************************************************************

#include <Ice/Ice.h>
#include <ServantFactory.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;
}