SEScalarTemperature.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/properties/SEScalar.h"
6
7class CDM_DECL TemperatureUnit : public CCompoundUnit
8{
9public:
10 TemperatureUnit(const std::string& u) : CCompoundUnit(u) {}
11 virtual ~TemperatureUnit() {}
12
13 // Please use static units below
16
17 static bool IsValidUnit(const std::string& unit);
18 static const TemperatureUnit& GetCompoundUnit(const std::string& unit);
19
20 static const TemperatureUnit F;
21 static const TemperatureUnit C;
22 static const TemperatureUnit K;
23 static const TemperatureUnit R;
24};
25
26class CDM_DECL SEScalarTemperature : public SEScalarQuantity<TemperatureUnit>
27{
28public:
31
32 double GetValue(const TemperatureUnit& unit) const override;// Zero is not Zero for all units, gotta remove that logic for this scalar type
33};
Definition: CompoundUnit.h:40
CCompoundUnit & operator=(const CCompoundUnit &rhs)
Definition: CompoundUnit.h:132
Definition: SEScalar.h:208
Definition: SEScalarTemperature.h:27
SEScalarTemperature()
Definition: SEScalarTemperature.h:29
virtual ~SEScalarTemperature()
Definition: SEScalarTemperature.h:30
Definition: SEScalarTemperature.h:8
virtual ~TemperatureUnit()
Definition: SEScalarTemperature.h:11
static const TemperatureUnit F
Definition: SEScalarTemperature.h:20
static const TemperatureUnit C
Definition: SEScalarTemperature.h:21
static const TemperatureUnit K
Definition: SEScalarTemperature.h:22
TemperatureUnit(const std::string &u)
Definition: SEScalarTemperature.h:10
static const TemperatureUnit R
Definition: SEScalarTemperature.h:23
TemperatureUnit(const TemperatureUnit &)=delete

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.