summaryrefslogtreecommitdiff
path: root/7p53.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-10-02 11:23:38 +0200
committerOskar <[email protected]>2024-10-02 11:23:38 +0200
commit3edb35c6cab27d36f0fde49726db8cc9289e7304 (patch)
treedb59c3d208843079f462f4df63ffeec1d2fe4897 /7p53.cpp
parent18236447ae6c08ff336fd22d191343a1ff9dfede (diff)
more
Diffstat (limited to '7p53.cpp')
-rw-r--r--7p53.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/7p53.cpp b/7p53.cpp
new file mode 100644
index 0000000..2c6c194
--- /dev/null
+++ b/7p53.cpp
@@ -0,0 +1,39 @@
+#include <iostream>
+
+/*
+ *
+ * 7.53
+ *
+ *
+ */
+
+class Debug {
+public:
+ constexpr Debug(): hardware(false), inputoutput(false), other(false) {}
+ constexpr Debug(bool a, bool b, bool c): hardware(a), inputoutput(b), other(c) {}
+ constexpr void SetHW(bool a) { hardware = a; }
+ constexpr void SetIO(bool a) { inputoutput = a; }
+ constexpr void SetO(bool a) { other = a; }
+ constexpr bool GetHW() const { return hardware; }
+ constexpr bool GetIO() const { return inputoutput; }
+ constexpr bool GetO() const { return other; }
+private:
+ bool hardware;
+ bool inputoutput;
+ bool other;
+};
+
+int main () {
+
+ Debug D1;
+ Debug Derrors(true, true, true);
+ std::cout << D1.GetHW() << " " << D1.GetIO() << " " << D1.GetO() << std::endl;
+ D1.SetHW(true);
+ std::cout << D1.GetHW() << " " << D1.GetIO() << " " << D1.GetO() << std::endl;
+ std::cout << Derrors.GetHW() << " " << Derrors.GetIO() << " " << Derrors.GetO() << std::endl;
+ D1 = Derrors;
+ std::cout << D1.GetHW() << " " << D1.GetIO() << " " << D1.GetO() << std::endl;
+ constexpr Debug D2(true, false, true);
+ std::cout << D2.GetHW() << " " << D2.GetIO() << " " << D2.GetO() << std::endl;
+ return 0;
+}