cmExecutionStatus.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmExecutionStatus_h
  11. #define cmExecutionStatus_h
  12. #include "cmStandardIncludes.h"
  13. /** \class cmExecutionStatus
  14. * \brief Superclass for all command status classes
  15. *
  16. * when a command is involked it may set values on a command status instance
  17. */
  18. class cmExecutionStatus
  19. {
  20. public:
  21. cmExecutionStatus() { this->Clear(); }
  22. void SetReturnInvoked(bool val) { this->ReturnInvoked = val; }
  23. bool GetReturnInvoked() { return this->ReturnInvoked; }
  24. void SetBreakInvoked(bool val) { this->BreakInvoked = val; }
  25. bool GetBreakInvoked() { return this->BreakInvoked; }
  26. void SetContinueInvoked(bool val) { this->ContinueInvoked = val; }
  27. bool GetContinueInvoked() { return this->ContinueInvoked; }
  28. void Clear()
  29. {
  30. this->ReturnInvoked = false;
  31. this->BreakInvoked = false;
  32. this->ContinueInvoked = false;
  33. }
  34. private:
  35. bool ReturnInvoked;
  36. bool BreakInvoked;
  37. bool ContinueInvoked;
  38. };
  39. #endif