CardGame
Rogue-like card videogame
Loading...
Searching...
No Matches
text.h
Go to the documentation of this file.
1#ifndef TEXT_H
2#define TEXT_H
3
4#include <nlohmann/json.hpp>
5#include <string_view>
6
16class Text
17{
18 public:
24 Text();
25
34 const std::string& getText(const char* key) const;
35
36 private:
37 nlohmann::json m_data{};
38};
39
40#endif
Lightweight text lookup service backed by a JSON file.
Definition: text.h:17
Text()
Loads text data from the JSON source.
Definition: text.cpp:8
const std::string & getText(const char *key) const
Returns the text associated with the given key.
Definition: text.cpp:14