diff options
author | Michi Henning <michi@zeroc.com> | 2005-08-05 05:10:55 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-08-05 05:10:55 +0000 |
commit | 4d1967b5e69ae2a2fe572b9b69ef798a6c364da9 (patch) | |
tree | 4a97787ec006f73a4080a996b0892a4097aa6366 /cpp/src | |
parent | adding default config (diff) | |
download | ice-4d1967b5e69ae2a2fe572b9b69ef798a6c364da9.tar.bz2 ice-4d1967b5e69ae2a2fe572b9b69ef798a6c364da9.tar.xz ice-4d1967b5e69ae2a2fe572b9b69ef798a6c364da9.zip |
Moved FactoryTable into IceInternal namespace.
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/BasicStream.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/FactoryTable.cpp | 12 | ||||
-rw-r--r-- | cpp/src/Ice/FactoryTableDef.cpp | 28 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 8 | ||||
-rw-r--r-- | cpp/src/slice2cppe/Gen.cpp | 4 |
5 files changed, 27 insertions, 27 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index ac5d470f146..b3b7e03b80b 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -1558,7 +1558,7 @@ IceInternal::BasicStream::read(PatchFunc patchFunc, void* patchAddr) // if(!v) { - ObjectFactoryPtr of = Ice::factoryTable->getObjectFactory(id); + ObjectFactoryPtr of = IceInternal::factoryTable->getObjectFactory(id); if(of) { v = of->create(id); diff --git a/cpp/src/Ice/FactoryTable.cpp b/cpp/src/Ice/FactoryTable.cpp index 04d4d570e98..8e3742ce007 100644 --- a/cpp/src/Ice/FactoryTable.cpp +++ b/cpp/src/Ice/FactoryTable.cpp @@ -11,23 +11,23 @@ #include <Ice/UserExceptionFactory.h> // -// This constructor initializes the single global Ice::factoryTable instance +// This constructor initializes the single global IceInternal::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 Ice::factoryTable is always initialized before it is used. +// This ensures that IceInternal::factoryTable is always initialized before it is used. // -Ice::FactoryTable::FactoryTable() +IceInternal::FactoryTable::FactoryTable() { - Ice::factoryTableWrapper.initialize(); + IceInternal::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. // -Ice::FactoryTable::~FactoryTable() +IceInternal::FactoryTable::~FactoryTable() { - Ice::factoryTableWrapper.finalize(); + IceInternal::factoryTableWrapper.finalize(); } diff --git a/cpp/src/Ice/FactoryTableDef.cpp b/cpp/src/Ice/FactoryTableDef.cpp index bec8c961aca..3f3e9a372a4 100644 --- a/cpp/src/Ice/FactoryTableDef.cpp +++ b/cpp/src/Ice/FactoryTableDef.cpp @@ -14,7 +14,7 @@ # include <dlfcn.h> #endif -namespace Ice +namespace IceInternal { FactoryTableWrapper factoryTableWrapper; // Single global instance of the wrapper object that @@ -29,7 +29,7 @@ ICE_API FactoryTableDef* factoryTable; // Single global instance of the factory // If the factory is present already, increment its reference count. // void -Ice::FactoryTableDef::addExceptionFactory(const std::string& t, const IceInternal::UserExceptionFactoryPtr& f) +IceInternal::FactoryTableDef::addExceptionFactory(const std::string& t, const IceInternal::UserExceptionFactoryPtr& f) { IceUtil::Mutex::Lock lock(_m); EFTable::iterator i = _eft.find(t); @@ -47,7 +47,7 @@ Ice::FactoryTableDef::addExceptionFactory(const std::string& t, const IceInterna // Return the exception factory for a given type ID // IceInternal::UserExceptionFactoryPtr -Ice::FactoryTableDef::getExceptionFactory(const std::string& t) const +IceInternal::FactoryTableDef::getExceptionFactory(const std::string& t) const { IceUtil::Mutex::Lock lock(_m); EFTable::const_iterator i = _eft.find(t); @@ -83,7 +83,7 @@ Ice::FactoryTableDef::getExceptionFactory(const std::string& t) const // entry from the table. // void -Ice::FactoryTableDef::removeExceptionFactory(const std::string& t) +IceInternal::FactoryTableDef::removeExceptionFactory(const std::string& t) { IceUtil::Mutex::Lock lock(_m); EFTable::iterator i = _eft.find(t); @@ -100,7 +100,7 @@ Ice::FactoryTableDef::removeExceptionFactory(const std::string& t) // Add a factory to the object factory table. // void -Ice::FactoryTableDef::addObjectFactory(const std::string& t, const ObjectFactoryPtr& f) +IceInternal::FactoryTableDef::addObjectFactory(const std::string& t, const Ice::ObjectFactoryPtr& f) { IceUtil::Mutex::Lock lock(_m); OFTable::iterator i = _oft.find(t); @@ -118,7 +118,7 @@ Ice::FactoryTableDef::addObjectFactory(const std::string& t, const ObjectFactory // Return the object factory for a given type ID // Ice::ObjectFactoryPtr -Ice::FactoryTableDef::getObjectFactory(const std::string& t) const +IceInternal::FactoryTableDef::getObjectFactory(const std::string& t) const { IceUtil::Mutex::Lock lock(_m); OFTable::const_iterator i = _oft.find(t); @@ -144,7 +144,7 @@ Ice::FactoryTableDef::getObjectFactory(const std::string& t) const i = _oft.find(t); } #endif - return i != _oft.end() ? i->second.first : ObjectFactoryPtr(); + return i != _oft.end() ? i->second.first : Ice::ObjectFactoryPtr(); } // @@ -154,7 +154,7 @@ Ice::FactoryTableDef::getObjectFactory(const std::string& t) const // entry from the table. // void -Ice::FactoryTableDef::removeObjectFactory(const std::string& t) +IceInternal::FactoryTableDef::removeObjectFactory(const std::string& t) { IceUtil::Mutex::Lock lock(_m); OFTable::iterator i = _oft.find(t); @@ -173,12 +173,12 @@ Ice::FactoryTableDef::removeObjectFactory(const std::string& t) // FactoryTableWrapper. This ensures that the global factoryTable variable is initialized // before it can be used, regardless of the order of initialization of global objects. // -Ice::FactoryTableWrapper::FactoryTableWrapper() +IceInternal::FactoryTableWrapper::FactoryTableWrapper() { initialize(); } -Ice::FactoryTableWrapper::~FactoryTableWrapper() +IceInternal::FactoryTableWrapper::~FactoryTableWrapper() { finalize(); } @@ -188,7 +188,7 @@ Ice::FactoryTableWrapper::~FactoryTableWrapper() // the number of calls made. // void -Ice::FactoryTableWrapper::initialize() +IceInternal::FactoryTableWrapper::initialize() { IceUtil::StaticMutex::Lock lock(_m); if(_initCount == 0) @@ -202,7 +202,7 @@ Ice::FactoryTableWrapper::initialize() // Delete the table if its reference count drops to zero. // void -Ice::FactoryTableWrapper::finalize() +IceInternal::FactoryTableWrapper::finalize() { IceUtil::StaticMutex::Lock lock(_m); if(--_initCount == 0) @@ -211,5 +211,5 @@ Ice::FactoryTableWrapper::finalize() } } -IceUtil::StaticMutex Ice::FactoryTableWrapper::_m = ICE_STATIC_MUTEX_INITIALIZER; -int Ice::FactoryTableWrapper::_initCount = 0; // Initialization count +IceUtil::StaticMutex IceInternal::FactoryTableWrapper::_m = ICE_STATIC_MUTEX_INITIALIZER; +int IceInternal::FactoryTableWrapper::_initCount = 0; // Initialization count diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 6ebb4b44bf0..f5c8c3542a1 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -696,12 +696,12 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) C.inc(); C << sp << nl << factoryName << "__Init()"; C << sb; - C << nl << "::Ice::factoryTable->addExceptionFactory(\"" << p->scoped() << "\", " << scoped + C << nl << "::IceInternal::factoryTable->addExceptionFactory(\"" << p->scoped() << "\", " << scoped << "::ice_factory());"; C << eb; C << sp << nl << "~" << factoryName << "__Init()"; C << sb; - C << nl << "::Ice::factoryTable->removeExceptionFactory(\"" << p->scoped() << "\");"; + C << nl << "::IceInternal::factoryTable->removeExceptionFactory(\"" << p->scoped() << "\");"; C << eb; C << eb << ';'; C << sp << nl << "static " << factoryName << "__Init "<< factoryName << "__i;"; @@ -2776,12 +2776,12 @@ Slice::Gen::ObjectVisitor::visitClassDefEnd(const ClassDefPtr& p) C.inc(); C << sp << nl << factoryName << "__Init()"; C << sb; - C << nl << "::Ice::factoryTable->addObjectFactory(" << scoped << "::ice_staticId(), " + C << nl << "::IceInternal::factoryTable->addObjectFactory(" << scoped << "::ice_staticId(), " << scoped << "::ice_factory());"; C << eb; C << sp << nl << "~" << factoryName << "__Init()"; C << sb; - C << nl << "::Ice::factoryTable->removeObjectFactory(" << scoped << "::ice_staticId());"; + C << nl << "::IceInternal::factoryTable->removeObjectFactory(" << scoped << "::ice_staticId());"; C << eb; C << eb << ';'; diff --git a/cpp/src/slice2cppe/Gen.cpp b/cpp/src/slice2cppe/Gen.cpp index 0818310a8e7..974156cedae 100644 --- a/cpp/src/slice2cppe/Gen.cpp +++ b/cpp/src/slice2cppe/Gen.cpp @@ -592,12 +592,12 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p) C.inc(); C << sp << nl << factoryName << "__Init()"; C << sb; - C << nl << "::Ice::factoryTable->addExceptionFactory(\"" << p->scoped() << "\", " << scoped + C << nl << "::IceInternal::factoryTable->addExceptionFactory(\"" << p->scoped() << "\", " << scoped << "::ice_factory());"; C << eb; C << sp << nl << "~" << factoryName << "__Init()"; C << sb; - C << nl << "::Ice::factoryTable->removeExceptionFactory(\"" << p->scoped() << "\");"; + C << nl << "::IceInternal::factoryTable->removeExceptionFactory(\"" << p->scoped() << "\");"; C << eb; C << eb << ';'; C << sp << nl << "static " << factoryName << "__Init "<< factoryName << "__i;"; |