33 lines
690 B
C++
33 lines
690 B
C++
#pragma once
|
|
#include <ostream>
|
|
|
|
namespace bts::md {
|
|
|
|
class SecurityMarketState {
|
|
public:
|
|
enum Value { PREOPEN, OPEN };
|
|
Value value = Value::OPEN;
|
|
|
|
constexpr const char *name() const noexcept;
|
|
};
|
|
|
|
std::ostream &operator<<(
|
|
std::ostream &out, const SecurityMarketState &value) noexcept;
|
|
|
|
//////////////////////////////////////////////////
|
|
// Definition
|
|
//////////////////////////////////////////////////
|
|
|
|
constexpr const char *SecurityMarketState::name() const noexcept {
|
|
switch (value) {
|
|
case SecurityMarketState::PREOPEN:
|
|
return "PREOPEN";
|
|
case SecurityMarketState::OPEN:
|
|
return "OPEN";
|
|
default:
|
|
return "UNKNOWN";
|
|
}
|
|
}
|
|
|
|
} // namespace bts::md
|