#include "PlatformOption.h" #include "lib/md/protos/co2.pb.h" namespace bts::cmds::md { #define NAME_PAIR(val) \ { name(val), val } EnumOptionNames PlatformOption::names() { return { NAME_PAIR(co2::PLATFORM_CELOXICA), NAME_PAIR(co2::PLATFORM_ICEONIXS), NAME_PAIR(co2::PLATFORM_MDP3EMUMBA), NAME_PAIR(co2::PLATFORM_MDP3ONIXS), NAME_PAIR(co2::PLATFORM_SIM), NAME_PAIR(co2::PLATFORM_DERIBIT)}; } std::string PlatformOption::name(bts::co2::Platform platform) { switch (platform) { case co2::PLATFORM_CELOXICA: return "celoxica"; case co2::PLATFORM_ICEONIXS: return "iceonixs"; case co2::PLATFORM_MDP3EMUMBA: return "mdp3emumba"; case co2::PLATFORM_MDP3ONIXS: return "mdp3onixs"; case co2::PLATFORM_SIM: return "sim"; case co2::PLATFORM_DERIBIT: return "deribit"; default: return std::to_string(static_cast(platform)); } } } // namespace bts::cmds::md