OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
PhysicalQuantities.h
Go to the documentation of this file.
1#pragma once
2#include <string>
3
5{
6public:
7 PhysicalQuantities(double enteredValue, double internalValue, std::string selectedUnit)
8 :_enteredValue(enteredValue), _internalValue(internalValue), _selectedUnit(selectedUnit) {};
11 {
12 if(this == &rhs)
13 {
14 return *this;
15 }
16 _enteredValue = rhs._enteredValue;
17 _internalValue = rhs._internalValue;
18 _selectedUnit = rhs._selectedUnit;
19 return *this;
20 }
21
22 std::string Print(void) { return std::to_string(_enteredValue) + " " + _selectedUnit; }
23 const double GetInternalValue(void) const { return _internalValue; };
24private:
25 double _enteredValue;
26 double _internalValue;
27 std::string _selectedUnit;
28};
Definition PhysicalQuantities.h:5
const double GetInternalValue(void) const
Definition PhysicalQuantities.h:23
PhysicalQuantities()
Definition PhysicalQuantities.h:9
std::string Print(void)
Definition PhysicalQuantities.h:22
PhysicalQuantities(double enteredValue, double internalValue, std::string selectedUnit)
Definition PhysicalQuantities.h:7
PhysicalQuantities & operator=(const PhysicalQuantities &rhs)
Definition PhysicalQuantities.h:10