35 use,
intrinsic :: iso_c_binding
40 kim_log_handle_type, &
48 kim_log_push_verbosity, &
52 type, bind(c) :: kim_log_handle_type
53 type(c_ptr) :: p = c_null_ptr
54 end type kim_log_handle_type
56 type(kim_log_handle_type),
protected, &
57 bind(c,name=
"KIM_LOG_null_handle") &
60 interface operator (.eq.)
61 logical function kim_log_handle_equal(left, right)
62 use,
intrinsic :: iso_c_binding
63 import kim_log_handle_type
65 type(kim_log_handle_type),
intent(in) :: left
66 type(kim_log_handle_type),
intent(in) :: right
67 end function kim_log_handle_equal
68 end interface operator (.eq.)
70 interface operator (.ne.)
71 logical function kim_log_handle_not_equal(left, right)
72 use,
intrinsic :: iso_c_binding
73 import kim_log_handle_type
75 type(kim_log_handle_type),
intent(in) :: left
76 type(kim_log_handle_type),
intent(in) :: right
77 end function kim_log_handle_not_equal
78 end interface operator (.ne.)
81 subroutine kim_log_create(log_handle, ierr)
82 use,
intrinsic :: iso_c_binding
83 import kim_log_handle_type
85 type(kim_log_handle_type),
intent(out) :: log_handle
86 integer(c_int),
intent(out) :: ierr
87 end subroutine kim_log_create
89 subroutine kim_log_destroy(log_handle)
90 use,
intrinsic :: iso_c_binding
91 import kim_log_handle_type
93 type(kim_log_handle_type),
intent(inout) :: log_handle
94 end subroutine kim_log_destroy
96 subroutine kim_log_get_id(log_handle, id_string)
97 use,
intrinsic :: iso_c_binding
98 import kim_log_handle_type
100 type(kim_log_handle_type),
intent(in) :: log_handle
101 character(len=*),
intent(out) :: id_string
102 end subroutine kim_log_get_id
104 subroutine kim_log_set_id(log_handle, id_string)
105 use,
intrinsic :: iso_c_binding
106 import kim_log_handle_type
108 type(kim_log_handle_type),
intent(in) :: log_handle
109 character(len=*),
intent(in) :: id_string
110 end subroutine kim_log_set_id
112 subroutine kim_log_push_verbosity(log_handle, log_verbosity)
113 use,
intrinsic :: iso_c_binding
115 import kim_log_handle_type
117 type(kim_log_handle_type),
intent(in) :: log_handle
118 type(kim_log_verbosity_type),
intent(in),
value :: log_verbosity
119 end subroutine kim_log_push_verbosity
122 use,
intrinsic :: iso_c_binding
123 import kim_log_handle_type
125 type(kim_log_handle_type),
intent(in) :: log_handle
128 subroutine kim_log_log_entry(log_handle, log_verbosity, message, &
129 line_number, file_name)
130 use,
intrinsic :: iso_c_binding
132 import kim_log_handle_type
134 type(kim_log_handle_type),
intent(in) :: log_handle
135 type(kim_log_verbosity_type),
intent(in),
value :: log_verbosity
136 character(len=*),
intent(in) :: message
137 integer(c_int),
intent(in),
value :: line_number
138 character(len=*),
intent(in) :: file_name
139 end subroutine kim_log_log_entry
type(kim_log_handle_type), public, protected kim_log_null_handle