@@ -15,10 +15,8 @@ namespace ccapi {
1515 */
1616class Subscription {
1717 public:
18- Subscription () {}
19-
20- Subscription (const std::string& exchange, const std::string& instrument, const std::string& field, const std::string& options = " " ,
21- const std::string& correlationId = " " , const std::map<std::string, std::string>& credential = {})
18+ explicit Subscription (const std::string& exchange = " " , const std::string& instrument = " " , const std::string& field = " " , const std::string& options = " " ,
19+ const std::string& correlationId = " " , const std::map<std::string, std::string>& credential = {})
2220 : exchange(exchange), instrument(instrument), field(field), correlationId(correlationId), credential(credential) {
2321 auto originalInstrumentSet = UtilString::splitToSet (instrument, " ," );
2422 std::copy_if (originalInstrumentSet.begin (), originalInstrumentSet.end (), std::inserter (this ->instrumentSet , this ->instrumentSet .end ()),
@@ -127,6 +125,12 @@ class Subscription {
127125
128126 const std::string& getMarginType () const { return marginType; }
129127
128+ void setExchange (const std::string& exchange) { this ->exchange = exchange; }
129+
130+ void setInstrument (const std::string& instrument) { this ->instrument = instrument; }
131+
132+ void setField (const std::string& field) { this ->field = field; }
133+
130134 void setTimeSent (TimePoint timeSent) { this ->timeSent = timeSent; }
131135
132136 void setInstrumentType (const std::string& instrumentType) { this ->instrumentType = instrumentType; }
0 commit comments