OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
OptionsParameterHandlerFormat.h
Go to the documentation of this file.
1#pragma once
3#include <map>
4
6{
7public:
8 static std::string ToString(const ts::option::Format& format)
9 {
10 return _formatToString.find(format)->second;
11 }
12private:
13 const std::map<std::string, ts::option::Format> _stringToFormat = { {"db",ts::option::Format::Decibel_angle}, {"ma", ts::option::Format::magnitude_angle}, {"ri", ts::option::Format::real_imaginary}};
14 inline static const std::map<ts::option::Format,std::string> _formatToString = { {ts::option::Format::Decibel_angle,"dB"}, {ts::option::Format::magnitude_angle,"MA"}, {ts::option::Format::real_imaginary, "RI"}};
15
16 virtual bool IndividualInterpretation(const std::string& entry, ts::OptionSettings& options) override;
17};
Definition OptionsParameterHandlerFormat.h:6
static std::string ToString(const ts::option::Format &format)
Definition OptionsParameterHandlerFormat.h:8
virtual bool IndividualInterpretation(const std::string &entry, ts::OptionSettings &options) override
Requires a string in lower cases.
Definition OptionsParameterHandlerFormat.cpp:4
Definition OptionsParameterHandler.h:8
Definition OptionSettings.h:7
Format
Definition Options.h:18