From babb384bfc970d0b6411d996e897ccaa8d2d7323 Mon Sep 17 00:00:00 2001 From: Marc Laukien Date: Thu, 4 Apr 2002 01:39:53 +0000 Subject: more IcePatch stuff --- cpp/src/IcePatch/NodeDescFactory.cpp | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 cpp/src/IcePatch/NodeDescFactory.cpp (limited to 'cpp/src/IcePatch/NodeDescFactory.cpp') diff --git a/cpp/src/IcePatch/NodeDescFactory.cpp b/cpp/src/IcePatch/NodeDescFactory.cpp new file mode 100644 index 00000000000..5423adcfd2f --- /dev/null +++ b/cpp/src/IcePatch/NodeDescFactory.cpp @@ -0,0 +1,38 @@ +// ********************************************************************** +// +// Copyright (c) 2002 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include + +using namespace std; +using namespace Ice; +using namespace IcePatch; + +ObjectPtr +IcePatch::NodeDescFactory::create(const std::string& type) +{ + if (type == "::IcePatch::DirectoryDesc") + { + return new DirectoryDesc; + } + + if (type == "::IcePatch::FileDesc") + { + return new FileDesc; + } + + assert(false); + return 0; // To keep the compiler from complaining. +} + +void +IcePatch::NodeDescFactory::destroy() +{ + // Nothing to do. +} -- cgit v1.2.3