cmExecutionStatus.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. /** \class cmExecutionStatus
  6. * \brief Superclass for all command status classes
  7. *
  8. * when a command is involked it may set values on a command status instance
  9. */
  10. class cmExecutionStatus
  11. {
  12. public:
  13. void Clear()
  14. {
  15. this->ReturnInvoked = false;
  16. this->BreakInvoked = false;
  17. this->ContinueInvoked = false;
  18. this->NestedError = false;
  19. }
  20. void SetReturnInvoked() { this->ReturnInvoked = true; }
  21. bool GetReturnInvoked() const { return this->ReturnInvoked; }
  22. void SetBreakInvoked() { this->BreakInvoked = true; }
  23. bool GetBreakInvoked() const { return this->BreakInvoked; }
  24. void SetContinueInvoked() { this->ContinueInvoked = true; }
  25. bool GetContinueInvoked() const { return this->ContinueInvoked; }
  26. void SetNestedError() { this->NestedError = true; }
  27. bool GetNestedError() const { return this->NestedError; }
  28. private:
  29. bool ReturnInvoked = false;
  30. bool BreakInvoked = false;
  31. bool ContinueInvoked = false;
  32. bool NestedError = false;
  33. };
  34. #endif