11 static bool initialize(
const std::string& templates_path );
13 static bool templateExist(
const std::string& category,
const std::string& type );
14 static nlohmann::json getTemplate(
const std::string& category,
const std::string& type );
16 static std::string getRandomName(
const std::string& type );
18 static const nlohmann::json& getTemplates() {
23 using TemplateCheckData = std::map<std::string, std::vector<std::string>>;
24 static bool checkBasicTemplate(
const nlohmann::json& template_data,
25 const TemplateCheckData& mandatory_items );
26 static void json_deep_update(nlohmann::json& target,
const nlohmann::json& source);
33 static bool loadTemplate(
const std::string& template_file,
34 const std::string& category,
35 const std::string& type );
37 static bool loadTemplates(
const std::string& template_folder,
38 const std::string& category );
41 static bool loadDataItems(
const std::string& template_file );
43 static bool loadNames(
const std::string& template_file );
45 static void addCategory(
const std::string& category );
47 static void addDataItem(
const std::string& dataitem,
const nlohmann::json& data );
49 static nlohmann::json templateFixer(
const nlohmann::json& template_data );
51 inline static std::map<std::string, std::vector<std::string> > _names;
52 inline static nlohmann::json _templates;