Skip to content

Commit 174854a

Browse files
author
Andrew Packard
committed
changes made to swig based off initial comments
1 parent 46d9816 commit 174854a

2 files changed

Lines changed: 13 additions & 19 deletions

File tree

OREAnalytics-SWIG/SWIG/orea_app.i

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ public:
138138
// TODO: API for setting a sensitivity stream
139139
// const boost::shared_ptr<SensitivityStream>& sensitivityStream();
140140
// Setters for exposure simulation
141-
void setSimmVersion(const std::string& s) { simmVersion_ = s; }
141+
void setSimmVersion(const std::string& s);
142142
void setCrifFromBuffer(const std::string& csvBuffer,
143143
char eol = '\n', char delim = ',', char quoteChar = '\0', char escapeChar = '\\');
144-
void setSimmCalculationCurrency(const std::string& s) { simmCalculationCurrency_ = s; }
145-
void setSimmResultCurrency(const std::string& s) { simmResultCurrency_ = s; }
146-
void setSimmReportingCurrency(const std::string& s) { simmReportingCurrency_ = s; }
144+
void setSimmCalculationCurrency(const std::string& s);
145+
void setSimmResultCurrency(const std::string& s);
146+
void setSimmReportingCurrency(const std::string& s);
147147
void setAmc(bool b);
148148
void setAmcTradeTypes(const std::string& s); // todo: parse to set<string>
149149
void setExposureBaseCurrency(const std::string& s);
@@ -232,9 +232,9 @@ public:
232232
void setCreditMigrationOutputFiles(const std::string& s) { creditMigrationOutputFiles_ = s; }
233233
// Setters for cashflow npv and dynamic backtesting
234234
void setCashflowHorizon(const std::string& s);
235-
void setPortfolioFilterDate(const std::string& s);
235+
void setPortfolioFilterDate(const std::string& s);
236236
// Set list of analytics that shall be run
237-
void setAnalytics(const std::string& s);
237+
void setAnalytics(const std::string& s);
238238
void insertAnalytic(const std::string& s);
239239
};
240240

OREData-SWIG/SWIG/ored_calendarAdjustmentConfig.i

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (C) 2018, 2020 Quaternion Risk Management Ltd
2+
Copyright (C) 2023 Quaternion Risk Management Ltd
33
All rights reserved.
44
55
This file is part of ORE, a free-software/open-source library
@@ -20,7 +20,7 @@
2020
#define ored_CalendarAdjustmentConfig_i
2121

2222
%{
23-
// put c++ declarations here
23+
2424
using ore::data::CalendarAdjustmentConfig;
2525
using std::map;
2626
using std::set;
@@ -33,36 +33,30 @@ using QuantLib::Calendar;
3333
%shared_ptr(CalendarAdjustmentConfig)
3434
class CalendarAdjustmentConfig {
3535
public:
36-
// default constructor
36+
3737
CalendarAdjustmentConfig();
3838

39-
// This method adds d to the list of holidays for cal name.
4039
void addHolidays(const string& calname, const Date& d);
4140

42-
// This method adds d to the list of business days for cal name.
4341
void addBusinessDays(const string& calname, const Date& d);
4442

45-
// This method adds s as a base calendar for cal name.
4643
void addBaseCalendar(const string& calname, const string& d);
4744

48-
// Returns all the holidays for a given cal name
49-
const set<Date>& getHolidays(const string& calname) const;
45+
const set<Date>& getHolidays(const string& calname);
5046

51-
// Returns all the business days for a given calname
52-
const set<Date>& getBusinessDays(const string& calname) const;
47+
const set<Date>& getBusinessDays(const string& calname);
5348

5449
set<string> getCalendars() const;
5550

56-
const string& getBaseCalendar(const string& calname) const;
51+
const string& getBaseCalendar(const string& calname);
5752

58-
// add all holidays and business days from c to this instance
5953
void append(const CalendarAdjustmentConfig& c);
6054
private:
6155
map<string, string> baseCalendars_;
6256
map<string, set<Date>> additionalHolidays_;
6357
map<string, set<Date>> additionalBusinessDays_;
6458

65-
string normalisedName(const string&) const;
59+
string normalisedName(const string&);
6660
};
6761

6862

0 commit comments

Comments
 (0)