File indexing completed on 2024-05-12 05:39:28
0001 /*************************************************************************** 0002 * Copyright (C) 2019 by Renaud Guezennec * 0003 * http://www.rolisteam.org/contact * 0004 * * 0005 * This file is part of DiceParser * 0006 * * 0007 * DiceParser is free software; you can redistribute it and/or modify * 0008 * it under the terms of the GNU General Public License as published by * 0009 * the Free Software Foundation; either version 2 of the License, or * 0010 * (at your option) any later version. * 0011 * * 0012 * This program is distributed in the hope that it will be useful, * 0013 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0015 * GNU General Public License for more details. * 0016 * * 0017 * You should have received a copy of the GNU General Public License * 0018 * along with this program; if not, write to the * 0019 * Free Software Foundation, Inc., * 0020 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 0021 ***************************************************************************/ 0022 #ifndef REPEATER_NODE_H 0023 #define REPEATER_NODE_H 0024 0025 #include "node/executionnode.h" 0026 #include <memory> 0027 0028 class RepeaterNode : public ExecutionNode 0029 { 0030 public: 0031 RepeaterNode(); 0032 void run(ExecutionNode* previous) override; 0033 virtual QString toString(bool withLabel) const override; 0034 virtual qint64 getPriority() const override; 0035 0036 virtual ExecutionNode* getCopy() const override; 0037 0038 void setCommand(const std::vector<ExecutionNode*>& node); 0039 void setTimeNode(ExecutionNode* times); 0040 void setSumAll(bool b); 0041 0042 private: 0043 std::vector<ExecutionNode*> m_cmd; 0044 ExecutionNode* m_times= nullptr; 0045 bool m_sumAll= false; 0046 }; 0047 0048 #endif // REPEATER_NODE_H