aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/dicerollernode.h
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2015-08-20 16:11:34 +0200
committerRenaud G <renaud@rolisteam.org>2015-08-20 16:11:34 +0200
commit4a7faef6ead8e92839f7d615bc510218cc8dd63f (patch)
tree9de7d1c0bb38b73872cf6a279e80d0496e732e70 /node/dicerollernode.h
parent4c96c3f33cbb0552275e4a87046ac0a8fa88162c (diff)
downloadOneRoll-4a7faef6ead8e92839f7d615bc510218cc8dd63f.tar.gz
OneRoll-4a7faef6ead8e92839f7d615bc510218cc8dd63f.zip
add comments
Diffstat (limited to 'node/dicerollernode.h')
-rw-r--r--node/dicerollernode.h36
1 files changed, 22 insertions, 14 deletions
diff --git a/node/dicerollernode.h b/node/dicerollernode.h
index 402ef40..808676f 100644
--- a/node/dicerollernode.h
+++ b/node/dicerollernode.h
@@ -2,35 +2,43 @@
#define DICEROLLERNODE_H
#include <Qt>
-#include <QRunnable>
-#include <QMutex>
#include "executionnode.h"
#include "result/diceresult.h"
-//class DiceRoller : public QRunnable
-//{
-//public:
-// DiceRoller(QMutex* mutex,DiceResult* diceResult,int faces,int count);
-// virtual void run ();
-//private:
-// QMutex* m_mutex;
-// DiceResult* m_sharedDiceResult;
-// int m_faces;
-// quint64 m_diceCount;
-//};
/**
- * @brief The DiceRollerNode class
+ * @brief The DiceRollerNode class rolls dice of one kind.
*/
class DiceRollerNode : public ExecutionNode
{
public:
+ /**
+ * @brief DiceRollerNode builds an instance
+ * @param faces, number of faces of dices
+ * @param offset, first value of dice.
+ */
DiceRollerNode(quint64 faces, qint64 offset = 1);
+ /**
+ * @brief run - starts to roll dice.
+ */
virtual void run(ExecutionNode*);
+ /**
+ * @brief getFaces accessor
+ * @return the face count
+ */
quint64 getFaces();
+ /**
+ * @brief toString
+ * @param wl
+ * @return use to generate dot tree;
+ */
virtual QString toString(bool wl)const;
+ /**
+ * @brief getPriority
+ * @return priority for dice roll: 4 (higher)
+ */
virtual qint64 getPriority() const;
//private members
private: