// ********************************************************************** // // Copyright (c) 2001 // MutableRealms, Inc. // Huntsville, AL, USA // // All Rights Reserved // // ********************************************************************** #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; void IceInternal::incRef(DefaultsAndOverwrites* p) { p->__incRef(); } void IceInternal::decRef(DefaultsAndOverwrites* p) { p->__decRef(); } IceInternal::DefaultsAndOverwrites::DefaultsAndOverwrites(const PropertiesPtr& properties) : overwriteTimeout(false), overwriteTimeoutValue(-1), overwriteCompress(false), overwriteCompressValue(false) { const_cast(defaultProtocol) = properties->getPropertyWithDefault("Ice.Default.Protocol", "tcp"); const_cast(defaultHost) = properties->getProperty("Ice.Default.Host"); if (defaultHost.empty()) { const_cast(defaultHost) = getLocalHost(true); } const_cast(defaultRouter) = properties->getProperty("Ice.Default.Router"); string value; value = properties->getProperty("Ice.Overwrite.Timeout"); if (!value.empty()) { const_cast(overwriteTimeout) = true; const_cast(overwriteTimeoutValue) = atoi(value.c_str()); } value = properties->getProperty("Ice.Overwrite.Compress"); if (!value.empty()) { const_cast(overwriteCompress) = true; const_cast(overwriteCompressValue) = atoi(value.c_str()); } }