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-alpha.0 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_file, &
59 
60  type, bind(c) :: kim_log_verbosity_type
61  integer(c_int) :: log_verbosity_id
62  end type kim_log_verbosity_type
63 
64  type(kim_log_verbosity_type), protected, &
65  bind(c, name="KIM_LOG_VERBOSITY_silent") &
67  type(kim_log_verbosity_type), protected, &
68  bind(c, name="KIM_LOG_VERBOSITY_fatal") &
70  type(kim_log_verbosity_type), protected, &
71  bind(c, name="KIM_LOG_VERBOSITY_error") &
73  type(kim_log_verbosity_type), protected, &
74  bind(c, name="KIM_LOG_VERBOSITY_warning") &
76  type(kim_log_verbosity_type), protected, &
77  bind(c, name="KIM_LOG_VERBOSITY_information") &
79  type(kim_log_verbosity_type), protected, &
80  bind(c, name="KIM_LOG_VERBOSITY_debug") &
82 
83  interface operator (.lt.)
84  logical function kim_log_verbosity_less_than(left, right)
85  use, intrinsic :: iso_c_binding
86  import kim_log_verbosity_type
87  implicit none
88  type(kim_log_verbosity_type), intent(in) :: left
89  type(kim_log_verbosity_type), intent(in) :: right
90  end function kim_log_verbosity_less_than
91  end interface operator (.lt.)
92 
93  interface operator (.gt.)
94  logical function kim_log_verbosity_greater_than(left, right)
95  use, intrinsic :: iso_c_binding
96  import kim_log_verbosity_type
97  implicit none
98  type(kim_log_verbosity_type), intent(in) :: left
99  type(kim_log_verbosity_type), intent(in) :: right
100  end function kim_log_verbosity_greater_than
101  end interface operator (.gt.)
102 
103  interface operator (.le.)
104  logical function kim_log_verbosity_less_than_equal(left, right)
105  use, intrinsic :: iso_c_binding
106  import kim_log_verbosity_type
107  implicit none
108  type(kim_log_verbosity_type), intent(in) :: left
109  type(kim_log_verbosity_type), intent(in) :: right
110  end function kim_log_verbosity_less_than_equal
111  end interface operator (.le.)
112 
113  interface operator (.ge.)
114  logical function kim_log_verbosity_greater_than_equal(left, right)
115  use, intrinsic :: iso_c_binding
116  import kim_log_verbosity_type
117  implicit none
118  type(kim_log_verbosity_type), intent(in) :: left
119  type(kim_log_verbosity_type), intent(in) :: right
120  end function kim_log_verbosity_greater_than_equal
121  end interface operator (.ge.)
122 
123  interface operator (.eq.)
124  logical function kim_log_verbosity_equal(left, right)
125  use, intrinsic :: iso_c_binding
126  import kim_log_verbosity_type
127  implicit none
128  type(kim_log_verbosity_type), intent(in) :: left
129  type(kim_log_verbosity_type), intent(in) :: right
130  end function kim_log_verbosity_equal
131  end interface operator (.eq.)
132 
133  interface operator (.ne.)
134  logical function kim_log_verbosity_not_equal(left, right)
135  use, intrinsic :: iso_c_binding
136  import kim_log_verbosity_type
137  implicit none
138  type(kim_log_verbosity_type), intent(in) :: left
139  type(kim_log_verbosity_type), intent(in) :: right
140  end function kim_log_verbosity_not_equal
141  end interface operator (.ne.)
142 
143  interface
144  subroutine kim_log_verbosity_from_string(string, log_verbosity)
145  import kim_log_verbosity_type
146  implicit none
147  character(len=*), intent(in) :: string
148  type(kim_log_verbosity_type), intent(out) :: log_verbosity
149  end subroutine kim_log_verbosity_from_string
150 
151  subroutine kim_log_verbosity_string(log_verbosity, string)
152  import kim_log_verbosity_type
153  implicit none
154  type(kim_log_verbosity_type), intent(in), value :: log_verbosity
155  character(len=*), intent(out) :: string
156  end subroutine kim_log_verbosity_string
157  end interface
158 
159  character(len=4096) :: kim_log_file
160  character(len=65536) :: kim_log_message
161 end module kim_log_verbosity_module
type(kim_log_verbosity_type), public, protected kim_log_verbosity_information
character(len=4096), public kim_log_file
character(len=65536), public kim_log_message
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
type(kim_log_verbosity_type), public, protected kim_log_verbosity_silent
type(kim_log_verbosity_type), public, protected kim_log_verbosity_fatal