KIM API V2
KIM_ArgumentName.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--2018, 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-v2.0.0-alpha.0 package.
31 //
32 
33 
34 #ifndef KIM_ARGUMENT_NAME_HPP_
35 #define KIM_ARGUMENT_NAME_HPP_
36 
37 #include <string>
38 
39 namespace KIM
40 {
41 // Forward declaration
42 class DataType;
43 
45 {
46  public:
48 
49  ArgumentName();
50  ArgumentName(int const id);
51  ArgumentName(std::string const & str);
52  bool operator==(ArgumentName const & rhs) const;
53  bool operator!=(ArgumentName const & rhs) const;
54  std::string String() const;
55 };
56 
57 namespace ARGUMENT_NAME
58 {
59 extern ArgumentName const numberOfParticles;
62 extern ArgumentName const coordinates;
63 extern ArgumentName const partialEnergy;
64 extern ArgumentName const partialForces;
66 extern ArgumentName const partialVirial;
68 
69 void GetNumberOfArguments(int * const numberOfArguments);
70 int GetArgumentName(int const index, ArgumentName * const argumentName);
71 
72 int GetArgumentDataType(ArgumentName const argumentName,
73  DataType * const dataType);
74 
75 struct Comparator
76 {
77  bool operator()(ArgumentName const & a, ArgumentName const & b) const
78  {
79  return a.argumentNameID < b.argumentNameID;
80  }
81 };
82 } // namespace ARGUMENT_NAME
83 } // namespace KIM
84 #endif // KIM_ARGUMENT_NAME_HPP_
int GetArgumentName(int const index, ArgumentName *const argumentName)
ArgumentName const particleContributing
bool operator==(ArgumentName const &rhs) const
ArgumentName const numberOfParticles
ArgumentName const partialVirial
ArgumentName const partialForces
int GetArgumentDataType(ArgumentName const argumentName, DataType *const dataType)
ArgumentName const partialEnergy
std::string String() const
ArgumentName const coordinates
bool operator!=(ArgumentName const &rhs) const
ArgumentName const particleSpeciesCodes
void GetNumberOfArguments(int *const numberOfArguments)
ArgumentName const partialParticleVirial
ArgumentName const partialParticleEnergy
bool operator()(ArgumentName const &a, ArgumentName const &b) const