kim-api  2.1.4-git+v2.1.3-git-1-g7847914a.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_TemperatureUnit.hpp
Go to the documentation of this file.
1 //
2 // CDDL HEADER START
3 //
4 // The contents of this file are subject to the terms of the Common Development
5 // and Distribution License Version 1.0 (the "License").
6 //
7 // You can obtain a copy of the license at
8 // http://www.opensource.org/licenses/CDDL-1.0. See the License for the
9 // specific language governing permissions and limitations under the License.
10 //
11 // When distributing Covered Code, include this CDDL HEADER in each file and
12 // include the License file in a prominent location with the name LICENSE.CDDL.
13 // If applicable, add the following below this CDDL HEADER, with the fields
14 // enclosed by brackets "[]" replaced with your own identifying information:
15 //
16 // Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
17 //
18 // CDDL HEADER END
19 //
20 
21 //
22 // Copyright (c) 2016--2019, Regents of the University of Minnesota.
23 // All rights reserved.
24 //
25 // Contributors:
26 // Ryan S. Elliott
27 //
28 
29 //
30 // Release: This file is part of the kim-api.git repository.
31 //
32 
33 
34 #ifndef KIM_TEMPERATURE_UNIT_HPP_
35 #define KIM_TEMPERATURE_UNIT_HPP_
36 
37 #include <string>
38 
39 namespace KIM
40 {
51 {
52  public:
64 
69 
75  TemperatureUnit(int const id);
76 
85  TemperatureUnit(std::string const & str);
86 
95  bool Known() const;
96 
105  bool operator==(TemperatureUnit const & rhs) const;
106 
115  bool operator!=(TemperatureUnit const & rhs) const;
116 
128  std::string const & ToString() const;
129 }; // class TemperatureUnit
130 
133 namespace TEMPERATURE_UNIT
134 {
141 extern TemperatureUnit const unused;
142 
149 extern TemperatureUnit const K;
150 
151 
162 void GetNumberOfTemperatureUnits(int * const numberOfTemperatureUnits);
163 
179 int GetTemperatureUnit(int const index,
180  TemperatureUnit * const temperatureUnit);
181 
186 {
191  bool operator()(TemperatureUnit const & a, TemperatureUnit const & b) const
192  {
194  }
195 }; // struct Comparator
196 } // namespace TEMPERATURE_UNIT
197 } // namespace KIM
198 
199 #endif // KIM_TEMPERATURE_UNIT_HPP_
TemperatureUnit const unused
Indicates that a TemperatureUnit is not used.
An Extensible Enumeration for the TemperatureUnit&#39;s supported by the KIM API.
TemperatureUnit()
Create an uninitialized TemperatureUnit object.
int GetTemperatureUnit(int const index, TemperatureUnit *const temperatureUnit)
Get the identity of each defined standard TemperatureUnit.
Structure provided for use with std::map.
bool Known() const
Determines if the object is a quantity known to the KIM API.
int temperatureUnitID
Integer identifying the specific TemperatureUnit represented.
bool operator()(TemperatureUnit const &a, TemperatureUnit const &b) const
Provides an (logically unmeaningful) ordering for TemperatureUnit objects so that they can be stored ...
std::string const & ToString() const
Converts the object to a string.
void GetNumberOfTemperatureUnits(int *const numberOfTemperatureUnits)
Get the number of standard TemperatureUnit&#39;s defined by the KIM API.
bool operator!=(TemperatureUnit const &rhs) const
Compares TemperatureUnit objects for inequality.
bool operator==(TemperatureUnit const &rhs) const
Compares TemperatureUnit objects for equality.
TemperatureUnit const K
The standard Kelvin unit of temperature.