blob: 98a660632b848c6e3c033860f120c0db82ddde39 [file] [log] [blame]
Ben Tyner3fb52e52020-03-31 10:10:07 -05001#pragma once
2#include <bitset>
3
4namespace attn
5{
6
7/** @brief configuration flags */
8enum AttentionFlag
9{
Ben Tynerfe156492021-04-08 07:28:13 -050010 enVital = 0,
11 enCheckstop = 1,
12 enTerminate = 2,
13 enBreakpoints = 3,
14 dfltTi = 4,
austinfcuid28d5f82022-04-28 16:20:39 -050015 enClrAttnIntr = 5,
Ben Tyner3fb52e52020-03-31 10:10:07 -050016 lastFlag
17};
18
19/** @brief Objhects to hold configuration data */
20class Config
21{
22 public: // methods
23 /** @brief Default constructor */
Ben Tyner72feadc2020-04-06 12:57:31 -050024 Config();
Ben Tyner3fb52e52020-03-31 10:10:07 -050025
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
Ben Tyner72feadc2020-04-06 12:57:31 -050035 /** @brief Set all configuration flags */
36 void setFlagAll();
37
Ben Tyner3fb52e52020-03-31 10:10:07 -050038 /** @brief Clear configuration flag */
39 void clearFlag(AttentionFlag i_flag);
40
Ben Tyner72feadc2020-04-06 12:57:31 -050041 /** @brief Clear all configuration flags */
42 void clearFlagAll();
43
Ben Tyner3fb52e52020-03-31 10:10:07 -050044 private:
45 std::bitset<lastFlag> iv_flags; // configuration flags
46};
47
48} // namespace attn