summaryrefslogtreecommitdiff
path: root/src/xcb_resources_none.cc
blob: d9fa7833d873616a5d252092971a5b7cccaada6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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