kim-api  2.1.4-git+v2.1.3-git-3-g4c859c7f.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_SupportStatus.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_SUPPORT_STATUS_HPP_
35 #define KIM_SUPPORT_STATUS_HPP_
36 
37 #include <string>
38 
39 namespace KIM
40 {
50 {
51  public:
62 
66  SupportStatus();
67 
73  SupportStatus(int const id);
74 
83  SupportStatus(std::string const & str);
84 
93  bool Known() const;
94 
102  bool operator==(SupportStatus const & rhs) const;
103 
111  bool operator!=(SupportStatus const & rhs) const;
112 
123  std::string const & ToString() const;
124 }; // class SupportStatus
125 
128 namespace SUPPORT_STATUS
129 {
138 extern SupportStatus const requiredByAPI;
139 
148 extern SupportStatus const notSupported;
149 
158 extern SupportStatus const required;
159 
168 extern SupportStatus const optional;
169 
170 
181 void GetNumberOfSupportStatuses(int * const numberOfSupportStatuses);
182 
197 int GetSupportStatus(int const index, SupportStatus * const supportStatus);
198 
203 {
208  bool operator()(SupportStatus const & a, SupportStatus const & b) const
209  {
210  return a.supportStatusID < b.supportStatusID;
211  }
212 }; // struct Comparator
213 } // namespace SUPPORT_STATUS
214 } // namespace KIM
215 
216 #endif // KIM_SUPPORT_STATUS_HPP_
void GetNumberOfSupportStatuses(int *const numberOfSupportStatuses)
Get the number of standard SupportStatus&#39;s defined by the KIM API.
bool operator==(SupportStatus const &rhs) const
Compares SupportStatus objects for equality.
int GetSupportStatus(int const index, SupportStatus *const supportStatus)
Get the identity of each defined standard SupportStatus.
SupportStatus()
Create an uninitialized SupportStatus object.
bool operator()(SupportStatus const &a, SupportStatus const &b) const
Provides an (logically unmeaningful) ordering for SupportStatus objects so that they can be stored in...
std::string const & ToString() const
Converts the object to a string.
bool Known() const
Determines if the object is a quantity known to the KIM API.
SupportStatus const notSupported
The standard notSupported status.
int supportStatusID
Integer identifying the specific SupportStatus represented.
SupportStatus const required
The standard required status.
An Extensible Enumeration for the SupportStatus&#39;s supported by the KIM API.
SupportStatus const requiredByAPI
The standard requiredByAPI status.
Structure provided for use with std::map.
bool operator!=(SupportStatus const &rhs) const
Compares SupportStatus objects for inequality.
SupportStatus const optional
The standard optional status.