diff options
author | Marc Laukien <marc@zeroc.com> | 2002-04-17 18:18:56 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-04-17 18:18:56 +0000 |
commit | ba3284190a5c6d7ded9645f00e965c5162393a5b (patch) | |
tree | 9d036f1baef585b57bad59e17de5516d9f9882b0 /cpp/src/Ice/TraceLevels.cpp | |
parent | getPropertyAsInt (diff) | |
download | ice-ba3284190a5c6d7ded9645f00e965c5162393a5b.tar.bz2 ice-ba3284190a5c6d7ded9645f00e965c5162393a5b.tar.xz ice-ba3284190a5c6d7ded9645f00e965c5162393a5b.zip |
property convenience operations
Diffstat (limited to 'cpp/src/Ice/TraceLevels.cpp')
-rw-r--r-- | cpp/src/Ice/TraceLevels.cpp | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/cpp/src/Ice/TraceLevels.cpp b/cpp/src/Ice/TraceLevels.cpp index 87fc3fe070c..d636cec2135 100644 --- a/cpp/src/Ice/TraceLevels.cpp +++ b/cpp/src/Ice/TraceLevels.cpp @@ -19,41 +19,16 @@ void IceInternal::incRef(TraceLevels* p) { p->__incRef(); } void IceInternal::decRef(TraceLevels* p) { p->__decRef(); } IceInternal::TraceLevels::TraceLevels(const PropertiesPtr& properties) : - network(0), networkCat("Network"), - protocol(0), protocolCat("Protocol"), - retry(0), retryCat("Retry"), - security(0), securityCat("Security") { - string value; const string keyBase = "Ice.Trace."; - - value = properties->getProperty(keyBase + networkCat); - if (!value.empty()) - { - const_cast<int&>(network) = atoi(value.c_str()); - } - - value = properties->getProperty(keyBase + protocolCat); - if (!value.empty()) - { - const_cast<int&>(protocol) = atoi(value.c_str()); - } - - value = properties->getProperty(keyBase + retryCat); - if (!value.empty()) - { - const_cast<int&>(retry) = atoi(value.c_str()); - } - - value = properties->getProperty(keyBase + securityCat); - if (!value.empty()) - { - const_cast<int&>(security) = atoi(value.c_str()); - } + const_cast<int&>(network) = properties->getPropertyAsInt(keyBase + networkCat); + const_cast<int&>(protocol) = properties->getPropertyAsInt(keyBase + protocolCat); + const_cast<int&>(retry) = properties->getPropertyAsInt(keyBase + retryCat); + const_cast<int&>(security) = properties->getPropertyAsInt(keyBase + securityCat); } IceInternal::TraceLevels::~TraceLevels() |