gtool_history_nmlinfo_internal Module Reference

Data Types

interface  listlast
 
interface  listnext
 
interface  listsearch
 

Functions/Subroutines

subroutine hstnmlinfolistnext (gthstnml_list, err)
 
subroutine hstnmlinfolistlast (gthstnml_list, previous, err)
 
subroutine hstnmlinfolistsearch (gthstnml_list, name, previous, next, err)
 

Variables

character(1), parameter, public name_delimiter = ','
 
type(hash), save, public opened_files
 
character(*), parameter, public version = '$Name: $' // '$Id: gtool_history_nmlinfo_internal.f90,v 1.1 2009-05-11 15:15:15 morikawa Exp $'
 

Function/Subroutine Documentation

◆ hstnmlinfolistlast()

subroutine gtool_history_nmlinfo_internal::hstnmlinfolistlast ( type(gthst_nmlinfo_entry), pointer  gthstnml_list,
type(gthst_nmlinfo_entry), optional, pointer  previous,
logical, intent(out), optional  err 
)

Definition at line 129 of file gtool_history_nmlinfo_internal.f90.

References dc_trace::beginsub(), dc_error::dc_noerr, dc_trace::endsub(), dc_error::storeerror(), dc_types::string, and dc_types::token.

129  !
130  ! リスト構造である *gthstnml_list* (GTHST_NMLINFO_ENTRY 型) を受け取り,
131  ! 最後のエントリに再結合して返します.
132  ! *gthstnml_list* が始めから空の場合には空状態を返します.
133  !
134  ! *previous* が与えられる場合, 当該エントリの一つ前の
135  ! エントリに結合します.
136  !
137  ! *gthstnml_list* (type "GTHST_NMLINFO_ENTRY") that is a list structure
138  ! is recieved, and *gthstnml_list* is reassociated to
139  ! last entry, and returned.
140  ! If *gthstnml_list* is null from the beginning, null is returned.
141  !
142  ! If *previous* is given, an entry previous to the above entry
143  ! is associated.
144  !
146  use dc_trace, only: beginsub, endsub
147  use dc_error, only: storeerror, dc_noerr
148  use dc_types, only: token, string
149  implicit none
150  type(gthst_nmlinfo_entry), pointer:: gthstnml_list
151  ! (inout)
152  type(gthst_nmlinfo_entry), pointer, optional:: previous
153  ! (out)
154  logical, intent(out), optional:: err
155  ! 例外処理用フラグ.
156  ! デフォルトでは, この手続き内でエラーが
157  ! 生じた場合, プログラムは強制終了します.
158  ! 引数 *err* が与えられる場合,
159  ! プログラムは強制終了せず, 代わりに
160  ! *err* に .true. が代入されます.
161  !
162  ! Exception handling flag.
163  ! By default, when error occur in
164  ! this procedure, the program aborts.
165  ! If this *err* argument is given,
166  ! .true. is substituted to *err* and
167  ! the program does not abort.
168 
169  !-----------------------------------
170  ! 作業変数
171  ! Work variables
172  integer:: stat
173  character(STRING):: cause_c
174  character(*), parameter:: subname = 'HstNmlInfoListLast'
175  continue
176  call beginsub( subname )
177  stat = dc_noerr
178  cause_c = ''
179 
180  if ( present( previous ) ) nullify( previous )
181 
182  !-----------------------------------------------------------------
183  ! 空状態の場合は何もしないで返す
184  ! If null, return without change
185  !-----------------------------------------------------------------
186  if ( .not. associated( gthstnml_list ) ) goto 999
187 
188  !-----------------------------------------------------------------
189  ! 最後のエントリの *next* に結合して返す
190  ! "*next*" in last entry is associated, and returned
191  !-----------------------------------------------------------------
192  do while ( associated( gthstnml_list % next ) )
193  if ( present( previous ) ) previous => gthstnml_list
194  call listnext( gthstnml_list = gthstnml_list ) ! (inout)
195  end do
196 
197  !-----------------------------------------------------------------
198  ! 終了処理, 例外処理
199  ! Termination and Exception handling
200  !-----------------------------------------------------------------
201 999 continue
202  call storeerror( stat, subname, err, cause_c )
203  call endsub( subname )
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ hstnmlinfolistnext()

subroutine gtool_history_nmlinfo_internal::hstnmlinfolistnext ( type(gthst_nmlinfo_entry), pointer  gthstnml_list,
logical, intent(out), optional  err 
)
private

Definition at line 59 of file gtool_history_nmlinfo_internal.f90.

References dc_trace::beginsub(), dc_error::dc_noerr, dc_trace::endsub(), dc_error::storeerror(), dc_types::string, and dc_types::token.

59  !
60  ! リスト構造である *gthstnml_list* (GTHST_NMLINFO_ENTRY 型) を受け取り,
61  ! 次のエントリを *gthstnml_list* に再結合して返します.
62  ! 次のエントリが無い場合, *gthstnml_list* の最後のエントリの
63  ! *next* (空状態) に接続して返します.
64  ! *gthstnml_list* が始めから空の場合には空状態を返します.
65  !
66  ! *gthstnml_list* (type "GTHST_NMLINFO_ENTRY") that is a list structure
67  ! is recieved, and *gthstnml_list* is reassociated to next entry, and
68  ! is returned.
69  ! If next entry is not found, *gthstnml_list* is associated to
70  ! *next* in last entry (null), and returned.
71  ! If *gthstnml_list* is null from the beginning, null is returned.
72  !
74  use dc_trace, only: beginsub, endsub
75  use dc_error, only: storeerror, dc_noerr
76  use dc_types, only: token, string
77  implicit none
78  type(gthst_nmlinfo_entry), pointer:: gthstnml_list
79  ! (inout)
80  logical, intent(out), optional:: err
81  ! 例外処理用フラグ.
82  ! デフォルトでは, この手続き内でエラーが
83  ! 生じた場合, プログラムは強制終了します.
84  ! 引数 *err* が与えられる場合,
85  ! プログラムは強制終了せず, 代わりに
86  ! *err* に .true. が代入されます.
87  !
88  ! Exception handling flag.
89  ! By default, when error occur in
90  ! this procedure, the program aborts.
91  ! If this *err* argument is given,
92  ! .true. is substituted to *err* and
93  ! the program does not abort.
94 
95  !-----------------------------------
96  ! 作業変数
97  ! Work variables
98  integer:: stat
99  character(STRING):: cause_c
100  character(*), parameter:: subname = 'HstNmlInfoListNext'
101  continue
102  call beginsub( subname )
103  stat = dc_noerr
104  cause_c = ''
105 
106  !-----------------------------------------------------------------
107  ! 空状態の場合は何もしないで返す
108  ! If null, return without change
109  !-----------------------------------------------------------------
110  if ( .not. associated( gthstnml_list ) ) goto 999
111 
112  !-----------------------------------------------------------------
113  ! 次のエントリに結合して返す
114  ! Next entry is associated, and returned
115  !-----------------------------------------------------------------
116  gthstnml_list => gthstnml_list % next
117 
118  !-----------------------------------------------------------------
119  ! 終了処理, 例外処理
120  ! Termination and Exception handling
121  !-----------------------------------------------------------------
122 999 continue
123  call storeerror( stat, subname, err, cause_c )
124  call endsub( subname )
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ hstnmlinfolistsearch()

subroutine gtool_history_nmlinfo_internal::hstnmlinfolistsearch ( type(gthst_nmlinfo_entry), pointer  gthstnml_list,
character(*), intent(in)  name,
type(gthst_nmlinfo_entry), optional, pointer  previous,
type(gthst_nmlinfo_entry), optional, pointer  next,
logical, intent(out), optional  err 
)

Definition at line 209 of file gtool_history_nmlinfo_internal.f90.

References dc_trace::beginsub(), dc_error::dc_noerr, dc_trace::endsub(), dc_error::storeerror(), dc_types::string, and dc_types::token.

209  !
210  ! リスト構造である *gthstnml_list* (GTHST_NMLINFO_ENTRY 型) を受け取り,
211  ! 引数 *name* と同じ値を持つエントリに再結合して返します.
212  ! 見つからない場合は空状態を返します.
213  ! *gthstnml_list* が始めから空の場合には空状態を返します.
214  !
215  ! *previous* が与えられる場合, 当該エントリの一つ前の
216  ! エントリに結合します. 前のエントリが無い場合には
217  ! 空状態を返します.
218  !
219  ! *next* が与えられる場合, 当該エントリの一つ後ろの
220  ! エントリに結合します. 後ろのエントリが無い場合には
221  ! 空状態を返します.
222  !
223  ! *gthstnml_list* (type "GTHST_NMLINFO_ENTRY") that is a list structure
224  ! is recieved, and *gthstnml_list* is reassociated to
225  ! the entry that has a value that is same as argument *name*,
226  ! and returned.
227  ! If the entry is not found, null is returned.
228  ! If *gthstnml_list* is null from the beginning, null is returned.
229  !
230  ! If *previous* is given, an entry previous to the above entry
231  ! is associated. If previous entries are not found,
232  ! null is returned.
233  !
234  ! If *next* is given, an entry next to the above entry
235  ! is associated. If next entries are not found,
236  ! null is returned.
237  !
239  use dc_trace, only: beginsub, endsub
240  use dc_error, only: storeerror, dc_noerr
241  use dc_types, only: token, string
242  implicit none
243  type(gthst_nmlinfo_entry), pointer:: gthstnml_list
244  ! (inout)
245  character(*), intent(in):: name
246  ! 変数名.
247  ! 先頭の空白は無視されます.
248  !
249  ! Variable identifier.
250  ! Blanks at the head of the name are ignored.
251  type(gthst_nmlinfo_entry), pointer, optional:: previous
252  ! (out)
253  type(gthst_nmlinfo_entry), pointer, optional:: next
254  ! (out)
255  logical, intent(out), optional:: err
256  ! 例外処理用フラグ.
257  ! デフォルトでは, この手続き内でエラーが
258  ! 生じた場合, プログラムは強制終了します.
259  ! 引数 *err* が与えられる場合,
260  ! プログラムは強制終了せず, 代わりに
261  ! *err* に .true. が代入されます.
262  !
263  ! Exception handling flag.
264  ! By default, when error occur in
265  ! this procedure, the program aborts.
266  ! If this *err* argument is given,
267  ! .true. is substituted to *err* and
268  ! the program does not abort.
269 
270  !-----------------------------------
271  ! 作業変数
272  ! Work variables
273  integer:: stat
274  character(STRING):: cause_c
275  character(*), parameter:: subname = 'HstNmlInfoListSearch'
276  continue
277  call beginsub( subname )
278  stat = dc_noerr
279  cause_c = ''
280 
281  !-----------------------------------------------------------------
282  ! 空状態の場合は何もしないで返す
283  ! If null, return without change
284  !-----------------------------------------------------------------
285  if ( .not. associated( gthstnml_list ) ) goto 999
286 
287  !-----------------------------------------------------------------
288  ! 引数 *name* と同じ *name* を持つエントリを探査
289  ! The entry that has *name* that is same as argument *name* is searched
290  !-----------------------------------------------------------------
291  if ( present( previous ) ) nullify( previous )
292  if ( present( next ) ) nullify( next )
293  if ( trim( adjustl( gthstnml_list % name ) ) == trim( adjustl( name ) ) ) then
294  if ( present( next ) ) then
295  next => gthstnml_list % next
296  end if
297  goto 999
298  end if
299 
300  do while ( associated( gthstnml_list ) )
301  if ( present( previous ) ) previous => gthstnml_list
302  call listnext( gthstnml_list = gthstnml_list ) ! (inout)
303  if ( .not. associated( gthstnml_list ) ) goto 999
304  if ( trim( adjustl( gthstnml_list % name ) ) == trim( adjustl( name ) ) ) then
305  if ( present( next ) ) then
306  next => gthstnml_list % next
307  end if
308  goto 999
309  end if
310  end do
311 
312  !-----------------------------------------------------------------
313  ! 終了処理, 例外処理
314  ! Termination and Exception handling
315  !-----------------------------------------------------------------
316 999 continue
317  call storeerror( stat, subname, err, cause_c )
318  call endsub( subname )
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

Variable Documentation

◆ name_delimiter

character(1), parameter, public gtool_history_nmlinfo_internal::name_delimiter = ','

◆ opened_files

type(hash), save, public gtool_history_nmlinfo_internal::opened_files

Definition at line 27 of file gtool_history_nmlinfo_internal.f90.

Referenced by hstnmlinfoenddefine().

27  type(hash), save, public:: opened_files

◆ version

character(*), parameter, public gtool_history_nmlinfo_internal::version = '$Name: $' // '$Id: gtool_history_nmlinfo_internal.f90,v 1.1 2009-05-11 15:15:15 morikawa Exp $'

Definition at line 34 of file gtool_history_nmlinfo_internal.f90.

Referenced by hstnmlinfocreate().

34  character(*), parameter, public:: version = &
35  & '$Name: $' // &
36  & '$Id: gtool_history_nmlinfo_internal.f90,v 1.1 2009-05-11 15:15:15 morikawa Exp $'