| 1040 | } |
| 1041 | |
| 1042 | std::string get_global_param_string(const std::string& ParamName) { |
| 1043 | if (ParamName == "version") { |
| 1044 | return version; |
| 1045 | } else if (ParamName == "gitrevision") { |
| 1046 | return gitrevision; |
| 1047 | } else if (ParamName == "errstring") { |
| 1048 | std::scoped_lock lock(message_mutex); |
| 1049 | std::string temp = error_string; |
| 1050 | error_string = ""; |
| 1051 | return temp; |
| 1052 | } else if (ParamName == "warnstring") { |
| 1053 | std::scoped_lock lock(message_mutex); |
| 1054 | std::string temp = warning_string; |
| 1055 | warning_string = ""; |
| 1056 | return temp; |
| 1057 | } else if (ParamName == "FluidsList" || ParamName == "fluids_list" || ParamName == "fluidslist") { |
| 1058 | return get_fluid_list(); |
| 1059 | } else if (ParamName == "incompressible_list_pure") { |
| 1060 | return get_incompressible_list_pure(); |
| 1061 | } else if (ParamName == "incompressible_list_solution") { |
| 1062 | return get_incompressible_list_solution(); |
| 1063 | } else if (ParamName == "mixture_binary_pairs_list") { |
| 1064 | return get_csv_mixture_binary_pairs(); |
| 1065 | } else if (ParamName == "parameter_list") { |
| 1066 | return get_csv_parameter_list(); |
| 1067 | } else if (ParamName == "predefined_mixtures") { |
| 1068 | return get_csv_predefined_mixtures(); |
| 1069 | } else if (ParamName == "HOME") { |
| 1070 | return get_home_dir(); |
| 1071 | } else if (ParamName == "REFPROP_version") { |
| 1072 | return REFPROPMixtureBackend::version(); |
| 1073 | } else if (ParamName == "cubic_fluids_schema") { |
| 1074 | return std::string{CoolProp::CubicLibrary::get_cubic_fluids_schema()}; |
| 1075 | } else if (ParamName == "cubic_fluids_list") { |
| 1076 | return CoolProp::CubicLibrary::get_cubic_fluids_list(); |
| 1077 | } else if (ParamName == "pcsaft_fluids_schema") { |
| 1078 | return std::string{CoolProp::PCSAFTLibrary::get_pcsaft_fluids_schema()}; |
| 1079 | } else { |
| 1080 | throw ValueError(format("Input parameter [%s] is invalid", ParamName.c_str())); |
| 1081 | } |
| 1082 | }; |
| 1083 | #if defined(ENABLE_CATCH) |
| 1084 | TEST_CASE("Check inputs to get_global_param_string", "[get_global_param_string]") { |
| 1085 | const int num_good_inputs = 8; |