cmExecutionStatus.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 <cmConfigure.h>
  13. #include "cmStandardIncludes.h"
  14. /** \class cmExecutionStatus
  15. * \brief Superclass for all command status classes
  16. *
  17. * when a command is involked it may set values on a command status instance
  18. */
  19. class cmExecutionStatus
  20. {
  21. public:
  22. cmExecutionStatus() { this->Clear(); }
  23. void SetReturnInvoked(bool val) { this->ReturnInvoked = val; }
  24. bool GetReturnInvoked() { return this->ReturnInvoked; }
  25. void SetBreakInvoked(bool val) { this->BreakInvoked = val; }
  26. bool GetBreakInvoked() { return this->BreakInvoked; }
  27. void SetContinueInvoked(bool val) { this->ContinueInvoked = val; }
  28. bool GetContinueInvoked() { return this->ContinueInvoked; }
  29. void Clear()
  30. {
  31. this->ReturnInvoked = false;
  32. this->BreakInvoked = false;
  33. this->ContinueInvoked = false;
  34. }
  35. private:
  36. bool ReturnInvoked;
  37. bool BreakInvoked;
  38. bool ContinueInvoked;
  39. };
  40. #endif