From 7d0c1d999344ea625670bf3d90d7c900cadb4854 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Fri, 6 Mar 2015 00:25:25 +0100 Subject: Reorganize files. Creation of subdir result. --- diceresult.cpp | 86 ---------------------------------------------- diceresult.h | 67 ------------------------------------ node/listsetrollnode.cpp | 5 +++ node/listsetrollnode.h | 10 ++++++ result.cpp | 56 ------------------------------ result.h | 88 ------------------------------------------------ result/diceresult.cpp | 86 ++++++++++++++++++++++++++++++++++++++++++++++ result/diceresult.h | 67 ++++++++++++++++++++++++++++++++++++ result/result.cpp | 56 ++++++++++++++++++++++++++++++ result/result.h | 88 ++++++++++++++++++++++++++++++++++++++++++++++++ result/scalarresult.cpp | 38 +++++++++++++++++++++ result/scalarresult.h | 42 +++++++++++++++++++++++ result/stringresult.cpp | 29 ++++++++++++++++ result/stringresult.h | 36 ++++++++++++++++++++ scalarresult.cpp | 38 --------------------- scalarresult.h | 42 ----------------------- stringresult.cpp | 29 ---------------- stringresult.h | 36 -------------------- 18 files changed, 457 insertions(+), 442 deletions(-) delete mode 100644 diceresult.cpp delete mode 100644 diceresult.h create mode 100644 node/listsetrollnode.cpp create mode 100644 node/listsetrollnode.h delete mode 100644 result.cpp delete mode 100644 result.h create mode 100644 result/diceresult.cpp create mode 100644 result/diceresult.h create mode 100644 result/result.cpp create mode 100644 result/result.h create mode 100644 result/scalarresult.cpp create mode 100644 result/scalarresult.h create mode 100644 result/stringresult.cpp create mode 100644 result/stringresult.h delete mode 100644 scalarresult.cpp delete mode 100644 scalarresult.h delete mode 100644 stringresult.cpp delete mode 100644 stringresult.h diff --git a/diceresult.cpp b/diceresult.cpp deleted file mode 100644 index 0cabb11..0000000 --- a/diceresult.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2014 by Renaud Guezennec * -* http://renaudguezennec.homelinux.org/accueil,3.html * -* * -* This file is part of DiceParser * -* * -* DiceParser is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ -#include "diceresult.h" - -DiceResult::DiceResult() -{ - m_resultTypes= (DICE_LIST); -} -void DiceResult::insertResult(Die* die) -{ - m_diceValues.append(die); -} -QList& DiceResult::getResultList() -{ - return m_diceValues; -} -void DiceResult::setResultList(QList list) -{ - m_diceValues.clear(); - m_diceValues << list; -} -//bool DiceResult::isScalar() const -//{ -// if(m_diceValues.size()==1) -// { -// return true; -// } -// return false; -//} -QVariant DiceResult::getResult(RESULT_TYPE type) -{ - - switch (type) - { - case SCALAR: - return getScalarResult(); - break; - case DICE_LIST: - { - - return QVariant(); - break; - } - default: - break; - } - return QVariant(); - -} -qreal DiceResult::getScalarResult() -{ - if(m_diceValues.size()==1) - { - return m_diceValues[0]->getValue(); - } - else - { - qint64 scalarSum = 0; - foreach(Die* die,m_diceValues) - { - scalarSum+=die->getValue(); - } - return scalarSum; - } - - return 0; -} diff --git a/diceresult.h b/diceresult.h deleted file mode 100644 index 838a83d..0000000 --- a/diceresult.h +++ /dev/null @@ -1,67 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2014 by Renaud Guezennec * -* http://renaudguezennec.homelinux.org/accueil,3.html * -* * -* This file is part of DiceParser * -* * -* DiceParser is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ -#ifndef DICERESULT_H -#define DICERESULT_H -#include - -#include "die.h" -#include "result.h" -/** - * @brief The DiceResult class - */ -class DiceResult : public Result -{ -public: - /** - * @brief DiceResult - */ - DiceResult(); - - /** - * @brief getResultList - * @return - */ - QList& getResultList(); - /** - * @brief insertResult - */ - void insertResult(Die*); - - /** - * @brief setResultList - * @param list - */ - void setResultList(QList list); - - /** - * @brief getScalar - * @return - */ - virtual QVariant getResult(RESULT_TYPE); - -private: - qreal getScalarResult(); -private: - QList m_diceValues; -}; - -#endif // DICERESULT_H diff --git a/node/listsetrollnode.cpp b/node/listsetrollnode.cpp new file mode 100644 index 0000000..e89e139 --- /dev/null +++ b/node/listsetrollnode.cpp @@ -0,0 +1,5 @@ +#include "listsetrollnode.h" + +ListSetRollNode::ListSetRollNode() +{ +} diff --git a/node/listsetrollnode.h b/node/listsetrollnode.h new file mode 100644 index 0000000..006557b --- /dev/null +++ b/node/listsetrollnode.h @@ -0,0 +1,10 @@ +#ifndef LISTSETROLLNODE_H +#define LISTSETROLLNODE_H + +class ListSetRollNode : public ExecutionNode +{ +public: + ListSetRollNode(); +}; + +#endif // LISTSETROLLNODE_H diff --git a/result.cpp b/result.cpp deleted file mode 100644 index 740bf85..0000000 --- a/result.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2014 by Renaud Guezennec * -* http://renaudguezennec.homelinux.org/accueil,3.html * -* * -* This file is part of DiceParser * -* * -* DiceParser is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ -#include "result.h" - -Result::Result() - : m_previous(NULL) -{ -} - -Result* Result::getPrevious() -{ - return m_previous; -} - -void Result::setPrevious(Result* p) -{ - m_previous = p; -} - -bool Result::isStringResult() -{ - return false; -} - -bool Result::hasResultOfType(RESULT_TYPE type) const -{ - return (m_resultTypes & type); -} -void Result::generateDotTree(QString& s) -{ - s.append(toString()); - -} -QString Result::toString() -{ - QString(); -} diff --git a/result.h b/result.h deleted file mode 100644 index dcd0b8d..0000000 --- a/result.h +++ /dev/null @@ -1,88 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2014 by Renaud Guezennec * -* http://renaudguezennec.homelinux.org/accueil,3.html * -* * -* This file is part of DiceParser * -* * -* DiceParser is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ -#ifndef RESULT_H -#define RESULT_H - -//#include -#include -#include -/** - * @brief The Result class - */ -class Result -{ -public: - /** - * @brief The RESULT_TYPE enum or combinaison - */ - enum RESULT_TYPE {SCALAR=1,STRING=2,DICE_LIST=4}; - /** - * @brief Result - */ - Result(); - /** - * @brief isScalar - * @return - */ - virtual bool hasResultOfType(RESULT_TYPE) const; - /** - * @brief getScalar - * @return - */ - virtual QVariant getResult(RESULT_TYPE) = 0; - /** - * @brief getPrevious - * @return - */ - virtual Result* getPrevious(); - /** - * @brief setPrevious - */ - virtual void setPrevious(Result*); - /** - * @brief isStringResult - * @return - */ - bool isStringResult(); - - /** - * @brief getStringResult - * @return - */ - QString getStringResult(); - /** - * @brief generateDotTree - */ - void generateDotTree(QString&); - /** - * @brief toString - * @return - */ - QString toString(); -protected: - int m_resultTypes;/// @brief -private: - Result* m_previous;/// @brief - -}; - -#endif // RESULT_H diff --git a/result/diceresult.cpp b/result/diceresult.cpp new file mode 100644 index 0000000..0cabb11 --- /dev/null +++ b/result/diceresult.cpp @@ -0,0 +1,86 @@ +/*************************************************************************** +* Copyright (C) 2014 by Renaud Guezennec * +* http://renaudguezennec.homelinux.org/accueil,3.html * +* * +* This file is part of DiceParser * +* * +* DiceParser is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ +#include "diceresult.h" + +DiceResult::DiceResult() +{ + m_resultTypes= (DICE_LIST); +} +void DiceResult::insertResult(Die* die) +{ + m_diceValues.append(die); +} +QList& DiceResult::getResultList() +{ + return m_diceValues; +} +void DiceResult::setResultList(QList list) +{ + m_diceValues.clear(); + m_diceValues << list; +} +//bool DiceResult::isScalar() const +//{ +// if(m_diceValues.size()==1) +// { +// return true; +// } +// return false; +//} +QVariant DiceResult::getResult(RESULT_TYPE type) +{ + + switch (type) + { + case SCALAR: + return getScalarResult(); + break; + case DICE_LIST: + { + + return QVariant(); + break; + } + default: + break; + } + return QVariant(); + +} +qreal DiceResult::getScalarResult() +{ + if(m_diceValues.size()==1) + { + return m_diceValues[0]->getValue(); + } + else + { + qint64 scalarSum = 0; + foreach(Die* die,m_diceValues) + { + scalarSum+=die->getValue(); + } + return scalarSum; + } + + return 0; +} diff --git a/result/diceresult.h b/result/diceresult.h new file mode 100644 index 0000000..838a83d --- /dev/null +++ b/result/diceresult.h @@ -0,0 +1,67 @@ +/*************************************************************************** +* Copyright (C) 2014 by Renaud Guezennec * +* http://renaudguezennec.homelinux.org/accueil,3.html * +* * +* This file is part of DiceParser * +* * +* DiceParser is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ +#ifndef DICERESULT_H +#define DICERESULT_H +#include + +#include "die.h" +#include "result.h" +/** + * @brief The DiceResult class + */ +class DiceResult : public Result +{ +public: + /** + * @brief DiceResult + */ + DiceResult(); + + /** + * @brief getResultList + * @return + */ + QList& getResultList(); + /** + * @brief insertResult + */ + void insertResult(Die*); + + /** + * @brief setResultList + * @param list + */ + void setResultList(QList list); + + /** + * @brief getScalar + * @return + */ + virtual QVariant getResult(RESULT_TYPE); + +private: + qreal getScalarResult(); +private: + QList m_diceValues; +}; + +#endif // DICERESULT_H diff --git a/result/result.cpp b/result/result.cpp new file mode 100644 index 0000000..740bf85 --- /dev/null +++ b/result/result.cpp @@ -0,0 +1,56 @@ +/*************************************************************************** +* Copyright (C) 2014 by Renaud Guezennec * +* http://renaudguezennec.homelinux.org/accueil,3.html * +* * +* This file is part of DiceParser * +* * +* DiceParser is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ +#include "result.h" + +Result::Result() + : m_previous(NULL) +{ +} + +Result* Result::getPrevious() +{ + return m_previous; +} + +void Result::setPrevious(Result* p) +{ + m_previous = p; +} + +bool Result::isStringResult() +{ + return false; +} + +bool Result::hasResultOfType(RESULT_TYPE type) const +{ + return (m_resultTypes & type); +} +void Result::generateDotTree(QString& s) +{ + s.append(toString()); + +} +QString Result::toString() +{ + QString(); +} diff --git a/result/result.h b/result/result.h new file mode 100644 index 0000000..dcd0b8d --- /dev/null +++ b/result/result.h @@ -0,0 +1,88 @@ +/*************************************************************************** +* Copyright (C) 2014 by Renaud Guezennec * +* http://renaudguezennec.homelinux.org/accueil,3.html * +* * +* This file is part of DiceParser * +* * +* DiceParser is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ +#ifndef RESULT_H +#define RESULT_H + +//#include +#include +#include +/** + * @brief The Result class + */ +class Result +{ +public: + /** + * @brief The RESULT_TYPE enum or combinaison + */ + enum RESULT_TYPE {SCALAR=1,STRING=2,DICE_LIST=4}; + /** + * @brief Result + */ + Result(); + /** + * @brief isScalar + * @return + */ + virtual bool hasResultOfType(RESULT_TYPE) const; + /** + * @brief getScalar + * @return + */ + virtual QVariant getResult(RESULT_TYPE) = 0; + /** + * @brief getPrevious + * @return + */ + virtual Result* getPrevious(); + /** + * @brief setPrevious + */ + virtual void setPrevious(Result*); + /** + * @brief isStringResult + * @return + */ + bool isStringResult(); + + /** + * @brief getStringResult + * @return + */ + QString getStringResult(); + /** + * @brief generateDotTree + */ + void generateDotTree(QString&); + /** + * @brief toString + * @return + */ + QString toString(); +protected: + int m_resultTypes;/// @brief +private: + Result* m_previous;/// @brief + +}; + +#endif // RESULT_H diff --git a/result/scalarresult.cpp b/result/scalarresult.cpp new file mode 100644 index 0000000..8c924fe --- /dev/null +++ b/result/scalarresult.cpp @@ -0,0 +1,38 @@ +/*************************************************************************** +* Copyright (C) 2014 by Renaud Guezennec * +* http://renaudguezennec.homelinux.org/accueil,3.html * +* * +* This file is part of DiceParser * +* * +* DiceParser is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ +#include "scalarresult.h" + +ScalarResult::ScalarResult() +{ + m_resultTypes = Result::SCALAR; +} + + +void ScalarResult::setValue(qreal i) +{ + m_value=i; +} +QVariant ScalarResult::getResult(Result::RESULT_TYPE type) +{ + return m_value; +} + diff --git a/result/scalarresult.h b/result/scalarresult.h new file mode 100644 index 0000000..35982be --- /dev/null +++ b/result/scalarresult.h @@ -0,0 +1,42 @@ +/*************************************************************************** +* Copyright (C) 2014 by Renaud Guezennec * +* http://renaudguezennec.homelinux.org/accueil,3.html * +* * +* This file is part of DiceParser * +* * +* DiceParser is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License for more details. * +* * +* You should have received a copy of the GNU General Public License * +* along with this program; if not, write to the * +* Free Software Foundation, Inc., * +* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * +***************************************************************************/ +#ifndef SCALARRESULT_H +#define SCALARRESULT_H + +#include "result.h" +#include + + +class ScalarResult : public Result +{ +public: + ScalarResult(); + + virtual QVariant getResult(Result::RESULT_TYPE); + + void setValue(qreal i); + +private: + qreal m_value; +}; + +#endif // SCALARRESULT_H diff --git a/result/stringresult.cpp b/result/stringresult.cpp new file mode 100644 index 0000000..4831a76 --- /dev/null +++ b/result/stringresult.cpp @@ -0,0 +1,29 @@ +#include "stringresult.h" + +StringResult::StringResult() +{ + m_resultTypes = Result::STRING; +} +void StringResult::setText(QString text) +{ + m_value=text; +} + +QString StringResult::getText() const +{ + return m_value; +} +QVariant StringResult::getResult(RESULT_TYPE type) +{ + + switch(type) + { + case STRING: + return getText(); + break; + + } + + + return QVariant(); +} diff --git a/result/stringresult.h b/result/stringresult.h new file mode 100644 index 0000000..caa7e06 --- /dev/null +++ b/result/stringresult.h @@ -0,0 +1,36 @@ +#ifndef STRINGRESULT_H +#define STRINGRESULT_H + +#include +#include "result.h" +/** + * @brief The StringResult class + */ +class StringResult : public Result +{ +public: + /** + * @brief StringResult + */ + StringResult(); + /** + * @brief setText + * @param text + */ + void setText(QString text); + /** + * @brief getText + * @return + */ + QString getText() const; + /** + * @brief getScalar + * @return + */ + virtual QVariant getResult(RESULT_TYPE); + +private: + QString m_value; +}; + +#endif // STRINGRESULT_H diff --git a/scalarresult.cpp b/scalarresult.cpp deleted file mode 100644 index 8c924fe..0000000 --- a/scalarresult.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2014 by Renaud Guezennec * -* http://renaudguezennec.homelinux.org/accueil,3.html * -* * -* This file is part of DiceParser * -* * -* DiceParser is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ -#include "scalarresult.h" - -ScalarResult::ScalarResult() -{ - m_resultTypes = Result::SCALAR; -} - - -void ScalarResult::setValue(qreal i) -{ - m_value=i; -} -QVariant ScalarResult::getResult(Result::RESULT_TYPE type) -{ - return m_value; -} - diff --git a/scalarresult.h b/scalarresult.h deleted file mode 100644 index 35982be..0000000 --- a/scalarresult.h +++ /dev/null @@ -1,42 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2014 by Renaud Guezennec * -* http://renaudguezennec.homelinux.org/accueil,3.html * -* * -* This file is part of DiceParser * -* * -* DiceParser is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ -#ifndef SCALARRESULT_H -#define SCALARRESULT_H - -#include "result.h" -#include - - -class ScalarResult : public Result -{ -public: - ScalarResult(); - - virtual QVariant getResult(Result::RESULT_TYPE); - - void setValue(qreal i); - -private: - qreal m_value; -}; - -#endif // SCALARRESULT_H diff --git a/stringresult.cpp b/stringresult.cpp deleted file mode 100644 index 4831a76..0000000 --- a/stringresult.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "stringresult.h" - -StringResult::StringResult() -{ - m_resultTypes = Result::STRING; -} -void StringResult::setText(QString text) -{ - m_value=text; -} - -QString StringResult::getText() const -{ - return m_value; -} -QVariant StringResult::getResult(RESULT_TYPE type) -{ - - switch(type) - { - case STRING: - return getText(); - break; - - } - - - return QVariant(); -} diff --git a/stringresult.h b/stringresult.h deleted file mode 100644 index caa7e06..0000000 --- a/stringresult.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef STRINGRESULT_H -#define STRINGRESULT_H - -#include -#include "result.h" -/** - * @brief The StringResult class - */ -class StringResult : public Result -{ -public: - /** - * @brief StringResult - */ - StringResult(); - /** - * @brief setText - * @param text - */ - void setText(QString text); - /** - * @brief getText - * @return - */ - QString getText() const; - /** - * @brief getScalar - * @return - */ - virtual QVariant getResult(RESULT_TYPE); - -private: - QString m_value; -}; - -#endif // STRINGRESULT_H -- cgit v1.2.3-70-g09d2