Add security_id/name fns to ExecutionReport for convenience
So callers don't need to check if security is a nullptr
This commit is contained in:
1 parent
a0f77f92a3
commit
77e5c1481b
3 files changed
+23
No files matched your search
@@ -34,6 +34,14 @@ void ExecutionReport::get_ts(
|
||||
transact_time);
|
||||
}
|
||||
|
||||
uint32_t ExecutionReport::security_id() const {
|
||||
return security == nullptr ? security->id() : 0;
|
||||
}
|
||||
|
||||
const string &ExecutionReport::security_name() const {
|
||||
return bts::securities::descriptor(security);
|
||||
}
|
||||
|
||||
string ExecutionReport::to_string() const {
|
||||
ostringstream rv;
|
||||
rv << "account_name: " << to_trim_strn(account_name)
|
||||
|
||||
Reference in new issue
Block a user