cmake/Source/cmExecutionStatus.h

50 lines
1.3 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#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
*/
2015-08-17 11:37:30 +02:00
class cmExecutionStatus
{
public:
2017-07-20 19:35:53 +02:00
cmExecutionStatus()
: ReturnInvoked(false)
, BreakInvoked(false)
, ContinueInvoked(false)
, NestedError(false)
{
}
2015-04-27 22:25:09 +02:00
2015-08-17 11:37:30 +02:00
void Clear()
2016-07-09 11:21:54 +02:00
{
this->ReturnInvoked = false;
this->BreakInvoked = false;
2015-04-27 22:25:09 +02:00
this->ContinueInvoked = false;
this->NestedError = false;
2016-07-09 11:21:54 +02:00
}
2017-07-20 19:35:53 +02:00
void SetReturnInvoked() { this->ReturnInvoked = true; }
bool GetReturnInvoked() const { return this->ReturnInvoked; }
void SetBreakInvoked() { this->BreakInvoked = true; }
bool GetBreakInvoked() const { return this->BreakInvoked; }
void SetContinueInvoked() { this->ContinueInvoked = true; }
bool GetContinueInvoked() const { return this->ContinueInvoked; }
void SetNestedError() { this->NestedError = true; }
bool GetNestedError() const { return this->NestedError; }
2013-03-16 19:13:01 +02:00
2015-08-17 11:37:30 +02:00
private:
bool ReturnInvoked;
bool BreakInvoked;
2015-04-27 22:25:09 +02:00
bool ContinueInvoked;
bool NestedError;
};
#endif