Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
5 votes
1 answer
109 views

Replacement for 'enum class' with string functionality

Because I think maintainability can be done better with strings instead of plain enumerator-values when doing fstream IO, I wanted a replacement struct in my project that behaves like an ...
Jeroen Boschma's user avatar
2 votes
0 answers
129 views

ByteUnit class to convert across size units

Based on java.util.concurrent.TimeUnit class I wrote similar class to convert size units: ...
Nolequen's user avatar
  • 270
5 votes
5 answers
880 views

Enum with a lot of items and a long case statement to convert from string

Recently I wrote this class and it has a enum of all the interaction types a game item can have. What I want to know is, it seems a bit of a stretch to have a huge enum then that long switch, is there ...
Ashkru's user avatar
  • 281
4 votes
2 answers
23k views

Parsing from one enum to another

I face a problem I think I am not approaching appropiately. I have two independent enumerators that both will contain the same members, the only difference being the values given. I have to be able ...
Oscar Guillamon's user avatar
9 votes
3 answers
11k views

Using enum descriptions to string/text binding

In my WP8 application I need to show a couple of radio buttons to let the user select a value out of an enum. I don't want to hardcode either the value or the text (...
Adarsha's user avatar
  • 298
2 votes
3 answers
8k views

Converting a c# enum into a list to be sent to the client

I want to use the enum on the client for a dropdown list. Does this make sense, or is there a smarter way of doing this? ...
user1852503's user avatar
26 votes
6 answers
108k views

Conversion between enum and string in C++ class header

I have the following redundant-feeling design to convert between enums and strings regarding a class that stores enums. The ...
Veksi's user avatar
  • 431