! Copyright (C) GFD Dennou Club, 2000.  All rights reserved.

subroutine GTLineLoad(Line, var)
    use gtgraph_types, only: GT_Line
    use gtgraph_generic, only: Load
    use gtdata_types, only: GT_VARIABLE
    use gtdata_generic
    use dc_error
    type(GT_Line), intent(out):: Line
    type(GT_VARIABLE), intent(in):: var
    type(VSTRING):: varname
    ! リンク名が data であることを仮定
    call get_attr(var, "gt_structure_link_data", varname)
    call Open(line%var, varname)
    allocate(line%h_axis, line%v_axis)
    call get_attr(var, "gt_structure_link_haxis", varname)
    call Load(line%h_axis, varname)
    call get_attr(var, "gt_structure_link_vaxis", varname)
    call Load(line%v_axis, varname)
    ! オプションの初期化
    call get_attr(var, 'gt_line_index', line%index, default=0)
    call get_attr(var, 'gt_line_type', line%type, default=0)
    call get_attr(var, 'gt_line_mark', line%mark, default=0)
end subroutine

