MCPcopy Create free account
hub / github.com/CoolProp/CoolProp / config_key_to_string

Function config_key_to_string

src/Configuration.cpp:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62namespace CoolProp {
63
64std::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
80std::string config_key_description(configuration_keys keys) {
81 switch (keys) {

Callers 2

item_to_jsonFunction · 0.85
possibly_set_from_envMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected