Attila Kovacs 629 Posted November 13, 2019 4 hours ago, Fr0sT.Brutal said: For such big numbers you can have all the data in any convenient form (CSV, JSON, XML) and write a tool that would generate a unit from this data. Or you could convert a JSON on the fly to any record or class, thus the multi-language support you mentioned would be solved too. The question is, do you really need this amount of data linked to every single project? Share this post Link to post
Fr0sT.Brutal 900 Posted November 13, 2019 1 hour ago, Attila Kovacs said: Or you could convert a JSON on the fly to any record or class, thus the multi-language support you mentioned would be solved too. The question is, do you really need this amount of data linked to every single project? Sure he could but pre-defined enums and consts benefit from compiler-controlled item names and CodeInsight showing const values in code editor 1 Share this post Link to post
Attila Kovacs 629 Posted November 13, 2019 You could associate the loaded values with enums, but which of the above mentioned versions showing you the constant values with codeinsight? Share this post Link to post
Fr0sT.Brutal 900 Posted November 14, 2019 13 hours ago, Attila Kovacs said: You could associate the loaded values with enums, but which of the above mentioned versions showing you the constant values with codeinsight? Yup, my mistake. Codeinsight doesn't show arrays, even constant ones. 1 Share this post Link to post
Stefan Glienke 2006 Posted November 14, 2019 (edited) Although I am a big fan of rtti and attributes I would choose the const array[enum] of x any day as its compact to write and compile time evaluated (i.e. error if someone introduces a new enum value and forgets to specify an array value for it). Edited November 14, 2019 by Stefan Glienke 4 Share this post Link to post