KIM API V2
KIM_LanguageName.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_LANGUAGE_NAME_HPP_
35 #define KIM_LANGUAGE_NAME_HPP_
36 
37 #include <string>
38 
39 namespace KIM
40 {
42 {
43  public:
45 
46  LanguageName();
47  LanguageName(int const id);
48  LanguageName(std::string const str);
49  bool operator==(LanguageName const & rhs) const;
50  bool operator!=(LanguageName const & rhs) const;
51  std::string String() const;
52 };
53 
54 namespace LANGUAGE_NAME
55 {
56 extern LanguageName const cpp;
57 extern LanguageName const c;
58 extern LanguageName const fortran;
59 
60 void GetNumberOfLanguageNames(int * const numberOfLanguageNames);
61 int GetLanguageName(int const index, LanguageName * const languageName);
62 
63 struct Comparator
64 {
65  bool operator()(LanguageName const & a, LanguageName const & b) const
66  {
67  return a.languageNameID < b.languageNameID;
68  }
69 };
70 } // namespace LANGUAGE_NAME
71 } // namespace KIM
72 #endif // KIM_LANGUAGE_NAME_HPP_
std::string String() const
LanguageName const fortran
bool operator!=(LanguageName const &rhs) const
LanguageName const c
LanguageName const cpp
bool operator==(LanguageName const &rhs) const
int GetLanguageName(int const index, LanguageName *const languageName)
void GetNumberOfLanguageNames(int *const numberOfLanguageNames)
bool operator()(LanguageName const &a, LanguageName const &b) const