cmExecutionStatus.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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)
  23. { this->ReturnInvoked = val; }
  24. bool GetReturnInvoked()
  25. { return this->ReturnInvoked; }
  26. void SetBreakInvoked(bool val)
  27. { this->BreakInvoked = val; }
  28. bool GetBreakInvoked()
  29. { return this->BreakInvoked; }
  30. void SetContinueInvoked(bool val)
  31. { this->ContinueInvoked = val; }
  32. bool GetContinueInvoked()
  33. { return this->ContinueInvoked; }
  34. void Clear()
  35. {
  36. this->ReturnInvoked = false;
  37. this->BreakInvoked = false;
  38. this->ContinueInvoked = false;
  39. this->NestedError = false;
  40. }
  41. void SetNestedError(bool val) { this->NestedError = val; }
  42. bool GetNestedError() { return this->NestedError; }
  43. private:
  44. bool ReturnInvoked;
  45. bool BreakInvoked;
  46. bool ContinueInvoked;
  47. bool NestedError;
  48. };
  49. #endif