21 class(
field_t),
intent(in),
target :: f
25 len =
size(this%fields)
28 tmp(1:len) = this%fields
29 call move_alloc(tmp, this%fields)
30 this%fields(len+1)%f => f
37 integer :: i, n_fields
39 if (
allocated(this%fields))
then
40 n_fields =
size(this%fields)
42 call this%fields(i)%f%free()
43 nullify(this%fields(i)%f)
45 deallocate(this%fields)
subroutine field_list_free(this)
Destructor.
subroutine field_list_append(this, f)
Append a field to the list.
field_ptr_t, To easily obtain a pointer to a field
field_list_t, To be able to group fields together