diff options
author | Marc Laukien <marc@zeroc.com> | 2001-08-14 11:52:47 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-08-14 11:52:47 +0000 |
commit | 91a394a09d9684d20cfa4c941cebb6b3579b9666 (patch) | |
tree | eb99bdac118a23814e1dfcd8d4e5fc64a9c8f0cc /cpp/src/Ice/TraceLevels.cpp | |
parent | locator (diff) | |
download | ice-91a394a09d9684d20cfa4c941cebb6b3579b9666.tar.bz2 ice-91a394a09d9684d20cfa4c941cebb6b3579b9666.tar.xz ice-91a394a09d9684d20cfa4c941cebb6b3579b9666.zip |
changed directory structure
Diffstat (limited to 'cpp/src/Ice/TraceLevels.cpp')
-rw-r--r-- | cpp/src/Ice/TraceLevels.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/cpp/src/Ice/TraceLevels.cpp b/cpp/src/Ice/TraceLevels.cpp new file mode 100644 index 00000000000..7e454ff7dc5 --- /dev/null +++ b/cpp/src/Ice/TraceLevels.cpp @@ -0,0 +1,47 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// MutableRealms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/TraceLevels.h> +#include <Ice/Properties.h> + +using namespace std; +using namespace Ice; +using namespace IceInternal; + +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") +{ + 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()); +} + +IceInternal::TraceLevels::~TraceLevels() +{ +} |