From 5a85eebb5e9162260ffb93f217b16f229976288b Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Mon, 17 Sep 2012 10:16:43 +0200 Subject: Moved some MX classes to IceInternal --- cpp/src/Ice/MetricsAdminI.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'cpp/src/Ice/MetricsAdminI.cpp') diff --git a/cpp/src/Ice/MetricsAdminI.cpp b/cpp/src/Ice/MetricsAdminI.cpp index 53448eb1173..0c91b0e4791 100644 --- a/cpp/src/Ice/MetricsAdminI.cpp +++ b/cpp/src/Ice/MetricsAdminI.cpp @@ -20,6 +20,7 @@ using namespace std; using namespace Ice; +using namespace IceInternal; using namespace IceMX; namespace @@ -119,21 +120,13 @@ MetricsMapI::RegExp::~RegExp() } bool -MetricsMapI::RegExp::match(const MetricsHelper& helper, bool reject) +MetricsMapI::RegExp::match(const string& value, bool reject) { - try - { - string value = helper(_attribute); #ifndef ICE_CPP11_REGEXP - return regexec(&_preg, value.c_str(), 0, 0, 0) == 0; + return regexec(&_preg, value.c_str(), 0, 0, 0) == 0; #else - return regex_match(value, _regex); + return regex_match(value, _regex); #endif - } - catch(const std::exception&) - { - return !reject; - } } MetricsMapI::MetricsMapI(const std::string& mapPrefix, const PropertiesPtr& properties) : @@ -365,6 +358,7 @@ MetricsViewI::getMap(const string& mapName) const MetricsAdminI::MetricsAdminI(const PropertiesPtr& properties, const LoggerPtr& logger) : _logger(logger), _properties(properties) { + updateViews(); } void -- cgit v1.2.3