diff options
Diffstat (limited to 'src/xcb_resources.hh')
| -rw-r--r-- | src/xcb_resources.hh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/xcb_resources.hh b/src/xcb_resources.hh new file mode 100644 index 0000000..5e04e26 --- /dev/null +++ b/src/xcb_resources.hh @@ -0,0 +1,35 @@ +#ifndef XCB_RESOURCES_HH +#define XCB_RESOURCES_HH + +#include "xcb_connection.hh" + +#include <memory> +#include <optional> +#include <string> + +namespace xcb { + +class Resources { +public: + virtual ~Resources() = default; + + virtual std::optional<std::string> get_string(std::string const& name, + std::string const& clazz) = 0; + + virtual std::optional<long> get_long(std::string const& name, + std::string const& clazz) = 0; + + virtual std::optional<bool> get_bool(std::string const& name, + std::string const& clazz) = 0; + + static std::unique_ptr<Resources> create(shared_conn conn); + +protected: + Resources() = default; + Resources(Resources const&) = delete; + Resources& operator=(Resources const&) = delete; +}; + +} // namespace xcb + +#endif // XCB_RESOURCES_HH |
