OpenTwin
0.1
OpenTwin
Loading...
Searching...
No Matches
OptionsParameterHandlerParameter.h
Go to the documentation of this file.
1
#pragma once
2
#include "
OptionsParameterHandler.h
"
3
#include "
Options.h
"
4
5
#include <string>
6
#include <map>
7
8
class
OptionsParameterHandlerParameter
:
public
OptionsParameterHandler
9
{
10
public
:
11
12
static
std::string
ToString
(
const
ts::option::Parameter
& parameter)
13
{
14
return
_parameterToString.find(parameter)->second;
15
}
16
private
:
17
const
std::map<std::string, ts::option::Parameter> _stringToParameter = { {
"s"
,
ts::option::Parameter::Scattering
},{
"y"
,
ts::option::Parameter::Admittance
},{
"z"
,
ts::option::Parameter::Impedance
},{
"h"
,
ts::option::Parameter::Hybrid_h
},{
"g"
,
ts::option::Parameter::Hybrid_g
} };
18
inline
static
const
std::map<ts::option::Parameter, std::string> _parameterToString = { {
ts::option::Parameter::Scattering
,
"S"
},{
ts::option::Parameter::Admittance
,
"Y"
},{
ts::option::Parameter::Impedance
,
"Z"
},{
ts::option::Parameter::Hybrid_h
,
"H"
},{
ts::option::Parameter::Hybrid_g
,
"G"
} };
19
20
virtual
bool
IndividualInterpretation
(
const
std::string& entry,
ts::OptionSettings
& options)
override
;
21
22
};
Options.h
OptionsParameterHandler.h
OptionsParameterHandler
Definition
OptionsParameterHandler.h:8
OptionsParameterHandlerParameter
Definition
OptionsParameterHandlerParameter.h:9
OptionsParameterHandlerParameter::ToString
static std::string ToString(const ts::option::Parameter ¶meter)
Definition
OptionsParameterHandlerParameter.h:12
OptionsParameterHandlerParameter::IndividualInterpretation
virtual bool IndividualInterpretation(const std::string &entry, ts::OptionSettings &options) override
Requires a string in lower cases.
Definition
OptionsParameterHandlerParameter.cpp:3
ts::OptionSettings
Definition
OptionSettings.h:7
ts::option::Parameter
Parameter
Definition
Options.h:25
ts::option::Parameter::Hybrid_g
@ Hybrid_g
ts::option::Parameter::Impedance
@ Impedance
ts::option::Parameter::Hybrid_h
@ Hybrid_h
ts::option::Parameter::Admittance
@ Admittance
ts::option::Parameter::Scattering
@ Scattering
Services
ImportParameterizedData
include
OptionsParameterHandlerParameter.h
Generated by
1.10.0