OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
TouchstoneHandler.h
Go to the documentation of this file.
1#pragma once
2#include <string>
3#include <list>
4#include "OptionSettings.h"
7#include "MetadataParameter.h"
9
11{
12public:
13 TouchstoneHandler(const std::string& _fileName);
14 TouchstoneHandler(const TouchstoneHandler& _other) = delete;
15 TouchstoneHandler(TouchstoneHandler&& _other) noexcept = default;
17 TouchstoneHandler& operator=(TouchstoneHandler&& _other) noexcept = default;
18
19 static int32_t deriveNumberOfPorts(const std::string& _fileName);
20
21 void analyseFile(const std::string& _fileContent, int32_t _numberOfPorts);
22 const ts::OptionSettings& getOptionSettings() const { return m_optionSettings; }
23 const std::string& getComments() const { return m_comments; }
24 QuantityDescriptionSParameter* handOverQuantityDescription()
25 {
26 QuantityDescriptionSParameter* temp = m_quantityDescription;
27 m_quantityDescription = nullptr;
28 return temp;
29 }
30 MetadataParameter& getMetadataFrequencyParameter() { return m_frequencyParameter; }
31
32private:
34
35 std::string m_comments = "";
36 ts::OptionSettings m_optionSettings;
37
38 uint32_t m_touchstoneVersion = 1;
39 uint32_t m_portNumber = 0;
40
41 QuantityDescriptionSParameter* m_quantityDescription = nullptr;
42 MetadataParameter m_frequencyParameter;
43
44 ot::MatrixEntryPointer m_matrixEntry;
45
46 ot::GenericDataStructMatrix* m_firstValues = nullptr;
47 ot::GenericDataStructMatrix* m_secondValues = nullptr;
48
49 bool m_firstValueOfTuple = true;
50
51 void analyseLine(std::string& _content);
52 void analyseDataLine(std::string& _content);
53 void analyseOptionsLine(std::string& _line);
54 void analyseVersionTwoLine(std::string& _content);
55
56 void cleansOfComments(std::string& _content);
57 void cleansOfSpecialCharacter(std::string& _content);
58
60 ot::Variable turnLineSegmentToVariable(const std::string& _segment);
61};
62
Definition FixtureTouchstoneHandler.h:8
Definition TouchstoneHandler.h:11
MetadataParameter & getMetadataFrequencyParameter()
Definition TouchstoneHandler.h:30
const std::string & getComments() const
Definition TouchstoneHandler.h:23
void analyseFile(const std::string &_fileContent, int32_t _numberOfPorts)
Definition TouchstoneHandler.cpp:31
TouchstoneHandler & operator=(const TouchstoneHandler &_other)=delete
TouchstoneHandler(const TouchstoneHandler &_other)=delete
TouchstoneHandler & operator=(TouchstoneHandler &&_other) noexcept=default
static int32_t deriveNumberOfPorts(const std::string &_fileName)
Definition TouchstoneHandler.cpp:23
QuantityDescriptionSParameter * handOverQuantityDescription()
Definition TouchstoneHandler.h:24
TouchstoneHandler(TouchstoneHandler &&_other) noexcept=default
const ts::OptionSettings & getOptionSettings() const
Definition TouchstoneHandler.h:22
TouchstoneHandler(const std::string &_fileName)
Definition TouchstoneHandler.cpp:17
Definition Variable.h:107
Definition OptionSettings.h:7