From 7b6c9d3655b4c159cc74cfcaa250115252b90a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Wed, 11 Mar 2015 11:04:34 +0100 Subject: [PATCH] add documentation --- server/guhcore.cpp | 2 +- server/rule.cpp | 2 +- server/ruleengine.cpp | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/server/guhcore.cpp b/server/guhcore.cpp index c05ddd29..3fd8ad1a 100644 --- a/server/guhcore.cpp +++ b/server/guhcore.cpp @@ -284,7 +284,7 @@ Rule GuhCore::findRule(const RuleId &ruleId) return m_ruleEngine->findRule(ruleId); } -/*! Calls the metheod RuleEngine::addRule(\a id, \a name, \a eventDescriptorList, \a stateEvaluator \a actionList, \a enabled). +/*! Calls the metheod RuleEngine::addRule(\a id, \a name, \a eventDescriptorList, \a stateEvaluator \a actionList, \a exitActionList, \a enabled). * \sa RuleEngine, */ RuleEngine::RuleError GuhCore::addRule(const RuleId &id, const QString &name, const QList &eventDescriptorList, const StateEvaluator &stateEvaluator, const QList &actionList, const QList &exitActionList, bool enabled) { diff --git a/server/rule.cpp b/server/rule.cpp index 00bdb067..cbbbdbe7 100644 --- a/server/rule.cpp +++ b/server/rule.cpp @@ -52,7 +52,7 @@ Rule::Rule(const RuleId &id, const QString &name, const QList & } -/*! Constructs a Rule with the given \a id, \a name, \a eventDescriptorList, \a stateEvaluator, \a actions and exitActions.*/ +/*! Constructs a Rule with the given \a id, \a name, \a eventDescriptorList, \a stateEvaluator, \a actions and \a exitActions.*/ Rule::Rule(const RuleId &id, const QString &name, const QList &eventDescriptorList, const StateEvaluator &stateEvaluator, const QList &actions, const QList &exitActions): m_id(id), m_name(name), diff --git a/server/ruleengine.cpp b/server/ruleengine.cpp index f8634577..d8f09e25 100644 --- a/server/ruleengine.cpp +++ b/server/ruleengine.cpp @@ -54,6 +54,8 @@ Couldn't find a \l{ActionType} with the given id. \value RuleErrorInvalidParameter The given \l{Param} is not valid. + \value RuleErrorInvalidRuleFormat + The format of the rule is not valid. (i.e. add \l{Rule} with exitActions and eventDescriptors) \value RuleErrorMissingParameter One of the given \l{Param}s is missing. */ @@ -231,14 +233,14 @@ QList RuleEngine::evaluateEvent(const Event &event) return rules; } -/*! Add a new \l{Rule} with the given \a ruleId , \a eventDescriptorList and \a actions to the engine. +/*! Add a new \l{Rule} with the given \a ruleId , \a name, \a eventDescriptorList, \a actions and \a enabled value to the engine. For convenience, this creates a Rule without any \l{State} comparison. */ RuleEngine::RuleError RuleEngine::addRule(const RuleId &ruleId, const QString &name, const QList &eventDescriptorList, const QList &actions, bool enabled) { return addRule(ruleId, name, eventDescriptorList, StateEvaluator(), actions, QList(), enabled); } -/*! Add a new \l{Rule} with the given \a ruleId, \a name, \a eventDescriptorList, \a stateEvaluator, the list of \a actions and the \a enabled value to the engine.*/ +/*! Add a new \l{Rule} with the given \a ruleId, \a name, \a eventDescriptorList, \a stateEvaluator, the list of \a actions the list of \a exitActions and the \a enabled value to the engine.*/ RuleEngine::RuleError RuleEngine::addRule(const RuleId &ruleId, const QString &name, const QList &eventDescriptorList, const StateEvaluator &stateEvaluator, const QList &actions, const QList &exitActions, bool enabled) { if (ruleId.isNull()) {