"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/config/applyrule.cpp" between
icinga2-2.11.5.tar.gz and icinga2-2.12.0.tar.gz

About: Icinga 2 is an enterprise grade monitoring system which keeps watch over networks and any conceivable network resource.

applyrule.cpp  (icinga2-2.11.5):applyrule.cpp  (icinga2-2.12.0)
skipping to change at line 12 skipping to change at line 12
#include "config/applyrule.hpp" #include "config/applyrule.hpp"
#include "base/logger.hpp" #include "base/logger.hpp"
#include <set> #include <set>
using namespace icinga; using namespace icinga;
ApplyRule::RuleMap ApplyRule::m_Rules; ApplyRule::RuleMap ApplyRule::m_Rules;
ApplyRule::TypeMap ApplyRule::m_Types; ApplyRule::TypeMap ApplyRule::m_Types;
ApplyRule::ApplyRule(String targetType, String name, std::shared_ptr<Expression> ApplyRule::ApplyRule(String targetType, String name, Expression::Ptr expression,
expression, Expression::Ptr filter, String package, String fkvar, String fvvar, Expre
std::shared_ptr<Expression> filter, String package, String fkvar, String ssion::Ptr fterm,
fvvar, std::shared_ptr<Expression> fterm,
bool ignoreOnError, DebugInfo di, Dictionary::Ptr scope) bool ignoreOnError, DebugInfo di, Dictionary::Ptr scope)
: m_TargetType(std::move(targetType)), m_Name(std::move(name)), m_Express ion(std::move(expression)), m_Filter(std::move(filter)), m_Package(std::move(pac kage)), m_FKVar(std::move(fkvar)), : m_TargetType(std::move(targetType)), m_Name(std::move(name)), m_Express ion(std::move(expression)), m_Filter(std::move(filter)), m_Package(std::move(pac kage)), m_FKVar(std::move(fkvar)),
m_FVVar(std::move(fvvar)), m_FTerm(std::move(fterm)), m_IgnoreOnError(ign oreOnError), m_DebugInfo(std::move(di)), m_Scope(std::move(scope)), m_HasMatches (false) m_FVVar(std::move(fvvar)), m_FTerm(std::move(fterm)), m_IgnoreOnError(ign oreOnError), m_DebugInfo(std::move(di)), m_Scope(std::move(scope)), m_HasMatches (false)
{ } { }
String ApplyRule::GetTargetType() const String ApplyRule::GetTargetType() const
{ {
return m_TargetType; return m_TargetType;
} }
String ApplyRule::GetName() const String ApplyRule::GetName() const
{ {
return m_Name; return m_Name;
} }
std::shared_ptr<Expression> ApplyRule::GetExpression() const Expression::Ptr ApplyRule::GetExpression() const
{ {
return m_Expression; return m_Expression;
} }
std::shared_ptr<Expression> ApplyRule::GetFilter() const Expression::Ptr ApplyRule::GetFilter() const
{ {
return m_Filter; return m_Filter;
} }
String ApplyRule::GetPackage() const String ApplyRule::GetPackage() const
{ {
return m_Package; return m_Package;
} }
String ApplyRule::GetFKVar() const String ApplyRule::GetFKVar() const
{ {
return m_FKVar; return m_FKVar;
} }
String ApplyRule::GetFVVar() const String ApplyRule::GetFVVar() const
{ {
return m_FVVar; return m_FVVar;
} }
std::shared_ptr<Expression> ApplyRule::GetFTerm() const Expression::Ptr ApplyRule::GetFTerm() const
{ {
return m_FTerm; return m_FTerm;
} }
bool ApplyRule::GetIgnoreOnError() const bool ApplyRule::GetIgnoreOnError() const
{ {
return m_IgnoreOnError; return m_IgnoreOnError;
} }
DebugInfo ApplyRule::GetDebugInfo() const DebugInfo ApplyRule::GetDebugInfo() const
{ {
return m_DebugInfo; return m_DebugInfo;
} }
Dictionary::Ptr ApplyRule::GetScope() const Dictionary::Ptr ApplyRule::GetScope() const
{ {
return m_Scope; return m_Scope;
} }
void ApplyRule::AddRule(const String& sourceType, const String& targetType, cons t String& name, void ApplyRule::AddRule(const String& sourceType, const String& targetType, cons t String& name,
const std::shared_ptr<Expression>& expression, const std::shared_ptr<Expr const Expression::Ptr& expression, const Expression::Ptr& filter, const S
ession>& filter, const String& package, const String& fkvar, tring& package, const String& fkvar,
const String& fvvar, const std::shared_ptr<Expression>& fterm, bool ignor const String& fvvar, const Expression::Ptr& fterm, bool ignoreOnError, co
eOnError, const DebugInfo& di, const Dictionary::Ptr& scope) nst DebugInfo& di, const Dictionary::Ptr& scope)
{ {
m_Rules[sourceType].push_back(ApplyRule(targetType, name, expression, fil ter, package, fkvar, fvvar, fterm, ignoreOnError, di, scope)); m_Rules[sourceType].push_back(ApplyRule(targetType, name, expression, fil ter, package, fkvar, fvvar, fterm, ignoreOnError, di, scope));
} }
bool ApplyRule::EvaluateFilter(ScriptFrame& frame) const bool ApplyRule::EvaluateFilter(ScriptFrame& frame) const
{ {
return Convert::ToBool(m_Filter->Evaluate(frame)); return Convert::ToBool(m_Filter->Evaluate(frame));
} }
void ApplyRule::RegisterType(const String& sourceType, const std::vector<String> & targetTypes) void ApplyRule::RegisterType(const String& sourceType, const std::vector<String> & targetTypes)
 End of changes. 5 change blocks. 
11 lines changed or deleted 10 lines changed or added

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