cmExecutionStatus.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmExecutionStatus_h
  4. #define cmExecutionStatus_h
  5. #include <cmConfigure.h>
  6. #include "cmStandardIncludes.h"
  7. /** \class cmExecutionStatus
  8. * \brief Superclass for all command status classes
  9. *
  10. * when a command is involked it may set values on a command status instance
  11. */
  12. class cmExecutionStatus
  13. {
  14. public:
  15. cmExecutionStatus() { this->Clear(); }
  16. void SetReturnInvoked(bool val) { this->ReturnInvoked = val; }
  17. bool GetReturnInvoked() { return this->ReturnInvoked; }
  18. void SetBreakInvoked(bool val) { this->BreakInvoked = val; }
  19. bool GetBreakInvoked() { return this->BreakInvoked; }
  20. void SetContinueInvoked(bool val) { this->ContinueInvoked = val; }
  21. bool GetContinueInvoked() { return this->ContinueInvoked; }
  22. void Clear()
  23. {
  24. this->ReturnInvoked = false;
  25. this->BreakInvoked = false;
  26. this->ContinueInvoked = false;
  27. this->NestedError = false;
  28. }
  29. void SetNestedError(bool val) { this->NestedError = val; }
  30. bool GetNestedError() { return this->NestedError; }
  31. private:
  32. bool ReturnInvoked;
  33. bool BreakInvoked;
  34. bool ContinueInvoked;
  35. bool NestedError;
  36. };
  37. #endif