mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Convert javascript to use embind - works!
This commit is contained in:
@@ -949,4 +949,26 @@ std::string PhaseSI(const std::string &Name1, double Prop1, const std::string &N
|
||||
return phase_lookup_string(static_cast<phases>(Phase_int));
|
||||
}
|
||||
*/
|
||||
} /* namespace CoolProp */
|
||||
} /* namespace CoolProp */
|
||||
|
||||
|
||||
|
||||
/// *********************************************************************************
|
||||
/// *********************************************************************************
|
||||
/// EMSCRIPTEN (for javascript)
|
||||
/// *********************************************************************************
|
||||
/// *********************************************************************************
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
|
||||
#include <emscripten/bind.h>
|
||||
using namespace emscripten;
|
||||
|
||||
// Binding code
|
||||
EMSCRIPTEN_BINDINGS(coolprop_bindings) {
|
||||
function("Props1SI", &CoolProp::Props1SI);
|
||||
function("PropsSI", &CoolProp::PropsSI);
|
||||
function("get_global_param_string", &CoolProp::get_global_param_string);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user