blob: 76acc40dc46d262feaf13ccb6e4da4874a5930ca (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#pragma once
#include "defs.h"
class TProgramShouldContinue {
public:
enum EState {
Continue,
Stop,
Restart,
};
void ShouldRestart();
void ShouldStop(int returnCode = 0);
EState PollState();
int GetReturnCode();
void Reset();
private:
TAtomic ReturnCode = 0;
TAtomic State = Continue;
};
|