[go: up one dir, main page]

Menu

[4ebe23]: / src / CoolProp.i  Maximize  Restore  History

Download this file

55 lines (47 with data), 1.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
%module CoolProp
%ignore CoolProp::AbstractState::set_mole_fractions(const std::vector< long double> &);
%ignore CoolProp::AbstractState::set_mass_fractions(const std::vector< long double> &);
%ignore CoolProp::set_config_json(rapidjson::Document &);
%ignore CoolProp::get_config_as_json(rapidjson::Document &);
#ifdef SWIGMATLAB
%ignore configuration_keys;
%ignore CoolProp::ConfigurationItem::ConfigurationDataTypes;
%ignore CoolProp::SsatSimpleState::SsatSimpleStateEnum;
%ignore CoolProp::composition_types;
%ignore CoolProp::fluid_types;
#endif
%include "std_string.i" // This %include allows the use of std::string natively
%include "std_vector.i" // This allows for the use of STL vectors natively(ish)
%include "exception.i" //
// Instantiate templates used by example
namespace std {
%template(LongDoubleVector) vector<long double>;
%template(DoubleVector) vector<double>;
}
%exception {
try {
$action
} catch (std::exception &e) {
SWIG_exception(SWIG_RuntimeError, e.what());
} catch (...) {
SWIG_exception(SWIG_RuntimeError, "unknown exception");
}
}
//
%rename(SS) CoolProp::SimpleState;
%rename(PED) CoolProp::PhaseEnvelopeData;
// This stuff will get included verbatim in CoolProp_wrap
%{
#include "DataStructures.h"
#include "AbstractState.h"
#include "CoolProp.h"
#include "PhaseEnvelope.h"
#define SWIG
#include "Configuration.h"
#undef SWIG
%}
%include "DataStructures.h"
%include "AbstractState.h"
%include "CoolProp.h"
%include "PhaseEnvelope.h"
%include "Configuration.h"