diff options
author | Matthew Newhook <matthew@zeroc.com> | 2002-03-13 03:55:22 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2002-03-13 03:55:22 +0000 |
commit | 0ac325172b7608a2fa0c366a7665940ef14c562f (patch) | |
tree | 47e65b54c6e4e870a7b3e78f032bcb88f65f96be /cpp/demo/Freeze/library/BookFactory.cpp | |
parent | bug fix (diff) | |
download | ice-0ac325172b7608a2fa0c366a7665940ef14c562f.tar.bz2 ice-0ac325172b7608a2fa0c366a7665940ef14c562f.tar.xz ice-0ac325172b7608a2fa0c366a7665940ef14c562f.zip |
Initial version of library demo.
Diffstat (limited to 'cpp/demo/Freeze/library/BookFactory.cpp')
-rw-r--r-- | cpp/demo/Freeze/library/BookFactory.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cpp/demo/Freeze/library/BookFactory.cpp b/cpp/demo/Freeze/library/BookFactory.cpp new file mode 100644 index 00000000000..7833f36366e --- /dev/null +++ b/cpp/demo/Freeze/library/BookFactory.cpp @@ -0,0 +1,37 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <BookFactory.h> + +using namespace std; +using namespace Ice; + +BookFactory::BookFactory(const LibraryIPtr& library, const Freeze::EvictorPtr& evictor) : + _library(library), + _evictor(evictor) +{ +} + +ObjectPtr +BookFactory::create(const string& type) +{ + assert(type == "::Book"); + return new BookI(_library, _evictor); +} + +void +BookFactory::destroy() +{ + // + // Break cyclic object dependencies + // + _library = 0; + _evictor = 0; +} |