kim-api  2.3.1-git+v2.3.0-git-2-g378406f9.GNU.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 // KIM-API: An API for interatomic models
3 // Copyright (c) 2013--2022, Regents of the University of Minnesota.
4 // All rights reserved.
5 //
6 // Contributors:
7 // Ryan S. Elliott
8 //
9 // SPDX-License-Identifier: LGPL-2.1-or-later
10 //
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU Lesser General Public
13 // License as published by the Free Software Foundation; either
14 // version 2.1 of the License, or (at your option) any later version.
15 //
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Lesser General Public License for more details.
20 //
21 // You should have received a copy of the GNU Lesser General Public License
22 // along with this library; if not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 //
25 
26 //
27 // Release: This file is part of the kim-api.git repository.
28 //
29 
30 
31 #ifndef KIM_TEMPERATURE_UNIT_HPP_
32 #define KIM_TEMPERATURE_UNIT_HPP_
33 
34 #include <string>
35 
36 namespace KIM
37 {
48 {
49  public:
61 
66 
72  TemperatureUnit(int const id);
73 
82  TemperatureUnit(std::string const & str);
83 
92  bool Known() const;
93 
102  bool operator==(TemperatureUnit const & rhs) const;
103 
112  bool operator!=(TemperatureUnit const & rhs) const;
113 
125  std::string const & ToString() const;
126 }; // class TemperatureUnit
127 
130 namespace TEMPERATURE_UNIT
131 {
138 extern TemperatureUnit const unused;
139 
146 extern TemperatureUnit const K;
147 
148 
159 void GetNumberOfTemperatureUnits(int * const numberOfTemperatureUnits);
160 
176 int GetTemperatureUnit(int const index,
177  TemperatureUnit * const temperatureUnit);
178 
183 {
188  bool operator()(TemperatureUnit const & a, TemperatureUnit const & b) const
189  {
191  }
192 }; // struct Comparator
193 } // namespace TEMPERATURE_UNIT
194 } // namespace KIM
195 
196 #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.