29 lines
1.0 KiB
C++
29 lines
1.0 KiB
C++
#ifndef NO_CPP0X
|
|
#include "MemorySegmentUtils.h"
|
|
#include "lib/config/config.h"
|
|
#include "lib/config/protos/MarketData.pb.h"
|
|
|
|
using namespace std;
|
|
|
|
namespace bts {
|
|
namespace md {
|
|
|
|
bool enable_depth(const string&, SecurityType) {
|
|
return true;
|
|
// return type == api::SECURITYTYPE_FUTURE || type == api::SECURITYTYPE_SPREAD || type == api::SECURITYTYPE_SYNTHETIC;
|
|
}
|
|
|
|
string segment_name(const string& symbol, SecurityType type, Venue exchange, Platform platform) {
|
|
return "bts_edge_" + config::get<md::PublisherNamespace>().shared_memory_namespace() + "_" + symbol + "_" + api::SecurityType_Name(type) + "_" + Venue_Name(exchange) + "_" + Platform_Name(platform);
|
|
}
|
|
|
|
std::string hot_segment_name(const std::string& symbol, SecurityType type, Venue exchange, Platform platform) {
|
|
return segment_name(symbol, type, exchange, platform) + "_hot";
|
|
}
|
|
std::string cold_segment_name(const std::string& symbol, SecurityType type, Venue exchange, Platform platform) {
|
|
return segment_name(symbol, type, exchange, platform) + "_cold";
|
|
}
|
|
|
|
}}//namespace
|
|
#endif
|