From 379ffeb21fd4f067ea542e6b45967bab1ca004d5 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Mon, 6 Apr 2015 14:26:23 +0200 Subject: -Creation of dedicated class for alias management --- dicealias.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 dicealias.h (limited to 'dicealias.h') 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 + +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 -- cgit v1.2.3-70-g09d2