Imported Upstream version 2.8.9
[platform/upstream/cmake.git] / Source / cmExecutionStatus.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #ifndef cmExecutionStatus_h
13 #define cmExecutionStatus_h
14
15 #include "cmObject.h"
16
17 /** \class cmExecutionStatus
18  * \brief Superclass for all command status classes
19  *
20  * when a command is involked it may set values on a command status instance
21  */
22 class cmExecutionStatus : public cmObject
23 {
24 public:
25   cmTypeMacro(cmExecutionStatus, cmObject);
26   
27   cmExecutionStatus() { this->Clear();};
28   
29   virtual void SetReturnInvoked(bool val) 
30   { this->ReturnInvoked = val; }
31   virtual bool GetReturnInvoked()
32   { return this->ReturnInvoked; }
33                                  
34   virtual void SetBreakInvoked(bool val) 
35   { this->BreakInvoked = val; }
36   virtual bool GetBreakInvoked()
37   { return this->BreakInvoked; }
38             
39   virtual void Clear()
40     {
41     this->ReturnInvoked = false;
42     this->BreakInvoked = false;
43     this->NestedError = false;
44     }
45   virtual void SetNestedError(bool val) { this->NestedError = val; }
46   virtual bool GetNestedError() { return this->NestedError; }
47
48                                         
49 protected:
50   bool ReturnInvoked;
51   bool BreakInvoked;
52   bool NestedError;
53 };
54
55 #endif