KIM API V2
kim_support_status_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-beta.1 package.
31 !
32 
33 
35  use, intrinsic :: iso_c_binding
36  implicit none
37  private
38 
39  public &
40  kim_support_status_type, &
41  kim_support_status_from_string, &
42  operator (.eq.), &
43  operator (.ne.), &
44  kim_support_status_string, &
45 
50 
51  kim_support_status_get_number_of_support_statuses, &
52  kim_support_status_get_support_status
53 
54 
55  type, bind(c) :: kim_support_status_type
56  integer(c_int) :: support_status_id
57  end type kim_support_status_type
58 
59  type(kim_support_status_type), protected, &
60  bind(c, name="KIM_SUPPORT_STATUS_requiredByAPI") &
62  type(kim_support_status_type), protected, &
63  bind(c, name="KIM_SUPPORT_STATUS_notSupported") &
65  type(kim_support_status_type), protected, &
66  bind(c, name="KIM_SUPPORT_STATUS_required") &
68  type(kim_support_status_type), protected, &
69  bind(c, name="KIM_SUPPORT_STATUS_optional") &
71 
72  interface operator (.eq.)
73  logical function kim_support_status_equal(left, right)
74  use, intrinsic :: iso_c_binding
75  import kim_support_status_type
76  implicit none
77  type(kim_support_status_type), intent(in) :: left
78  type(kim_support_status_type), intent(in) :: right
79  end function kim_support_status_equal
80  end interface operator (.eq.)
81 
82  interface operator (.ne.)
83  logical function kim_support_status_not_equal(left, right)
84  use, intrinsic :: iso_c_binding
85  import kim_support_status_type
86  implicit none
87  type(kim_support_status_type), intent(in) :: left
88  type(kim_support_status_type), intent(in) :: right
89  end function kim_support_status_not_equal
90  end interface operator (.ne.)
91 
92  interface
93  subroutine kim_support_status_from_string(string, support_status)
94  use, intrinsic :: iso_c_binding
95  import kim_support_status_type
96  implicit none
97  character(len=*, kind=c_char), intent(in) :: string
98  type(kim_support_status_type), intent(out) :: support_status
99  end subroutine kim_support_status_from_string
100 
101  subroutine kim_support_status_string(support_status, string)
102  use, intrinsic :: iso_c_binding
103  import kim_support_status_type
104  implicit none
105  type(kim_support_status_type), intent(in), value :: support_status
106  character(len=*, kind=c_char), intent(out) :: string
107  end subroutine kim_support_status_string
108 
109  subroutine kim_support_status_get_number_of_support_statuses( &
110  number_of_support_statuses)
111  use, intrinsic :: iso_c_binding
112  implicit none
113  integer(c_int), intent(out) :: number_of_support_statuses
114  end subroutine kim_support_status_get_number_of_support_statuses
115 
116  subroutine kim_support_status_get_support_status(index, support_status, &
117  ierr)
118  use, intrinsic :: iso_c_binding
119  import kim_support_status_type
120  implicit none
121  integer(c_int), intent(in), value :: index
122  type(kim_support_status_type), intent(out) :: support_status
123  integer(c_int), intent(out) :: ierr
124  end subroutine kim_support_status_get_support_status
125  end interface
126 end module kim_support_status_module
type(kim_support_status_type), public, protected kim_support_status_optional
type(kim_support_status_type), public, protected kim_support_status_required
type(kim_support_status_type), public, protected kim_support_status_required_by_api
type(kim_support_status_type), public, protected kim_support_status_not_supported