faunus
usagetip.h
1 #pragma once
2 
3 #include <memory>
4 #include <string>
5 #include <string_view>
6 #include <vector>
7 #include <nlohmann/json.hpp>
8 
9 namespace Faunus {
10 
11 class Random;
12 
22 {
23  private:
24  nlohmann::json database; // database
25  std::unique_ptr<Random> random;
26  bool tip_already_given = false;
27 
28  public:
29  std::string output_buffer; // accumulate output here
30  bool quiet = true; // if true, operator[] returns empty string
31  bool asciiart = true;
33  void load(const std::vector<std::string>&);
34  std::string operator[](std::string_view key);
35  void pick(const std::string&);
36 };
37 
38 extern TipFromTheManual usageTip; // global instance
39 
40 } // namespace Faunus
Cell list class templates.
Definition: actions.cpp:11
Class for showing help based on input errors.
Definition: usagetip.h:21