1 // Copyright (C) 2006-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef _COMMANDS_HXX_
21 #define _COMMANDS_HXX_
23 #include "HMIExport.hxx"
42 virtual bool execute();
43 virtual bool reverse(bool isNormal=true);
44 virtual bool executeSubOnly();
45 virtual std::string dump();
46 std::string recursiveDump(int level =0);
47 void addSubCommand(Command* command);
48 bool isNormalReverse() { return _normalReverse; };
50 virtual bool localExecute() = 0;
51 virtual bool localReverse() = 0;
52 std::vector<Command*> _subCommands;
56 class HMI_EXPORT Invocator
61 void add(Command* command);
64 std::list<std::string> getDone();
65 std::list<std::string> getUndone();
66 YACS::ENGINE::Proc *getUndoProc() { return _undoProc; };
67 YACS::ENGINE::Catalog *getUndoCata() { return _undoCata; };
68 bool isSpecialReverse() { return _specialReverse; };
72 std::vector<Command*> _commandsDone;
73 std::vector<Command*> _commandsUndone;
74 std::vector<Command*> _commandsInProgress;
75 YACS::ENGINE::Proc *_undoProc;
76 YACS::ENGINE::Catalog *_undoCata;