!= GT_HISTORY_AXIS 螟画焚縺ｸ縺ｮ蝠上＞蜷医ｏ縺�
!= Inquire for a GT_HISTORY_AXIS variable
!
! Authors::   Yasuhiro MORIKAWA
! Version::   $Id: historyaxisinquire.f90,v 1.2 2009-05-25 09:45:20 morikawa Exp $
! Tag Name::  $Name:  $
! Copyright:: Copyright (C) GFD Dennou Club, 2000-2009. All rights reserved.
! License::   See COPYRIGHT[link:../../../COPYRIGHT]
!
  subroutine HistoryAxisInquire1( axis, &
    & name, size, longname, units, xtype )
    !
    !== GT_HISTORY_AXIS 蝙句､画焚縺ｸ縺ｮ蝠上＞蜷医ｏ縺�
    !
    ! GT_HISTORY_AXIS 蝙九�螟画焚蜀��蜷�ュ蝣ｱ繧貞盾辣ｧ縺励∪縺吶�
    !
    use dc_types, only: STRING, TOKEN, DP
    use dc_trace, only: BeginSub, EndSub, DbgMessage
    use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR
    use gtool_history_internal, only: default
    implicit none
    type(GT_HISTORY_AXIS),intent(in) :: axis
    character(*) , intent(out), optional:: name     ! 谺｡蜈�､画焚蜷�
    integer, intent(out), optional:: size     ! 谺｡蜈�聞 (驟榊�繧ｵ繧､繧ｺ)
    character(*) , intent(out), optional:: longname ! 谺｡蜈�､画焚縺ｮ險倩ｿｰ逧�錐遘ｰ
    character(*) , intent(out), optional:: units    ! 谺｡蜈�､画焚縺ｮ蜊倅ｽ�
    character(*) , intent(out), optional:: xtype    ! 谺｡蜈�､画焚縺ｮ蝙�
    character(len = *), parameter:: subname = "HistoryAxisInquire1"
  continue
    call BeginSub(subname)
    if (present(name)) then
      name     = axis % name
    end if
    if (present(size)) then
      size     = axis % length
    end if
    if (present(longname)) then
      longname = axis % longname
    end if
    if (present(units)) then
      units    = axis % units
    end if
    if (present(xtype)) then
      xtype    = axis % xtype
    end if
    call EndSub(subname)
  end subroutine HistoryAxisInquire1

  !-------------------------------------------------------------------

  subroutine HistoryAxisInquire2( axis, &
    & name, size, longname, units, xtype)
    !
    ! 菴ｿ逕ｨ譁ｹ豕輔� HistoryAxisInquire 縺ｨ蜷梧ｧ倥〒縺�.
    !
    ! Usage is same as "HistoryAxisInquire".
    !
    !--
    ! 邱冗ｧｰ蜷� Inquire 縺ｨ縺励※謠蝉ｾ帙☆繧九◆繧√�繧ｵ繝悶Ν繝ｼ繝√Φ縺ｧ縺�.
    ! 讖溯�縺ｯ HistoryAxisInquire1 縺ｨ蜷後§縺ｧ縺�.
    !++
    !
    use dc_trace, only: BeginSub, EndSub, DbgMessage
    use gtool_history_types, only: GT_HISTORY, GT_HISTORY_AXIS, GT_HISTORY_VARINFO, GT_HISTORY_ATTR
    use gtool_history_generic, only: HistoryAxisInquire
    implicit none
    type(GT_HISTORY_AXIS),intent(in) :: axis
    character(*) , intent(out), optional:: name     ! 谺｡蜈�､画焚蜷�
    integer, intent(out), optional:: size     ! 谺｡蜈�聞 (驟榊�繧ｵ繧､繧ｺ)
    character(*) , intent(out), optional:: longname ! 谺｡蜈�､画焚縺ｮ險倩ｿｰ逧�錐遘ｰ
    character(*) , intent(out), optional:: units    ! 谺｡蜈�､画焚縺ｮ蜊倅ｽ�
    character(*) , intent(out), optional:: xtype    ! 谺｡蜈�､画焚縺ｮ蝙�
    character(len = *), parameter:: subname = "HistoryAxisInquire2"
  continue
    call BeginSub(subname)
    call HistoryAxisInquire( axis, &
      & name, size, longname, units, xtype)
    call EndSub(subname)
  end subroutine HistoryAxisInquire2