// // attribute_scope.hpp // ncurses-wrapper // // Created by Sam Jaffe on 7/23/24. // #pragma once #include #include namespace curses { class AttributeScope { private: Window *window_{nullptr}; std::vector self_{}; bool good_{true}; public: AttributeScope() = default; AttributeScope(std::vector init, Window &window); AttributeScope(AttributeScope const &) = delete; AttributeScope(AttributeScope &&other) = default; AttributeScope &operator=(AttributeScope const &) = delete; AttributeScope &operator=(AttributeScope &&other) = default; ~AttributeScope(); operator bool() const { return good_; } }; }