32 lines
966 B
C++
32 lines
966 B
C++
#pragma once
|
|
#include "MarketDataListenerID.h"
|
|
#include "MarketDataRegistrationError.h"
|
|
#include <optional>
|
|
|
|
namespace bts::md {
|
|
|
|
class MarketDataRegistration {
|
|
public:
|
|
MarketDataRegistration() = default;
|
|
explicit MarketDataRegistration(MarketDataListenerID listener_id);
|
|
explicit MarketDataRegistration(MarketDataRegistrationError error);
|
|
// will have a value when there is no error
|
|
std::optional<MarketDataListenerID> listener_id;
|
|
// domain::Venue venue = domain::Venue::Glbx;
|
|
MarketDataRegistrationError error = {};
|
|
};
|
|
|
|
//////////////////////////////////////////////////
|
|
// Definition
|
|
//////////////////////////////////////////////////
|
|
|
|
inline MarketDataRegistration::MarketDataRegistration(
|
|
MarketDataListenerID listener_id)
|
|
: listener_id(listener_id), error() {}
|
|
|
|
inline MarketDataRegistration::MarketDataRegistration(
|
|
MarketDataRegistrationError error)
|
|
: listener_id(std::nullopt), error(error) {}
|
|
|
|
} // namespace bts::md
|