// ********************************************************************** // // Copyright (c) 2003 - 2004 // ZeroC, Inc. // North Palm Beach, FL, USA // // All Rights Reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; void IceInternal::incRef(DefaultsAndOverrides* p) { p->__incRef(); } void IceInternal::decRef(DefaultsAndOverrides* p) { p->__decRef(); } IceInternal::DefaultsAndOverrides::DefaultsAndOverrides(const PropertiesPtr& properties) : overrideTimeout(false), overrideTimeoutValue(-1), overrideConnectTimeout(false), overrideConnectTimeoutValue(-1), overrideCompress(false), overrideCompressValue(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.Override.Timeout"); if(!value.empty()) { const_cast(overrideTimeout) = true; const_cast(overrideTimeoutValue) = properties->getPropertyAsInt("Ice.Override.Timeout"); } value = properties->getProperty("Ice.Override.ConnectTimeout"); if(!value.empty()) { const_cast(overrideConnectTimeout) = true; const_cast(overrideConnectTimeoutValue) = properties->getPropertyAsInt("Ice.Override.ConnectTimeout"); } value = properties->getProperty("Ice.Override.Compress"); if(!value.empty()) { const_cast(overrideCompress) = true; const_cast(overrideCompressValue) = properties->getPropertyAsInt("Ice.Override.Compress"); } const_cast(defaultLocator) = properties->getProperty("Ice.Default.Locator"); }