summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/FactoryTable.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2005-07-05 11:09:55 +0000
committerDwayne Boone <dwayne@zeroc.com>2005-07-05 11:09:55 +0000
commit9b8cc712d4a41d71840416776bc94ee8485bb9b3 (patch)
tree7d467fdd6a66bc2b5878d82070d45adbd5c20414 /cppe/src/IceE/FactoryTable.cpp
parentcleaning the cache method out of ReferenceFactory (diff)
downloadice-9b8cc712d4a41d71840416776bc94ee8485bb9b3.tar.bz2
ice-9b8cc712d4a41d71840416776bc94ee8485bb9b3.tar.xz
ice-9b8cc712d4a41d71840416776bc94ee8485bb9b3.zip
Changed Ice to IceE EVERYWHERE!!!
Diffstat (limited to 'cppe/src/IceE/FactoryTable.cpp')
-rw-r--r--cppe/src/IceE/FactoryTable.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/cppe/src/IceE/FactoryTable.cpp b/cppe/src/IceE/FactoryTable.cpp
new file mode 100644
index 00000000000..da2bc0e35e3
--- /dev/null
+++ b/cppe/src/IceE/FactoryTable.cpp
@@ -0,0 +1,33 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICEE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <IceE/FactoryTable.h>
+#include <IceE/UserExceptionFactory.h>
+
+//
+// This constructor initializes the single global IceE::factoryTable instance
+// from the outside (if it hasn't been initialized yet). The constructor here
+// is triggered by a file-static instance of FactoryTable in each
+// slice2cpp-generated header file that uses non-local exceptions or non-abstract classes.
+// This ensures that IceE::factoryTable is always initialized before it is used.
+//
+IceE::FactoryTable::FactoryTable()
+{
+
+ IceE::factoryTableWrapper.initialize();
+}
+
+//
+// Similarly, the destructor calls the finalize() method on the factory table wrapper which,
+// once the tables reference count drops to zero, deletes the table.
+//
+IceE::FactoryTable::~FactoryTable()
+{
+ IceE::factoryTableWrapper.finalize();
+}