cmExecutionStatus.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. cmExecutionStatus() { this->Clear(); }
  14. void SetReturnInvoked(bool val) { this->ReturnInvoked = val; }
  15. bool GetReturnInvoked() { return this->ReturnInvoked; }
  16. void SetBreakInvoked(bool val) { this->BreakInvoked = val; }
  17. bool GetBreakInvoked() { return this->BreakInvoked; }
  18. void SetContinueInvoked(bool val) { this->ContinueInvoked = val; }
  19. bool GetContinueInvoked() { return this->ContinueInvoked; }
  20. void Clear()
  21. {
  22. this->ReturnInvoked = false;
  23. this->BreakInvoked = false;
  24. this->ContinueInvoked = false;
  25. this->NestedError = false;
  26. }
  27. void SetNestedError(bool val) { this->NestedError = val; }
  28. bool GetNestedError() { return this->NestedError; }
  29. private:
  30. bool ReturnInvoked;
  31. bool BreakInvoked;
  32. bool ContinueInvoked;
  33. bool NestedError;
  34. };
  35. #endif