1 #pragma once 2 #include <bitset> 3 4 namespace attn 5 { 6 7 /** @brief configuration flags */ 8 enum AttentionFlag 9 { 10 enVital = 0, 11 enCheckstop = 1, 12 enTerminate = 2, 13 enBreakpoints = 3, 14 dfltTi = 4, 15 enClrAttnIntr = 5, 16 lastFlag 17 }; 18 19 /** @brief Objhects to hold configuration data */ 20 class Config 21 { 22 public: // methods 23 /** @brief Default constructor */ 24 Config(); 25 26 /** @brief Default destructor */ 27 ~Config() = default; 28 29 /** @brief Get state of flag */ 30 bool getFlag(AttentionFlag i_flag) const; 31 32 /** @brief Set configuration flag */ 33 void setFlag(AttentionFlag i_flag); 34 35 /** @brief Set all configuration flags */ 36 void setFlagAll(); 37 38 /** @brief Clear configuration flag */ 39 void clearFlag(AttentionFlag i_flag); 40 41 /** @brief Clear all configuration flags */ 42 void clearFlagAll(); 43 44 private: 45 std::bitset<lastFlag> iv_flags; // configuration flags 46 }; 47 48 } // namespace attn 49