! Module  : stat_m
! Purpose : status value definitions
!
! Copyright 2021-2022 Rich Townsend & The MSG Team
!
! This file is part of MSG. MSG is free software: you can redistribute
! it and/or modify it under the terms of the GNU General Public
! License as published by the Free Software Foundation, version 3.
!
! MSG is distributed in the hope that it will be useful, but WITHOUT
! ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
! or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
! License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program.  If not, see <http://www.gnu.org/licenses/>.

#:include 'forum.inc'

module stat_m

   ! Uses

   use forum_m

   ! No implicit typing

   implicit none

   ! Parameter definitions

   enum, bind(C)
      enumerator :: STAT_OK
      enumerator :: STAT_OUT_OF_BOUNDS_RANGE_LO
      enumerator :: STAT_OUT_OF_BOUNDS_RANGE_HI
      enumerator :: STAT_OUT_OF_BOUNDS_AXIS_LO
      enumerator :: STAT_OUT_OF_BOUNDS_AXIS_HI
      enumerator :: STAT_OUT_OF_BOUNDS_LAM_LO
      enumerator :: STAT_OUT_OF_BOUNDS_LAM_HI
      enumerator :: STAT_OUT_OF_BOUNDS_MU_LO
      enumerator :: STAT_OUT_OF_BOUNDS_MU_HI
      enumerator :: STAT_UNAVAILABLE_DATA
      enumerator :: STAT_INVALID_ARGUMENT
      enumerator :: STAT_FILE_NOT_FOUND
      enumerator :: STAT_INVALID_FILE_TYPE
      enumerator :: STAT_INVALID_GROUP_TYPE
      enumerator :: STAT_INVALID_GROUP_REVISION
   end enum

   ! Access specifiers

   private

   public :: STAT_OK
   public :: STAT_OUT_OF_BOUNDS_RANGE_LO
   public :: STAT_OUT_OF_BOUNDS_RANGE_HI
   public :: STAT_OUT_OF_BOUNDS_AXIS_LO
   public :: STAT_OUT_OF_BOUNDS_AXIS_HI
   public :: STAT_OUT_OF_BOUNDS_LAM_LO
   public :: STAT_OUT_OF_BOUNDS_LAM_HI
   public :: STAT_OUT_OF_BOUNDS_MU_LO
   public :: STAT_OUT_OF_BOUNDS_MU_HI
   public :: STAT_UNAVAILABLE_DATA
   public :: STAT_INVALID_ARGUMENT
   public :: STAT_FILE_NOT_FOUND
   public :: STAT_INVALID_FILE_TYPE
   public :: STAT_INVALID_GROUP_TYPE
   public :: STAT_INVALID_GROUP_REVISION

end module stat_m
