Open giacrossi opened 7 years ago
Add group inheritance prevent duplicating CLAs: for example now we have to do
call cli%add_group(group='reconstruct', description='perform WENO reconstruction') call cli%add(group='reconstruct', switch='--interpolator', switch_ab='-i', help='WENO interpolator type', required=.false., & def='JS', act='store', choices='all,JS,M-JS,M-Z,Z') call cli%add_group(group='interpolate', description='perform WENO interpolation') call cli%add(group= 'interpolate', switch='--interpolator', switch_ab='-i', help='WENO interpolator type', required=.false., & def='JS', act='store', choices='all,JS,M-JS,M-Z,Z') call cli%add(group='interpolate', switch='--x_target', switch_ab='-x', help='WENO interpolation target point coordinate', & required=.true., def='0', act='store')
but with group inheritance, the syntax could be less repetitive, as:
call cli%add_group(group='reconstruct', description='perform WENO reconstruction') call cli%add(group='reconstruct', switch='--interpolator', switch_ab='-i', help='WENO interpolator type', required=.false., & def='JS', act='store', choices='all,JS,M-JS,M-Z,Z') call cli%add_group(group='interpolate', description='perform WENO interpolation', inherit_group='reconstruct') call cli%add(group='interpolate', switch='--x_target', switch_ab='-x', help='WENO interpolation target point coordinate', & required=.true., def='0', act='store')
Add group inheritance prevent duplicating CLAs: for example now we have to do
but with group inheritance, the syntax could be less repetitive, as: