OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
OptionsParameterHandlerParameter.h
Go to the documentation of this file.
1#pragma once
3#include "Options.h"
4
5#include <string>
6#include <map>
7
9{
10public:
11
12 static std::string ToString(const ts::option::Parameter& parameter)
13 {
14 return _parameterToString.find(parameter)->second;
15 }
16private:
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};
Definition OptionsParameterHandler.h:8
Definition OptionsParameterHandlerParameter.h:9
static std::string ToString(const ts::option::Parameter &parameter)
Definition OptionsParameterHandlerParameter.h:12
virtual bool IndividualInterpretation(const std::string &entry, ts::OptionSettings &options) override
Requires a string in lower cases.
Definition OptionsParameterHandlerParameter.cpp:3
Definition OptionSettings.h:7
Parameter
Definition Options.h:25