-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsettings.i
38 lines (33 loc) · 1021 Bytes
/
settings.i
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
#ifndef quantlib_settings_i
#define quantlib_settings_i
%include date.i
%{
using QuantLib::Settings;
%}
class Settings {
private:
Settings();
public:
static Settings& instance();
%extend {
Date getEvaluationDate() {
return self->evaluationDate();
}
void setEvaluationDate(const Date& d) {
self->evaluationDate() = d;
}
void includeReferenceDateEvents(bool b) {
self->includeReferenceDateEvents() = b;
}
void includeTodaysCashFlows(bool b) {
self->includeTodaysCashFlows() = b;
}
}
%pythoncode %{
evaluationDate = property(getEvaluationDate,setEvaluationDate,None)
includeReferenceDateCashFlows = property(None,includeReferenceDateEvents,None)
includeReferenceDateEvents = property(None,includeReferenceDateEvents,None)
includeTodaysCashFlows = property(None,includeTodaysCashFlows,None)
%}
};
#endif //quantlib_settings_i