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

Function AbstractState_fluid_param_string

src/CoolPropLib.cpp:1089–1105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1087}
1088
1089EXPORT_CODE void CONVENTION AbstractState_fluid_param_string(const long handle, const char* param, char* return_buffer,
1090 const long return_buffer_length, long* errcode, char* message_buffer,
1091 const long buffer_length) {
1092 *errcode = 0;
1093 fpu_reset_guard guard;
1094 try {
1095 shared_ptr<CoolProp::AbstractState>& AS = handle_manager.get(handle);
1096 std::string temp = AS->fluid_param_string(param);
1097 if (temp.size() < static_cast<std::size_t>(return_buffer_length)) {
1098 std::memcpy(return_buffer, temp.c_str(), temp.size() + 1); // guarded above: size + null fits
1099 } else {
1100 *errcode = 2;
1101 }
1102 } catch (...) {
1103 HandleException(errcode, message_buffer, buffer_length);
1104 }
1105}
1106
1107EXPORT_CODE double CONVENTION AbstractState_saturated_liquid_keyed_output(const long handle, const long param, long* errcode, char* message_buffer,
1108 const long buffer_length) {

Callers

nothing calls this directly

Calls 4

HandleExceptionFunction · 0.85
getMethod · 0.45
fluid_param_stringMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected