24 #include <nlohmann/json_fwd.hpp>
42 explicit Section(
const std::string& title =
"",
const std::string& description =
"");
48 std::string GetTitle()
const;
49 void SetTitle(
const std::string& title);
51 std::string GetDescription()
const;
52 void SetDescription(
const std::string& description);
54 std::vector<Question*> GetQuestions()
const;
55 void AddQuestion(
Question* question);
59 std::string m_Description;
60 std::vector<std::unique_ptr<Question>> m_Questions;
63 explicit Form(
const std::string& title =
"",
const std::string& description =
"");
67 Form& operator=(
Form&& other) noexcept;
69 Section& AddSection(
const std::string& title =
"",
const std::string& description =
"");
70 int GetNumberOfSections()
const;
73 const Section& GetSection(
int index)
const;
75 std::string GetTitle()
const;
76 void SetTitle(
const std::string& title);
78 std::string GetDescription()
const;
79 void SetDescription(
const std::string& description);
81 std::vector<Question*> GetQuestions()
const;
82 void AddQuestion(
Question* question);
96 void AddSupplement(
const std::string& key);
104 bool SetSupplement(
const std::string& key,
const std::string& value);
106 const std::map<std::string, std::string>& GetSupplements()
const;
108 std::vector<Section>::const_iterator begin()
const;
109 std::vector<Section>::const_iterator end()
const;
111 std::vector<Section>::iterator begin();
112 std::vector<Section>::iterator end();
115 std::vector<Section> m_Sections;
116 std::map<std::string, std::string> m_Supplements;