backport SharedLibrary changes from 1.4.2-p1

This commit is contained in:
Marian Krivos
2011-11-04 18:56:08 +00:00
parent 5084562770
commit 97ec3f5bf6
16 changed files with 155 additions and 96 deletions

View File

@@ -55,7 +55,7 @@ namespace Poco {
namespace Util {
AbstractConfiguration::AbstractConfiguration(): _depth(0)
AbstractConfiguration::AbstractConfiguration(): _depth(0), _propertyEventing(true)
{
}
@@ -292,13 +292,13 @@ std::string AbstractConfiguration::expand(const std::string& value) const
void AbstractConfiguration::remove(const std::string& key)
{
propertyRemoving(this, key);
if (_propertyEventing) propertyRemoving(this, key);
{
FastMutex::ScopedLock lock(_mutex);
removeRaw(key);
}
propertyRemoved(this, key);
if (_propertyEventing) propertyRemoved(this, key);
}
@@ -386,14 +386,18 @@ bool AbstractConfiguration::parseBool(const std::string& value)
void AbstractConfiguration::setRawWithEvent(const std::string& key, std::string value)
{
KeyValue kv(key, value);
propertyChanging(this, kv);
if (_propertyEventing) propertyChanging(this, kv);
{
FastMutex::ScopedLock lock(_mutex);
setRaw(key, value);
}
propertyChanged(this, kv);
if (_propertyEventing) propertyChanged(this, kv);
}
void AbstractConfiguration::setPropertyEventingMode(bool enabled)
{
_propertyEventing = enabled;
}
} } // namespace Poco::Util