summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/FactoryTableInit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/FactoryTableInit.cpp')
-rw-r--r--cpp/src/Ice/FactoryTableInit.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/cpp/src/Ice/FactoryTableInit.cpp b/cpp/src/Ice/FactoryTableInit.cpp
index fbc2bd82169..557bab6f56c 100644
--- a/cpp/src/Ice/FactoryTableInit.cpp
+++ b/cpp/src/Ice/FactoryTableInit.cpp
@@ -79,3 +79,17 @@ IceInternal::FactoryTableInit::~FactoryTableInit()
delete factoryTable;
}
}
+
+
+IceInternal::CompactIdInit::CompactIdInit(const char* typeId, int compactId) :
+ _compactId(compactId)
+{
+ assert(_compactId >= 0);
+ factoryTable->addTypeId(_compactId, typeId);
+}
+
+IceInternal::CompactIdInit::~CompactIdInit()
+{
+ factoryTable->removeTypeId(_compactId);
+}
+