OpenTwin
0.1
OpenTwin
Loading...
Searching...
No Matches
OptionsParameterHandlerFormat.h
Go to the documentation of this file.
1
#pragma once
2
#include "
OptionsParameterHandler.h
"
3
#include <map>
4
5
class
OptionsParameterHandlerFormat
:
public
OptionsParameterHandler
6
{
7
public
:
8
static
std::string
ToString
(
const
ts::option::Format
& format)
9
{
10
return
_formatToString.find(format)->second;
11
}
12
private
:
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
};
OptionsParameterHandler.h
OptionsParameterHandlerFormat
Definition
OptionsParameterHandlerFormat.h:6
OptionsParameterHandlerFormat::ToString
static std::string ToString(const ts::option::Format &format)
Definition
OptionsParameterHandlerFormat.h:8
OptionsParameterHandlerFormat::IndividualInterpretation
virtual bool IndividualInterpretation(const std::string &entry, ts::OptionSettings &options) override
Requires a string in lower cases.
Definition
OptionsParameterHandlerFormat.cpp:4
OptionsParameterHandler
Definition
OptionsParameterHandler.h:8
ts::OptionSettings
Definition
OptionSettings.h:7
ts::option::Format
Format
Definition
Options.h:18
ts::option::Format::Decibel_angle
@ Decibel_angle
ts::option::Format::magnitude_angle
@ magnitude_angle
ts::option::Format::real_imaginary
@ real_imaginary
Services
ImportParameterizedData
include
OptionsParameterHandlerFormat.h
Generated by
1.10.0