aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--diceresult.h4
-rw-r--r--die.h66
-rw-r--r--node/executionnode.h45
-rw-r--r--result.h4
4 files changed, 112 insertions, 7 deletions
diff --git a/diceresult.h b/diceresult.h
index 9bd2cde..ff3edc3 100644
--- a/diceresult.h
+++ b/diceresult.h
@@ -25,7 +25,9 @@
#include "die.h"
#include "result.h"
-
+/**
+ * @brief The DiceResult class
+ */
class DiceResult : public Result
{
public:
diff --git a/die.h b/die.h
index 99596a9..776b54b 100644
--- a/die.h
+++ b/die.h
@@ -24,31 +24,87 @@
#include <QList>
+/**
+ * @brief The Die class
+ */
class Die
{
public:
+ /**
+ * @brief Die
+ */
Die();
+ /**
+ * @brief setValue
+ * @param r
+ */
void setValue(qint64 r);
+ /**
+ * @brief setFaces
+ * @param face
+ */
void setFaces(quint64 face);
+ /**
+ * @brief insertRollValue
+ * @param r
+ */
void insertRollValue(qint64 r);
+ /**
+ * @brief setSelected
+ * @param b
+ */
void setSelected(bool b);
-
+ /**
+ * @brief isSelected
+ * @return
+ */
bool isSelected() const;
+ /**
+ * @brief getValue
+ * @return
+ */
qint64 getValue() const;
+ /**
+ * @brief getListValue
+ * @return
+ */
QList<qint64> getListValue() const;
-
+ /**
+ * @brief hasChildrenValue
+ * @return
+ */
bool hasChildrenValue();
-
+ /**
+ * @brief roll
+ * @param adding
+ */
void roll(bool adding = false);
+ /**
+ * @brief replaceLastValue
+ * @param value
+ */
void replaceLastValue(qint64 value);
-
+ /**
+ * @brief getLastRolledValue
+ * @return
+ */
qint64 getLastRolledValue();
+ /**
+ * @brief getFaces
+ * @return
+ */
quint64 getFaces();
-
+ /**
+ * @brief hasBeenDisplayed
+ * @return
+ */
bool hasBeenDisplayed();
+ /**
+ * @brief displayed
+ */
void displayed();
private:
diff --git a/node/executionnode.h b/node/executionnode.h
index b83a6f1..ef6faa3 100644
--- a/node/executionnode.h
+++ b/node/executionnode.h
@@ -3,22 +3,67 @@
#include "result.h"
#include <QDebug>
+/**
+ * @brief The ExecutionNode class
+ */
class ExecutionNode
{
public:
enum ERROR_CODE {NO_ERROR,DIE_RESULT_EXPECTED,BAD_SYNTAXE};
+ /**
+ * @brief ExecutionNode
+ */
ExecutionNode();
+ /**
+ * @brief ~ExecutionNode
+ */
virtual ~ExecutionNode();
+ /**
+ * @brief run
+ * @param previous
+ */
virtual void run(ExecutionNode* previous = NULL)=0;
+ /**
+ * @brief getResult
+ * @return
+ */
Result* getResult();
+ /**
+ * @brief setNextNode
+ */
void setNextNode(ExecutionNode*);
+ /**
+ * @brief getNextNode
+ * @return
+ */
ExecutionNode* getNextNode();
+ /**
+ * @brief toString
+ * @return
+ */
virtual QString toString()const=0;
+ /**
+ * @brief getPriority
+ * @return
+ */
virtual qint64 getPriority() const=0;
+ /**
+ * @brief getErrorList
+ * @return
+ */
virtual QList<ExecutionNode::ERROR_CODE> getErrorList();
protected:
+ /**
+ * @brief m_result
+ */
Result* m_result;
+ /**
+ * @brief m_nextNode
+ */
ExecutionNode* m_nextNode;
+ /**
+ * @brief m_errors
+ */
QList<ExecutionNode::ERROR_CODE> m_errors;
};
diff --git a/result.h b/result.h
index 3f2ab15..c0317ce 100644
--- a/result.h
+++ b/result.h
@@ -23,7 +23,9 @@
#define RESULT_H
#include <Qt>
-
+/**
+ * @brief The Result class
+ */
class Result
{
public: