KIM API V2
kim_language_name_module.f90
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 
35  use, intrinsic :: iso_c_binding
36  implicit none
37  private
38 
39  public &
40  kim_language_name_type, &
41  kim_language_name_from_string, &
42  operator (.eq.), &
43  operator (.ne.), &
44  kim_language_name_string, &
45 
49 
50  type, bind(c) :: kim_language_name_type
51  integer(c_int) :: language_name_id
52  end type kim_language_name_type
53 
54  type(kim_language_name_type), protected, &
55  bind(c, name="KIM_LANGUAGE_NAME_cpp") &
57  type(kim_language_name_type), protected, &
58  bind(c, name="KIM_LANGUAGE_NAME_c") &
60  type(kim_language_name_type), protected, &
61  bind(c, name="KIM_LANGUAGE_NAME_fortran") &
63 
64  interface operator (.eq.)
65  logical function kim_language_name_equal(left, right)
66  use, intrinsic :: iso_c_binding
67  import kim_language_name_type
68  implicit none
69  type(kim_language_name_type), intent(in) :: left
70  type(kim_language_name_type), intent(in) :: right
71  end function kim_language_name_equal
72  end interface operator (.eq.)
73 
74  interface operator (.ne.)
75  logical function kim_language_name_not_equal(left, right)
76  use, intrinsic :: iso_c_binding
77  import kim_language_name_type
78  implicit none
79  type(kim_language_name_type), intent(in) :: left
80  type(kim_language_name_type), intent(in) :: right
81  end function kim_language_name_not_equal
82  end interface operator (.ne.)
83 
84  interface
85  subroutine kim_language_name_from_string(string, language_name)
86  import kim_language_name_type
87  implicit none
88  character(len=*), intent(in) :: string
89  type(kim_language_name_type), intent(out) :: language_name
90  end subroutine kim_language_name_from_string
91 
92  subroutine kim_language_name_string(language_name, string)
93  import kim_language_name_type
94  implicit none
95  type(kim_language_name_type), intent(in), value :: language_name
96  character(len=*), intent(out) :: string
97  end subroutine kim_language_name_string
98  end interface
99 end module kim_language_name_module
type(kim_language_name_type), public, protected kim_language_name_fortran
type(kim_language_name_type), public, protected kim_language_name_cpp
type(kim_language_name_type), public, protected kim_language_name_c