chore: Rename 'security_type' -> 'type'
For convenience (it's shorter)
This commit is contained in:
1 parent
ad465b593f
commit
7c66260ff1
2 files changed
+8
-8
No files matched your search
@@ -21,7 +21,7 @@ class Security {
|
||||
constexpr const std::string &desc() const;
|
||||
constexpr const std::string &group() const;
|
||||
constexpr SecurityID id() const;
|
||||
api::domain::SecurityType security_type() const;
|
||||
api::domain::SecurityType type() const;
|
||||
constexpr const std::string &symbol() const;
|
||||
constexpr api::domain::Venue venue() const;
|
||||
};
|
||||
|
||||
@@ -181,7 +181,7 @@ void CCMarketDataListener::on_securities(
|
||||
"CCMarketDataListener::on_securities added new security, exchange: "
|
||||
"{} type: {} desc: {} id: {} spot: {} fut: {} spr: {} opt: {}",
|
||||
bts::api::domain::Venue_Name(s_comm.venue),
|
||||
bts::api::domain::SecurityType_Name(sec.security_type()), s_comm.desc,
|
||||
bts::api::domain::SecurityType_Name(sec.type()), s_comm.desc,
|
||||
search_result.key,
|
||||
std::holds_alternative<bts::domain::SpotSecurity>(sec.security),
|
||||
std::holds_alternative<bts::domain::FutureSecurity>(sec.security),
|
||||
@@ -194,14 +194,14 @@ void CCMarketDataListener::on_securities(
|
||||
"exchange: "
|
||||
"{} type: {} desc: {} id: {}",
|
||||
bts::api::domain::Venue_Name(s_comm.venue),
|
||||
bts::api::domain::SecurityType_Name(s_comm.type), s_comm.desc,
|
||||
search_result.key);
|
||||
bts::api::domain::SecurityType_Name(sec.type()),
|
||||
s_comm.desc, search_result.key);
|
||||
continue;
|
||||
}
|
||||
bts_assert(search_result.exists_now);
|
||||
if (!pursue)
|
||||
continue;
|
||||
switch (sec.security_type()) {
|
||||
switch (sec.type()) {
|
||||
case bts::api::domain::SecurityType::SPOT:
|
||||
_add_spot(sec);
|
||||
break;
|
||||
@@ -339,7 +339,7 @@ CCSecurityData *CCMarketDataListener::_find_handle(
|
||||
}
|
||||
|
||||
void CCMarketDataListener::_add_future(const bts::domain::Security &sec) {
|
||||
bts_assert(sec.security_type() == bts::api::domain::SecurityType::FUTURE);
|
||||
bts_assert(sec.type() == bts::api::domain::SecurityType::FUTURE);
|
||||
auto search_result = _find_sec(sec, false);
|
||||
bts_assert(search_result.existed_before);
|
||||
FixedFutureSecurity ff_sec;
|
||||
@@ -358,7 +358,7 @@ void CCMarketDataListener::_add_future(const bts::domain::Security &sec) {
|
||||
}
|
||||
|
||||
void CCMarketDataListener::_add_option(const bts::domain::Security &sec) {
|
||||
bts_assert(sec.security_type() == bts::api::domain::SecurityType::OPTION);
|
||||
bts_assert(sec.type() == bts::api::domain::SecurityType::OPTION);
|
||||
auto search_result = _find_sec(sec, false);
|
||||
bts_assert(search_result.existed_before);
|
||||
FixedOptionSecurity fo_sec;
|
||||
@@ -381,7 +381,7 @@ void CCMarketDataListener::_add_option(const bts::domain::Security &sec) {
|
||||
void CCMarketDataListener::_add_spot(const bts::domain::Security &sec) {
|
||||
LOG(md, Info, "CCMarketDataListener::_add_spot spot: {}",
|
||||
sec.security_common.desc);
|
||||
bts_assert(sec.security_type() == bts::api::domain::SecurityType::SPOT);
|
||||
bts_assert(sec.type() == bts::api::domain::SecurityType::SPOT);
|
||||
auto search_result = _find_sec(sec, false);
|
||||
bts_assert(search_result.existed_before);
|
||||
FixedStockSecurity fs_sec;
|
||||
|
||||
Reference in new issue
Block a user