Survey of Technique Questions..
-
Almost every program I have worked on uses some technqiue to convert enumberated values to strings (and vice-versa). I suspect I have seen a dozen or more different techniques when multi-language translation is factored in. I am curious to what preferences other developers have and any pros/cons they see with those techniques.
-
Almost every program I have worked on uses some technqiue to convert enumberated values to strings (and vice-versa). I suspect I have seen a dozen or more different techniques when multi-language translation is factored in. I am curious to what preferences other developers have and any pros/cons they see with those techniques.
-
Sorry to be vague. Was wondering what generic techniques you use/recommend for implementing conversions between enumberated type values and string representations. Also curious how (of if) you would use a different technique for multi-language support/translation.
-
Sorry to be vague. Was wondering what generic techniques you use/recommend for implementing conversions between enumberated type values and string representations. Also curious how (of if) you would use a different technique for multi-language support/translation.
I created a class called
EnumStringMap
which maps enums toCString
s and/or resource ids. The includes some handy-dandy helper methods that allow it to be used with aCComboBox
. Unfortunately I can't post it because it's code written for work. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com -
Almost every program I have worked on uses some technqiue to convert enumberated values to strings (and vice-versa). I suspect I have seen a dozen or more different techniques when multi-language translation is factored in. I am curious to what preferences other developers have and any pros/cons they see with those techniques.
TRY
CMap
with integer as a KEY!"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta