LCOV - code coverage report
Current view: top level - src/input - cp_parser_status_types.F (source / functions) Hit Total Coverage
Test: CP2K Regtests (git:ccc2433) Lines: 10 11 90.9 %
Date: 2024-04-25 07:09:54 Functions: 2 3 66.7 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------------------------!
       2             : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3             : !   Copyright 2000-2024 CP2K developers group <https://cp2k.org>                                   !
       4             : !                                                                                                  !
       5             : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6             : !--------------------------------------------------------------------------------------------------!
       7             : 
       8             : ! **************************************************************************************************
       9             : !> \brief a module to allow the storage of the parser status
      10             : !> \author Teodoro Laino [tlaino] - University of Zurich
      11             : !> \date 08.2008
      12             : ! **************************************************************************************************
      13             : MODULE cp_parser_status_types
      14             :    USE cp_parser_buffer_types,          ONLY: buffer_type,&
      15             :                                               create_buffer_type,&
      16             :                                               release_buffer_type
      17             :    USE kinds,                           ONLY: max_line_length
      18             : #include "../base/base_uses.f90"
      19             : 
      20             :    IMPLICIT NONE
      21             :    PRIVATE
      22             : 
      23             :    TYPE status_type
      24             :       LOGICAL                                        :: in_use = .FALSE.
      25             :       INTEGER                                        :: old_input_line_number = HUGE(0)
      26             :       INTEGER                                        :: old_icol = HUGE(0)
      27             :       INTEGER                                        :: old_icol1 = HUGE(0)
      28             :       INTEGER                                        :: old_icol2 = HUGE(0)
      29             :       CHARACTER(LEN=max_line_length)                 :: old_input_line = ""
      30             :       ! Store status of the buffer
      31             :       TYPE(buffer_type), POINTER                     :: buffer => NULL()
      32             :    END TYPE status_type
      33             : 
      34             :    PUBLIC :: status_type, create_status_type, release_status_type
      35             :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'cp_parser_status_types'
      36             : 
      37             : CONTAINS
      38             : 
      39             : ! ****************************************************************************
      40             : !> \brief creates the parser status type
      41             : !> \param status ...
      42             : !> \date  08.2008
      43             : !> \author Teodoro Laino [tlaino] - University of Zurich
      44             : ! **************************************************************************************************
      45       51023 :    SUBROUTINE create_status_type(status)
      46             :       TYPE(status_type), POINTER                         :: status
      47             : 
      48       51023 :       CPASSERT(.NOT. ASSOCIATED(status))
      49       51023 :       ALLOCATE (status)
      50       51023 :       CALL create_buffer_type(status%buffer)
      51       51023 :    END SUBROUTINE create_status_type
      52             : 
      53             : ! ****************************************************************************
      54             : !> \brief releases the parser status type
      55             : !> \param status ...
      56             : !> \date  08.2008
      57             : !> \author Teodoro Laino [tlaino] - University of Zurich
      58             : ! **************************************************************************************************
      59       51023 :    SUBROUTINE release_status_type(status)
      60             :       TYPE(status_type), POINTER                         :: status
      61             : 
      62       51023 :       CPASSERT(ASSOCIATED(status))
      63       51023 :       CALL release_buffer_type(status%buffer)
      64       51023 :       DEALLOCATE (status)
      65       51023 :    END SUBROUTINE release_status_type
      66             : 
      67           0 : END MODULE cp_parser_status_types

Generated by: LCOV version 1.15