"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xbmc/settings/lib/SettingDependency.cpp" between
xbmc-19.0-Matrix.tar.gz and xbmc-19.1.tar.gz

About:

SettingDependency.cpp  (xbmc-19.0-Matrix):SettingDependency.cpp  (xbmc-19.1)
skipping to change at line 24 skipping to change at line 24
#include "SettingsManager.h" #include "SettingsManager.h"
#include "utils/StringUtils.h" #include "utils/StringUtils.h"
#include "utils/XBMCTinyXML.h" #include "utils/XBMCTinyXML.h"
#include "utils/log.h" #include "utils/log.h"
#include <memory> #include <memory>
#include <set> #include <set>
#include <stdlib.h> #include <stdlib.h>
#include <string> #include <string>
Logger CSettingDependencyCondition::s_logger;
CSettingDependencyCondition::CSettingDependencyCondition( CSettingDependencyCondition::CSettingDependencyCondition(
CSettingsManager* settingsManager /* = nullptr */) CSettingsManager* settingsManager /* = nullptr */)
: CSettingConditionItem(settingsManager), CStaticLoggerBase("CSettingDependenc : CSettingDependencyCondition(settingsManager, "", "", "")
yCondition") {
{ } }
CSettingDependencyCondition::CSettingDependencyCondition( CSettingDependencyCondition::CSettingDependencyCondition(
const std::string& setting, const std::string& setting,
const std::string& value, const std::string& value,
SettingDependencyOperator op, SettingDependencyOperator op,
bool negated /* = false */, bool negated /* = false */,
CSettingsManager* settingsManager /* = nullptr */) CSettingsManager* settingsManager /* = nullptr */)
: CSettingConditionItem(settingsManager), : CSettingDependencyCondition(
CStaticLoggerBase("CSettingDependencyCondition"), settingsManager, setting, setting, value, SettingDependencyTarget::Setti
m_target(SettingDependencyTarget::Setting), ng, op, negated)
m_operator(op)
{ {
m_setting = m_name = setting;
m_value = value;
m_negated = negated;
} }
CSettingDependencyCondition::CSettingDependencyCondition( CSettingDependencyCondition::CSettingDependencyCondition(
const std::string& strProperty, const std::string& strProperty,
const std::string& value, const std::string& value,
const std::string& setting /* = "" */, const std::string& setting /* = "" */,
bool negated /* = false */, bool negated /* = false */,
CSettingsManager* settingsManager /* = nullptr */) CSettingsManager* settingsManager /* = nullptr */)
: CSettingConditionItem(settingsManager), : CSettingDependencyCondition(settingsManager,
CStaticLoggerBase("CSettingDependencyCondition"), strProperty,
m_target(SettingDependencyTarget::Property) setting,
value,
SettingDependencyTarget::Property,
SettingDependencyOperator::Equals,
negated)
{
}
CSettingDependencyCondition::CSettingDependencyCondition(
CSettingsManager* settingsManager,
const std::string& strProperty,
const std::string& setting,
const std::string& value,
SettingDependencyTarget target /* = SettingDependencyTarget::Unknown */,
SettingDependencyOperator op /* = SettingDependencyOperator::Equals */,
bool negated /* = false */)
: CSettingConditionItem(settingsManager), m_target(target), m_operator(op)
{ {
if (s_logger == nullptr)
s_logger = CServiceBroker::GetLogging().GetLogger("CSettingDependencyConditi
on");
m_name = strProperty; m_name = strProperty;
m_setting = setting;
m_value = value; m_value = value;
m_setting = setting;
m_negated = negated; m_negated = negated;
} }
bool CSettingDependencyCondition::Deserialize(const TiXmlNode *node) bool CSettingDependencyCondition::Deserialize(const TiXmlNode *node)
{ {
if (!CSettingConditionItem::Deserialize(node)) if (!CSettingConditionItem::Deserialize(node))
return false; return false;
auto elem = node->ToElement(); auto elem = node->ToElement();
if (elem == nullptr) if (elem == nullptr)
skipping to change at line 324 skipping to change at line 341
{ {
m_operations.push_back(operation); m_operations.push_back(operation);
const auto& settings = operation->GetSettings(); const auto& settings = operation->GetSettings();
m_settings.insert(settings.begin(), settings.end()); m_settings.insert(settings.begin(), settings.end());
} }
return this; return this;
} }
Logger CSettingDependency::s_logger;
CSettingDependency::CSettingDependency(CSettingsManager* settingsManager /* = nu llptr */) CSettingDependency::CSettingDependency(CSettingsManager* settingsManager /* = nu llptr */)
: CSettingCondition(settingsManager), CStaticLoggerBase("CSettingDependency") : CSettingDependency(SettingDependencyType::Unknown, settingsManager)
{ {
m_operation = CBooleanLogicOperationPtr(new CSettingDependencyConditionCombina tion(m_settingsManager));
} }
CSettingDependency::CSettingDependency(SettingDependencyType type, CSettingDependency::CSettingDependency(SettingDependencyType type,
CSettingsManager* settingsManager /* = nu llptr */) CSettingsManager* settingsManager /* = nu llptr */)
: CSettingCondition(settingsManager), CStaticLoggerBase("CSettingDependency"), m_type(type) : CSettingCondition(settingsManager), m_type(type)
{ {
if (s_logger == nullptr)
s_logger = CServiceBroker::GetLogging().GetLogger("CSettingDependency");
m_operation = CBooleanLogicOperationPtr(new CSettingDependencyConditionCombina tion(m_settingsManager)); m_operation = CBooleanLogicOperationPtr(new CSettingDependencyConditionCombina tion(m_settingsManager));
} }
bool CSettingDependency::Deserialize(const TiXmlNode *node) bool CSettingDependency::Deserialize(const TiXmlNode *node)
{ {
if (node == nullptr) if (node == nullptr)
return false; return false;
auto elem = node->ToElement(); auto elem = node->ToElement();
if (elem == nullptr) if (elem == nullptr)
 End of changes. 13 change blocks. 
17 lines changed or deleted 39 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)