|
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> |
| 2 | +<class name="ArgumentParser" inherits="Object" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/godotengine/godot/master/doc/class.xsd"> |
| 3 | + <brief_description> |
| 4 | + OpenVic commandline argument parser. |
| 5 | + </brief_description> |
| 6 | + <description> |
| 7 | + </description> |
| 8 | + <tutorials> |
| 9 | + </tutorials> |
| 10 | + <methods> |
| 11 | + <method name="get_help" qualifiers="const"> |
| 12 | + <return type="String" /> |
| 13 | + <param index="0" name="is_rich" type="bool" /> |
| 14 | + <description> |
| 15 | + Returns the game application's help string formatted for printing. |
| 16 | + If [param is_rich] is [code]true[/code] then the string will include BBCode color formatting. |
| 17 | + See [method ArgumentOption.get_help_string]. |
| 18 | + </description> |
| 19 | + </method> |
| 20 | + <method name="get_option_value" qualifiers="const"> |
| 21 | + <return type="Variant" /> |
| 22 | + <param index="0" name="arg_name" type="StringName" /> |
| 23 | + <description> |
| 24 | + Returns the value set for [param arg_name] or [member ArgumentOption.default_value] if the option was not set. |
| 25 | + </description> |
| 26 | + </method> |
| 27 | + <method name="has_option" qualifiers="const"> |
| 28 | + <return type="bool" /> |
| 29 | + <param index="0" name="arg_name" type="StringName" /> |
| 30 | + <param index="1" name="include_aliases" type="bool" default="false" /> |
| 31 | + <description> |
| 32 | + Returns [code]true[/code] if [param arg_name] is a valid option. |
| 33 | + If [param include_aliases] is [code]true[/code] then also checks against [member ArgumentOption.aliases]. |
| 34 | + </description> |
| 35 | + </method> |
| 36 | + <method name="is_option_set" qualifiers="const"> |
| 37 | + <return type="bool" /> |
| 38 | + <param index="0" name="arg_name" type="StringName" /> |
| 39 | + <param index="1" name="include_aliases" type="bool" default="false" /> |
| 40 | + <description> |
| 41 | + Returns [code]true[/code] if [param arg_name] was set either by [method parse_arguments] or [method set_option_value]. |
| 42 | + Returns [code]false[/code] if [param arg_name] is not a valid option. |
| 43 | + If [param include_aliases] is [code]true[/code] then also searchs against [member ArgumentOption.aliases]. |
| 44 | + </description> |
| 45 | + </method> |
| 46 | + <method name="parse_arguments"> |
| 47 | + <return type="int" enum="Error" /> |
| 48 | + <param index="0" name="args" type="PackedStringArray" /> |
| 49 | + <param index="1" name="error_unknown" type="bool" default="true" /> |
| 50 | + <description> |
| 51 | + Parses the arguments for the commandline into the [ArgumentParser]. This is run before game initialization for [method OS.get_cmdline_args] and [method OS.get_cmdline_user_args]. |
| 52 | + Prints errors for unknown arguments when [param error_unknown] is true. |
| 53 | + </description> |
| 54 | + </method> |
| 55 | + <method name="set_option_value"> |
| 56 | + <return type="void" /> |
| 57 | + <param index="0" name="arg_name" type="StringName" /> |
| 58 | + <param index="1" name="value" type="Variant" /> |
| 59 | + <description> |
| 60 | + Sets the option's argument of [param arg_name] to value of [param value]. |
| 61 | + </description> |
| 62 | + </method> |
| 63 | + </methods> |
| 64 | +</class> |
0 commit comments