aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/diceparser/diceparserhelper.h
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2022-04-16 01:58:40 +0200
committerRenaud G <renaud@rolisteam.org>2022-04-16 02:59:30 +0200
commit6ba9324cf4864ebd2e2cdec8098b0889ceaea0a8 (patch)
treee29af0f803de724e28eab85da2dfe6c535a8292b /include/diceparser/diceparserhelper.h
parent0c040da59e6aa2df3bd0c22e38b2afe0512d3749 (diff)
downloadOneRoll-6ba9324cf4864ebd2e2cdec8098b0889ceaea0a8.tar.gz
OneRoll-6ba9324cf4864ebd2e2cdec8098b0889ceaea0a8.zip
Make sure Windows compilation works
Diffstat (limited to 'include/diceparser/diceparserhelper.h')
-rw-r--r--include/diceparser/diceparserhelper.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/include/diceparser/diceparserhelper.h b/include/diceparser/diceparserhelper.h
new file mode 100644
index 0000000..6190df2
--- /dev/null
+++ b/include/diceparser/diceparserhelper.h
@@ -0,0 +1,96 @@
+#ifndef DICEPARSERHELPER_H
+#define DICEPARSERHELPER_H
+
+class ValidatorList;
+class ExecutionNode;
+
+#include <diceparser/diceparser_global.h>
+
+namespace Dice
+{
+enum class CONDITION_STATE : int
+{
+ ERROR_STATE,
+ ALWAYSTRUE,
+ UNREACHABLE,
+ REACHABLE
+};
+
+enum class ERROR_CODE : int
+{
+ NO_DICE_ERROR,
+ DIE_RESULT_EXPECTED,
+ BAD_SYNTAXE,
+ ENDLESS_LOOP_ERROR,
+ DIVIDE_BY_ZERO,
+ NOTHING_UNDERSTOOD,
+ NO_DICE_TO_ROLL,
+ TOO_MANY_DICE,
+ NO_VARIBALE,
+ INVALID_INDEX,
+ UNEXPECTED_CHARACTER,
+ NO_PREVIOUS_ERROR,
+ NO_VALID_RESULT,
+ SCALAR_RESULT_EXPECTED
+};
+
+/**
+ * @brief The RESULT_TYPE enum or combinaison
+ */
+enum class RESULT_TYPE : int
+{
+ NONE= 0,
+ SCALAR= 1,
+ STRING= 2,
+ DICE_LIST= 4
+};
+/**
+ * @brief The ConditionType enum defines compare method
+ */
+enum ConditionType
+{
+ OnEach,
+ OnEachValue,
+ OneOfThem,
+ AllOfThem,
+ OnScalar
+};
+
+enum class CompareOperator
+{
+ Equal,
+ GreaterThan,
+ LesserThan,
+ GreaterOrEqual,
+ LesserOrEqual,
+ Different
+};
+enum class ArithmeticOperator
+{
+ PLUS,
+ MINUS,
+ DIVIDE,
+ MULTIPLICATION,
+ INTEGER_DIVIDE,
+ POW
+};
+enum class LogicOperation
+{
+ OR,
+ EXCLUSIVE_OR,
+ AND,
+ NONE
+};
+
+enum class ConditionOperator
+{
+ Modulo
+};
+
+struct DICEPARSER_EXPORT CaseInfo
+{
+ ValidatorList* validatorList;
+ ExecutionNode* node;
+};
+} // namespace Dice
+#endif // DICEPARSERHELPER_H