cmExecutionStatus.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 "cmObject.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 : public cmObject
  19. {
  20. public:
  21. cmTypeMacro(cmExecutionStatus, cmObject);
  22. cmExecutionStatus() { this->Clear();}
  23. virtual void SetReturnInvoked(bool val)
  24. { this->ReturnInvoked = val; }
  25. virtual bool GetReturnInvoked()
  26. { return this->ReturnInvoked; }
  27. virtual void SetBreakInvoked(bool val)
  28. { this->BreakInvoked = val; }
  29. virtual bool GetBreakInvoked()
  30. { return this->BreakInvoked; }
  31. virtual void SetContinueInvoked(bool val)
  32. { this->ContinueInvoked = val; }
  33. virtual bool GetContinueInvoked()
  34. { return this->ContinueInvoked; }
  35. virtual void Clear()
  36. {
  37. this->ReturnInvoked = false;
  38. this->BreakInvoked = false;
  39. this->ContinueInvoked = false;
  40. this->NestedError = false;
  41. }
  42. virtual void SetNestedError(bool val) { this->NestedError = val; }
  43. virtual bool GetNestedError() { return this->NestedError; }
  44. protected:
  45. bool ReturnInvoked;
  46. bool BreakInvoked;
  47. bool ContinueInvoked;
  48. bool NestedError;
  49. };
  50. #endif