18 #include "../base/base_uses.f90"
26 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
29 PUBLIC :: molecule_kind_list_type, molecule_kind_list_p_type, &
45 TYPE molecule_kind_list_type
46 INTEGER :: ref_count = 0, n_els = 0
47 LOGICAL :: owns_els = .false.
48 TYPE(molecule_kind_type),
DIMENSION(:),
POINTER :: els => null()
49 END TYPE molecule_kind_list_type
58 TYPE molecule_kind_list_p_type
59 TYPE(molecule_kind_list_type),
POINTER :: list => null()
60 END TYPE molecule_kind_list_p_type
79 TYPE(molecule_kind_list_type),
POINTER,
OPTIONAL ::
list
80 TYPE(molecule_kind_type),
DIMENSION(:),
POINTER,
OPTIONAL :: els_ptr
81 LOGICAL,
INTENT(in),
OPTIONAL :: owns_els
82 INTEGER,
INTENT(in),
OPTIONAL :: n_els
84 cpassert(
PRESENT(els_ptr) .OR.
PRESENT(n_els))
88 list%owns_els = .true.
90 IF (
PRESENT(owns_els))
list%owns_els = owns_els
92 IF (
PRESENT(els_ptr))
THEN
94 IF (
ASSOCIATED(els_ptr))
THEN
95 list%n_els =
SIZE(els_ptr)
98 IF (
PRESENT(n_els))
list%n_els = n_els
99 IF (.NOT.
ASSOCIATED(
list%els))
THEN
101 cpassert(
list%owns_els)
113 TYPE(molecule_kind_list_type),
POINTER ::
list
115 cpassert(
ASSOCIATED(
list))
116 cpassert(
list%ref_count > 0)
128 TYPE(molecule_kind_list_type),
POINTER ::
list
130 IF (
ASSOCIATED(
list))
THEN
131 cpassert(
list%ref_count > 0)
133 IF (
list%ref_count == 0)
THEN
134 IF (
list%owns_els)
THEN
135 IF (
ASSOCIATED(
list%els))
THEN
An array-based list which grows on demand. When the internal array is full, a new array of twice the ...
represent a simple array based list of the given type
subroutine, public molecule_kind_list_create(list, els_ptr, owns_els, n_els)
creates a list
subroutine, public molecule_kind_list_release(list)
releases a list (see doc/ReferenceCounting.html)
subroutine, public molecule_kind_list_retain(list)
retains a list (see doc/ReferenceCounting.html)
Define the molecule kind structure types and the corresponding functionality.
subroutine, public deallocate_molecule_kind_set(molecule_kind_set)
Deallocate a molecule kind set.