add documentation

This commit is contained in:
Simon Stürz 2015-03-11 11:04:34 +01:00 committed by Michael Zanetti
parent 584fec345f
commit 7b6c9d3655
3 changed files with 6 additions and 4 deletions

View File

@ -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<EventDescriptor> &eventDescriptorList, const StateEvaluator &stateEvaluator, const QList<Action> &actionList, const QList<Action> &exitActionList, bool enabled)
{

View File

@ -52,7 +52,7 @@ Rule::Rule(const RuleId &id, const QString &name, const QList<EventDescriptor> &
}
/*! 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<EventDescriptor> &eventDescriptorList, const StateEvaluator &stateEvaluator, const QList<Action> &actions, const QList<Action> &exitActions):
m_id(id),
m_name(name),

View File

@ -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<Rule> 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<EventDescriptor> &eventDescriptorList, const QList<Action> &actions, bool enabled)
{
return addRule(ruleId, name, eventDescriptorList, StateEvaluator(), actions, QList<Action>(), 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<EventDescriptor> &eventDescriptorList, const StateEvaluator &stateEvaluator, const QList<Action> &actions, const QList<Action> &exitActions, bool enabled)
{
if (ruleId.isNull()) {