kim-api  2.1.1+v2.1.1.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_CollectionItemType.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-2.1.1 package.
31 //
32 
33 
34 #ifndef KIM_COLLECTION_ITEM_TYPE_HPP_
35 #define KIM_COLLECTION_ITEM_TYPE_HPP_
36 
37 #include <string>
38 
39 namespace KIM
40 {
52 {
53  public:
64 
69 
75  CollectionItemType(int const id);
76 
85  CollectionItemType(std::string const & str);
86 
96  bool Known() const;
97 
106  bool operator==(CollectionItemType const & rhs) const;
107 
116  bool operator!=(CollectionItemType const & rhs) const;
117 
129  std::string const & ToString() const;
130 }; // class CollectionItemType
131 
134 namespace COLLECTION_ITEM_TYPE
135 {
144 extern CollectionItemType const modelDriver;
145 
154 extern CollectionItemType const portableModel;
155 
165 
166 
177 void GetNumberOfCollectionItemTypes(int * const numberOfCollectionItemTypes);
178 
194 int GetCollectionItemType(int const index,
195  CollectionItemType * const collectionItemType);
196 
201 {
207  CollectionItemType const & b) const
208  {
210  }
211 }; // struct Comparator
212 } // namespace COLLECTION_ITEM_TYPE
213 } // namespace KIM
214 
215 #endif // KIM_COLLECTION_ITEM_TYPE_HPP_
int GetCollectionItemType(int const index, CollectionItemType *const collectionItemType)
Get the identity of each defined standard CollectionItemType.
void GetNumberOfCollectionItemTypes(int *const numberOfCollectionItemTypes)
Get the number of standard CollectionItemType&#39;s defined by the KIM API.
CollectionItemType const simulatorModel
The standard simulatorModel CollectionItemType.
An Extensible Enumeration for the CollectionItemType&#39;s supported by the KIM API.
bool operator!=(CollectionItemType const &rhs) const
Compares CollectionItemType objects for inequality.
CollectionItemType const portableModel
The standard portableModel CollectionItemType.
Structure provided for use with std::map.
bool operator()(CollectionItemType const &a, CollectionItemType const &b) const
Provides an (logically unmeaningful) ordering for CollectionItemType objects so that they can be stor...
CollectionItemType()
Create an uninitialized CollectionItemType object.
int collectionItemTypeID
Integer identifying the specific CollectionItemType represented.
std::string const & ToString() const
Converts the object to a string.
CollectionItemType const modelDriver
The standard modelDriver CollectionItemType.
bool operator==(CollectionItemType const &rhs) const
Compares CollectionItemType objects for equality.
bool Known() const
Determines if the object is a quantity known to the KIM API.