diff options
Diffstat (limited to 'src/xcb_resources_none.cc')
| -rw-r--r-- | src/xcb_resources_none.cc | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/xcb_resources_none.cc b/src/xcb_resources_none.cc new file mode 100644 index 0000000..d9fa783 --- /dev/null +++ b/src/xcb_resources_none.cc @@ -0,0 +1,37 @@ +#include "xcb_resources.hh" + +#include <memory> +#include <optional> +#include <string> + +namespace xcb { + +namespace { + +class ResourcesNone : public Resources { + public: + ResourcesNone() = default; + + std::optional<std::string> get_string(std::string const&, + std::string const&) override { + return std::nullopt; + } + + std::optional<long> get_long(std::string const&, + std::string const&) override { + return std::nullopt; + } + + std::optional<bool> get_bool(std::string const&, + std::string const&) override { + return std::nullopt; + } +}; + +} // namespace + +std::unique_ptr<Resources> Resources::create(shared_conn) { + return std::make_unique<ResourcesNone>(); +} + +} // namespace xcb |
