cmExecutionStatus.h 1.17 KB
Newer Older
1
2
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
3
4
5
6
7
8
9
10
#ifndef cmExecutionStatus_h
#define cmExecutionStatus_h

/** \class cmExecutionStatus
 * \brief Superclass for all command status classes
 *
 * when a command is involked it may set values on a command status instance
 */
11
class cmExecutionStatus
12
13
{
public:
14
  cmExecutionStatus() { this->Clear(); }
15

16
17
  void SetReturnInvoked(bool val) { this->ReturnInvoked = val; }
  bool GetReturnInvoked() { return this->ReturnInvoked; }
18

19
20
  void SetBreakInvoked(bool val) { this->BreakInvoked = val; }
  bool GetBreakInvoked() { return this->BreakInvoked; }
21

22
23
  void SetContinueInvoked(bool val) { this->ContinueInvoked = val; }
  bool GetContinueInvoked() { return this->ContinueInvoked; }
24

25
  void Clear()
26
  {
27
28
    this->ReturnInvoked = false;
    this->BreakInvoked = false;
29
    this->ContinueInvoked = false;
30
    this->NestedError = false;
31
  }
32
33
  void SetNestedError(bool val) { this->NestedError = val; }
  bool GetNestedError() { return this->NestedError; }
34

35
private:
36
37
  bool ReturnInvoked;
  bool BreakInvoked;
38
  bool ContinueInvoked;
39
  bool NestedError;
40
41
42
};

#endif