@@ -19,22 +19,18 @@ struct LangFormat
1919 std::string array_format;
2020 std::string structS_format; // Start of struct declaration
2121 std::string structE_format; // End of struct declaration
22-
23- std::string using_array;
24- std::string using_string;
25-
22+ std::map<std::string, std::string> usings;
2623 std::string file_extension;
2724
2825 LangFormat () = default ;
29-
3026 void parseFormatByName (std::string name);
3127};
3228
3329const std::map<std::string, LangFormat> globalFormats
3430{
35- { " cpp" , { " int" , " unsigned int" , " long long" , " unsigned long long" , " float" , " double" , " bool" , " std::string" , " void*" , " {0} {1};" , " std::vector<{}>" , " struct {} {{" , " };" , " #include <vector> " , " #include <string> " , " h" } },
36- { " csharp" , { " int" , " uint" , " long" , " ulong" , " float" , " double" , " bool" , " string" , " object" , " {0} {1};" , " List<{}>" , " class {}\n {{" , " }" , " using System.Collections.Generic;" , " " , " cs" } },
37- { " java" , { " int" , " int" , " long" , " long" , " float" , " double" , " bool" , " String" , " Object" , " {0} {1};" , " ArrayList<{}>" , " class {}\n {{" , " }" , " " , " " , " java" } },
38- { " kotlin" , { " int" , " UInt" , " long" , " ULong" , " float" , " double" , " bool" , " String" , " Object" , " val {1}: {0};" , " List<{}>" , " class {}\n {{" , " }" , " " , " " , " kt" } },
39- { " rust" , { " i32" , " u32" , " i64" , " u64" , " f32" , " f64" , " bool" , " String" , " " , " {1}: {0}," , " Vec<{}>" , " struct {}\n {{" , " }" , " " , " " , " rs" } },
31+ { " cpp" , { " int" , " unsigned int" , " long long" , " unsigned long long" , " float" , " double" , " bool" , " std::string" , " void*" , " {0} {1};" , " std::vector<{}>" , " struct {} {{" , " };" , {{ " std::string " , " #include <string> " }, { " std::vector " , " #include <vector> " }}, " h" } },
32+ { " csharp" , { " int" , " uint" , " long" , " ulong" , " float" , " double" , " bool" , " string" , " object" , " {0} {1};" , " List<{}>" , " class {}\n {{" , " }" , {{ " List " , " using System.Collections.Generic;" }} , " cs" } },
33+ { " java" , { " int" , " int" , " long" , " long" , " float" , " double" , " bool" , " String" , " Object" , " {0} {1};" , " ArrayList<{}>" , " class {}\n {{" , " }" , {} , " java" } },
34+ { " kotlin" , { " int" , " UInt" , " long" , " ULong" , " float" , " double" , " bool" , " String" , " Object" , " val {1}: {0};" , " List<{}>" , " class {}\n {{" , " }" , {} , " kt" } },
35+ { " rust" , { " i32" , " u32" , " i64" , " u64" , " f32" , " f64" , " bool" , " String" , " " , " {1}: {0}," , " Vec<{}>" , " struct {}\n {{" , " }" , {} , " rs" } },
4036};
0 commit comments