| 62 | namespace CoolProp { |
| 63 | |
| 64 | std::string config_key_to_string(configuration_keys keys) { |
| 65 | switch (keys) { |
| 66 | /* ***MAGIC WARNING**!! |
| 67 | * See http://stackoverflow.com/a/148610 |
| 68 | * See http://stackoverflow.com/questions/147267/easy-way-to-use-variables-of-enum-types-as-string-in-c#202511 |
| 69 | */ |
| 70 | #define X(Enum, String, Default, Desc) \ |
| 71 | case Enum: \ |
| 72 | return String; \ |
| 73 | break; |
| 74 | CONFIGURATION_KEYS_ENUM |
| 75 | #undef X |
| 76 | } |
| 77 | return ""; // will never get here, just to make compiler happy |
| 78 | }; |
| 79 | |
| 80 | std::string config_key_description(configuration_keys keys) { |
| 81 | switch (keys) { |
no outgoing calls
no test coverage detected