cmExecutionStatus.h 1.63 KB
Newer Older
1
2
3
/*============================================================================
  CMake - Cross Platform Makefile Generator
  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
4

5
6
  Distributed under the OSI-approved BSD License (the "License");
  see accompanying file Copyright.txt for details.
7

8
9
10
11
  This software is distributed WITHOUT ANY WARRANTY; without even the
  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the License for more information.
============================================================================*/
12
13
14
#ifndef cmExecutionStatus_h
#define cmExecutionStatus_h

15
#include "cmStandardIncludes.h"
16
17
18
19
20
21

/** \class cmExecutionStatus
 * \brief Superclass for all command status classes
 *
 * when a command is involked it may set values on a command status instance
 */
22
class cmExecutionStatus
23
24
{
public:
25
  cmExecutionStatus() { this->Clear(); }
26

27
  void SetReturnInvoked(bool val)
28
  { this->ReturnInvoked = val; }
29
  bool GetReturnInvoked()
30
  { return this->ReturnInvoked; }
31

32
  void SetBreakInvoked(bool val)
33
  { this->BreakInvoked = val; }
34
  bool GetBreakInvoked()
35
  { return this->BreakInvoked; }
36

37
  void SetContinueInvoked(bool val)
38
  { this->ContinueInvoked = val; }
39
  bool GetContinueInvoked()
40
41
  { return this->ContinueInvoked; }

42
  void Clear()
43
44
45
    {
    this->ReturnInvoked = false;
    this->BreakInvoked = false;
46
    this->ContinueInvoked = false;
47
48
    this->NestedError = false;
    }
49
50
  void SetNestedError(bool val) { this->NestedError = val; }
  bool GetNestedError() { return this->NestedError; }
51

52
private:
53
54
  bool ReturnInvoked;
  bool BreakInvoked;
55
  bool ContinueInvoked;
56
  bool NestedError;
57
58
59
};

#endif