aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dicealias.h
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2015-04-06 14:26:23 +0200
committerRenaud G <renaud@rolisteam.org>2015-04-06 14:26:23 +0200
commit379ffeb21fd4f067ea542e6b45967bab1ca004d5 (patch)
tree1f609e31581954c0597698b5aa74635c09870434 /dicealias.h
parent3ac6eea8269ee5b28c88fd0736c8963c0b8c2906 (diff)
downloadOneRoll-379ffeb21fd4f067ea542e6b45967bab1ca004d5.tar.gz
OneRoll-379ffeb21fd4f067ea542e6b45967bab1ca004d5.zip
-Creation of dedicated class for alias management
Diffstat (limited to 'dicealias.h')
-rw-r--r--dicealias.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/dicealias.h b/dicealias.h
new file mode 100644
index 0000000..565b903
--- /dev/null
+++ b/dicealias.h
@@ -0,0 +1,29 @@
+#ifndef DICEALIAS_H
+#define DICEALIAS_H
+
+#include <QString>
+
+class DiceAlias
+{
+public:
+ enum RESOLUTION_TYPE { REPLACE,REGEXP};
+ DiceAlias(QString cmd, QString key, bool isReplace = true);
+ ~DiceAlias();
+
+ bool resolved(QString & str);
+
+ void setCommand(QString key);
+ void setValue(QString value);
+ void setType(RESOLUTION_TYPE );
+
+ QString getCommand();
+ QString getValue();
+ bool isReplace();
+private:
+ QString m_command;
+ QString m_value;
+ RESOLUTION_TYPE m_type;
+
+};
+
+#endif // DICEALIAS_H