diff options
| author | Joel Klinghed <the_jk@opera.com> | 2026-01-12 23:06:20 +0100 |
|---|---|---|
| committer | Joel Klinghed <the_jk@opera.com> | 2026-01-12 23:06:20 +0100 |
| commit | dfeb19b0a83b8ce57d28bf94a4f8d129993d1064 (patch) | |
| tree | d352908df286058059e306c350d89a07c67049eb /src/xcb_resources_none.cc | |
Initial commit
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 |
