기업연계 프로젝트2 15조 팀명: 소도기
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

5 years ago
  1. #ifndef __FLAG_H_
  2. #define __FLAG_H_
  3. enum Index {
  4. PulseCatch = 0,
  5. TimerOn,
  6. SteamOn,
  7. };
  8. class Flag {
  9. private:
  10. bool *flag;
  11. public:
  12. Flag(){
  13. flag = new bool[2];
  14. for(int i =0;i< 3;i++)
  15. flag[i] = false;
  16. }
  17. inline void Set(Index index,bool val){
  18. flag[static_cast<int>(PulseCatch)] = val;
  19. }
  20. inline bool Get(Index index) {
  21. return flag[static_cast<int>(index)];
  22. }
  23. };
  24. #endif