SEScalarMass.h
1 /**************************************************************************************
2 Copyright 2015 Applied Research Associates, Inc.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the License
5 at:
6 http://www.apache.org/licenses/LICENSE-2.0
7 Unless required by applicable law or agreed to in writing, software distributed under
8 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9 CONDITIONS OF ANY KIND, either express or implied. See the License for the
10 specific language governing permissions and limitations under the License.
11 **************************************************************************************/
12 
13 #pragma once
14 #include <biogears/cdm/properties/SEScalarQuantity.h>
15 #include <biogears/schema/cdm/Properties.hxx>
16 
17 namespace biogears {
18 class BIOGEARS_API MassUnit : public CCompoundUnit {
19 public:
20  static const MassUnit ug;
21  static const MassUnit mg;
22  static const MassUnit g;
23  static const MassUnit kg;
24  static const MassUnit lb;
25 
26  MassUnit(const char* u);
27  MassUnit(const std::string& u);
28 
29  virtual ~MassUnit() = default;
30 
31  static bool IsValidUnit(const char* unit);
32  static bool IsValidUnit(const std::string& unit);
33  static const MassUnit& GetCompoundUnit(const char* unit);
34  static const MassUnit& GetCompoundUnit(const std::string& unit);
35 
36  };
37 
38  class BIOGEARS_API SEScalarMass : public SEScalarQuantity<MassUnit> {
39  public:
40  SEScalarMass() = default;
41  virtual ~SEScalarMass() = default;
42 
43  CDM::ScalarMassData* Unload() const override;
44  };
45 }
static const MassUnit g
Definition: SEScalarMass.h:22
Definition: SEScalarQuantity.h:24
Definition: SEScalarMass.h:38
Definition: CompoundUnit.h:59
Class corresponding to the ScalarMassData schema type.
Definition: Properties.hxx:6305
static const MassUnit lb
Definition: SEScalarMass.h:24
static const MassUnit mg
Definition: SEScalarMass.h:21
Definition: SEScalarMass.h:18
static const MassUnit ug
Definition: SEScalarMass.h:20
Definition: SEElectricalCircuit.h:18
static const MassUnit kg
Definition: SEScalarMass.h:23