Use class templates.

This commit is contained in:
Relintai 2024-01-06 13:44:59 +01:00
parent 564196394b
commit acff200ac1
2 changed files with 5 additions and 8 deletions

View File

@ -19,14 +19,7 @@ ENUMS
====================================================================================
ClockDirection
----------------------------------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
|||ENUM_ClockDirection|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -512,6 +512,7 @@ void process_file(const String &path) {
//print_class_index_keys(class_index);
String index_template = f.read_file("index_template.md.html");
String code_template = f.read_file("code_template.md.html");
List<String> index_template_keywords = get_template_keywords(index_template);
HashSet<String> used_keywords;
@ -526,7 +527,10 @@ void process_file(const String &path) {
String keyword = "|||" + E->get() + "|||";
index_str = index_str.replace(keyword, class_index[c]);
String class_str = class_index[c];
String class_name = get_structure_name(class_str);
index_str = index_str.replace(keyword, code_template.replace("$CODE$", class_str).replace("$NAME$", class_name));
used_keywords.insert(c);
}