cmExecutionStatus.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 Clear()
  32. {
  33. this->ReturnInvoked = false;
  34. this->BreakInvoked = false;
  35. this->NestedError = false;
  36. }
  37. virtual void SetNestedError(bool val) { this->NestedError = val; }
  38. virtual bool GetNestedError() { return this->NestedError; }
  39. protected:
  40. bool ReturnInvoked;
  41. bool BreakInvoked;
  42. bool NestedError;
  43. };
  44. #endif