Name

CommandExecutor — The base class for the document Command exector.

Synopsis

class CommandExecutor
  :  : public SimpleWrappedObjectSernaApi::SimpleWrappedObject
 {
public:
  // construct/copy/destruct
  CommandExecutor(SernaApiBase * = 0);
  ~CommandExecutor();

  // public member functions

  Command executeAndAdd(const Command &) ;
  Command undo() ;
  Command redo() ;
  bool isModified() const;
  Command lastDone() const;
  Command firstChild() const;
  Command lastChild() const;
  Command getChild(int) const;
  int countChildren() const;
  void appendChild(const Command &) ;
  void removeAllChildren() ;
};

Description

CommandExecutor construct/copy/destruct

  1. CommandExecutor(SernaApiBase * = 0);


  2. ~CommandExecutor();


CommandExecutor public member functions

  1. Command executeAndAdd(const Command & command) ;

    Executes command and adds it to undo/redo stack.


  2. Command undo() ;

    Undo (unexecute) the command.


  3. Command redo() ;

    Redo (re-execute) the command.


  4. bool isModified() const;

    Checks if there are any executed/added commands.


  5. Command lastDone() const;

    Returns last executed command.


  6. Command firstChild() const;


  7. Command lastChild() const;


  8. Command getChild(int n) const;


  9. int countChildren() const;


  10. void appendChild(const Command & ) ;


  11. void removeAllChildren() ;