Index: src/ch/TConfig.cpp =================================================================== diff -u -N -r8213d63ae7b0a09fc4c5e15aa6ca7ddf655ae31f -r3f72015a9db19bd1b0a5e20e0f1aa0ec00bda529 --- src/ch/TConfig.cpp (.../TConfig.cpp) (revision 8213d63ae7b0a09fc4c5e15aa6ca7ddf655ae31f) +++ src/ch/TConfig.cpp (.../TConfig.cpp) (revision 3f72015a9db19bd1b0a5e20e0f1aa0ec00bda529) @@ -360,6 +360,31 @@ return *this; } +chcore::TSmartPath TConfig::GetPath(PCTSTR pszPropName, const chcore::TSmartPath& pathDefault) const +{ + boost::shared_lock lock(m_lock); + std::wstring wstrData = m_propTree.get(pszPropName, std::wstring(pathDefault)); + return chcore::TSmartPath(wstrData); +} + +bool TConfig::GetValue(PCTSTR pszPropName, chcore::TSmartPath& rpathValue) const +{ + std::wstring wstrData; + bool bResult = ::GetValue(m_propTree, pszPropName, wstrData, m_lock); + rpathValue = wstrData.c_str(); + + return bResult; +} + +TConfig& TConfig::SetValue(PCTSTR pszPropName, const chcore::TSmartPath& pathValue) +{ + std::wstring wstrData = pathValue; + if(::SetValue(m_propTree, m_bModified, m_lock, pszPropName, wstrData)) + SendNotification(pszPropName); + + return *this; +} + bool TConfig::GetValue(PCTSTR pszPropName, std::vector& rvValues) const { boost::shared_lock lock(m_lock);