kim-api 2.4.1+AppleClang.AppleClang.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
 
Loading...
Searching...
No Matches
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-2.4.1 package.
28//
29
30
31#ifndef KIM_TEMPERATURE_UNIT_HPP_
32#define KIM_TEMPERATURE_UNIT_HPP_
33
34#include <string>
35
36namespace 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
131{
138extern TemperatureUnit const unused;
139
146extern TemperatureUnit const K;
147
148
159void GetNumberOfTemperatureUnits(int * const numberOfTemperatureUnits);
160
176int 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_
An Extensible Enumeration for the TemperatureUnit's supported by the KIM API.
bool operator!=(TemperatureUnit const &rhs) const
Compares TemperatureUnit objects for inequality.
bool Known() const
Determines if the object is a quantity known to the KIM API.
TemperatureUnit()
Create an uninitialized TemperatureUnit object.
std::string const & ToString() const
Converts the object to a string.
bool operator==(TemperatureUnit const &rhs) const
Compares TemperatureUnit objects for equality.
int temperatureUnitID
Integer identifying the specific TemperatureUnit represented.
TemperatureUnit(int const id)
Create a TemperatureUnit object with the specified id.
TemperatureUnit(std::string const &str)
Create a TemperatureUnit object corresponding to the provided string. If the string does not match on...
Contains the enumeration constants and the discovery routines for the TemperatureUnit Extensible Enum...
TemperatureUnit const unused
Indicates that a TemperatureUnit is not used.
TemperatureUnit const K
The standard Kelvin unit of temperature.
int GetTemperatureUnit(int const index, TemperatureUnit *const temperatureUnit)
Get the identity of each defined standard TemperatureUnit.
void GetNumberOfTemperatureUnits(int *const numberOfTemperatureUnits)
Get the number of standard TemperatureUnit's defined by the KIM API.
Structure provided for use with std::map.
bool operator()(TemperatureUnit const &a, TemperatureUnit const &b) const
Provides an (logically unmeaningful) ordering for TemperatureUnit objects so that they can be stored ...