You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
449 B
27 lines
449 B
#ifndef __FLAG_H_
|
|
#define __FLAG_H_
|
|
|
|
enum Index {
|
|
PulseCatch = 0,
|
|
TimerOn,
|
|
SteamOn,
|
|
};
|
|
|
|
class Flag {
|
|
private:
|
|
bool *flag;
|
|
public:
|
|
Flag(){
|
|
flag = new bool[2];
|
|
for(int i =0;i< 3;i++)
|
|
flag[i] = false;
|
|
}
|
|
inline void Set(Index index,bool val){
|
|
flag[static_cast<int>(PulseCatch)] = val;
|
|
}
|
|
inline bool Get(Index index) {
|
|
return flag[static_cast<int>(index)];
|
|
}
|
|
};
|
|
|
|
#endif
|