KIM API V2
kim_log_verbosity_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_log_verbosity_type, &
41  kim_log_verbosity_from_string, &
42  operator (.lt.), &
43  operator (.gt.), &
44  operator (.le.), &
45  operator (.ge.), &
46  operator (.eq.), &
47  operator (.ne.), &
48  kim_log_verbosity_string, &
49 
56 
57  kim_log_verbosity_get_number_of_log_verbosities, &
58  kim_log_verbosity_get_log_verbosity, &
59 
60  kim_log_file, &
62 
63 
64  type, bind(c) :: kim_log_verbosity_type
65  integer(c_int) :: log_verbosity_id
66  end type kim_log_verbosity_type
67 
68  type(kim_log_verbosity_type), protected, &
69  bind(c, name="KIM_LOG_VERBOSITY_silent") &
71  type(kim_log_verbosity_type), protected, &
72  bind(c, name="KIM_LOG_VERBOSITY_fatal") &
74  type(kim_log_verbosity_type), protected, &
75  bind(c, name="KIM_LOG_VERBOSITY_error") &
77  type(kim_log_verbosity_type), protected, &
78  bind(c, name="KIM_LOG_VERBOSITY_warning") &
80  type(kim_log_verbosity_type), protected, &
81  bind(c, name="KIM_LOG_VERBOSITY_information") &
83  type(kim_log_verbosity_type), protected, &
84  bind(c, name="KIM_LOG_VERBOSITY_debug") &
86 
87  interface operator (.lt.)
88  logical function kim_log_verbosity_less_than(left, right)
89  use, intrinsic :: iso_c_binding
90  import kim_log_verbosity_type
91  implicit none
92  type(kim_log_verbosity_type), intent(in) :: left
93  type(kim_log_verbosity_type), intent(in) :: right
94  end function kim_log_verbosity_less_than
95  end interface operator (.lt.)
96 
97  interface operator (.gt.)
98  logical function kim_log_verbosity_greater_than(left, right)
99  use, intrinsic :: iso_c_binding
100  import kim_log_verbosity_type
101  implicit none
102  type(kim_log_verbosity_type), intent(in) :: left
103  type(kim_log_verbosity_type), intent(in) :: right
104  end function kim_log_verbosity_greater_than
105  end interface operator (.gt.)
106 
107  interface operator (.le.)
108  logical function kim_log_verbosity_less_than_equal(left, right)
109  use, intrinsic :: iso_c_binding
110  import kim_log_verbosity_type
111  implicit none
112  type(kim_log_verbosity_type), intent(in) :: left
113  type(kim_log_verbosity_type), intent(in) :: right
114  end function kim_log_verbosity_less_than_equal
115  end interface operator (.le.)
116 
117  interface operator (.ge.)
118  logical function kim_log_verbosity_greater_than_equal(left, right)
119  use, intrinsic :: iso_c_binding
120  import kim_log_verbosity_type
121  implicit none
122  type(kim_log_verbosity_type), intent(in) :: left
123  type(kim_log_verbosity_type), intent(in) :: right
124  end function kim_log_verbosity_greater_than_equal
125  end interface operator (.ge.)
126 
127  interface operator (.eq.)
128  logical function kim_log_verbosity_equal(left, right)
129  use, intrinsic :: iso_c_binding
130  import kim_log_verbosity_type
131  implicit none
132  type(kim_log_verbosity_type), intent(in) :: left
133  type(kim_log_verbosity_type), intent(in) :: right
134  end function kim_log_verbosity_equal
135  end interface operator (.eq.)
136 
137  interface operator (.ne.)
138  logical function kim_log_verbosity_not_equal(left, right)
139  use, intrinsic :: iso_c_binding
140  import kim_log_verbosity_type
141  implicit none
142  type(kim_log_verbosity_type), intent(in) :: left
143  type(kim_log_verbosity_type), intent(in) :: right
144  end function kim_log_verbosity_not_equal
145  end interface operator (.ne.)
146 
147  interface
148  subroutine kim_log_verbosity_from_string(string, log_verbosity)
149  use, intrinsic :: iso_c_binding
150  import kim_log_verbosity_type
151  implicit none
152  character(len=*, kind=c_char), intent(in) :: string
153  type(kim_log_verbosity_type), intent(out) :: log_verbosity
154  end subroutine kim_log_verbosity_from_string
155 
156  subroutine kim_log_verbosity_string(log_verbosity, string)
157  use, intrinsic :: iso_c_binding
158  import kim_log_verbosity_type
159  implicit none
160  type(kim_log_verbosity_type), intent(in), value :: log_verbosity
161  character(len=*, kind=c_char), intent(out) :: string
162  end subroutine kim_log_verbosity_string
163 
164  subroutine kim_log_verbosity_get_number_of_log_verbosities( &
165  number_of_log_verbosities)
166  use, intrinsic :: iso_c_binding
167  implicit none
168  integer(c_int), intent(out) :: number_of_log_verbosities
169  end subroutine kim_log_verbosity_get_number_of_log_verbosities
170 
171  subroutine kim_log_verbosity_get_log_verbosity(index, log_verbosity, ierr)
172  use, intrinsic :: iso_c_binding
173  import kim_log_verbosity_type
174  implicit none
175  integer(c_int), intent(in), value :: index
176  type(kim_log_verbosity_type), intent(out) :: log_verbosity
177  integer(c_int), intent(out) :: ierr
178  end subroutine kim_log_verbosity_get_log_verbosity
179  end interface
180 
181  character(len=4096, kind=c_char) :: kim_log_file
182  character(len=65536, kind=c_char) :: kim_log_message
183 end module kim_log_verbosity_module
type(kim_log_verbosity_type), public, protected kim_log_verbosity_information
type(kim_log_verbosity_type), public, protected kim_log_verbosity_debug
type(kim_log_verbosity_type), public, protected kim_log_verbosity_warning
type(kim_log_verbosity_type), public, protected kim_log_verbosity_error
character(len=65536, kind=c_char), public kim_log_message
type(kim_log_verbosity_type), public, protected kim_log_verbosity_silent
type(kim_log_verbosity_type), public, protected kim_log_verbosity_fatal
character(len=4096, kind=c_char), public kim_log_file