Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_cmd.h>
Public Attributes | |
const char * | name |
bool | optional |
bool | no_space |
RzCmdArgType | type |
int | flags |
const char * | default_value |
union { | |
const char ** choices | |
RzCmdArgChoiceCb choices_cb | |
}; | |
union { ... } |
Additional data which is type specific.
const char** rz_cmd_desc_arg_t::choices |
List of possible values in case type
is RZ_CMD_ARG_TYPE_CHOICES.
Definition at line 270 of file rz_cmd.h.
Referenced by cmd_descs_generate.Arg::get_cstructure().
RzCmdArgChoiceCb rz_cmd_desc_arg_t::choices_cb |
Callback used to generate a list of possible values in case type
is RZ_CMD_ARG_TYPE_CHOICES. When this is specified, choices
is ignored.
Definition at line 275 of file rz_cmd.h.
Referenced by cmd_descs_generate.Arg::_get_union(), cmd_descs_generate.Arg::decl(), and cmd_descs_generate.Arg::get_cstructure().
const char* rz_cmd_desc_arg_t::default_value |
Default value for the argument, if it is not specified. This field shall be used only when optional
is true.
Definition at line 262 of file rz_cmd.h.
Referenced by cmd_descs_generate.Arg::__str__().
int rz_cmd_desc_arg_t::flags |
Flag of the argument, used to modify the behaviour of this argument. See RZ_CMD_ARG_FLAG_ values.
Definition at line 257 of file rz_cmd.h.
Referenced by cmd_descs_generate.Arg::__str__().
const char* rz_cmd_desc_arg_t::name |
The name of the argument, shown also in its help.
Definition at line 223 of file rz_cmd.h.
Referenced by cmd_descs_generate.Arg::__str__(), cmd_descs_generate.Detail::__str__(), cmd_descs_generate.Arg::_get_choices_cname(), cmd_descs_generate.CmdDesc::_validate(), cmd_descs_generate.Detail::get_detail_entries_cname(), test_group_name.GroupTest::run(), and cmd_descs_generate.CmdDesc::str_tab().
bool rz_cmd_desc_arg_t::no_space |
True if no space should be displayed before this argument in the help. By default it is false and a space is displayed before this argument.
Definition at line 249 of file rz_cmd.h.
Referenced by cmd_descs_generate.Arg::__str__().
bool rz_cmd_desc_arg_t::optional |
True if the argument is optional. If argument X is optional, then all arguments after X can only be specified if X was provided as well and they don't need to be set as optional.
Example: CMDNAME <mandatory-arg0> [<optional-arg1> <optional-arg2> [<optional-arg3> [optional-arg4]]] <mandatory-arg0> has optional=false <optional-arg1> has optional=true <optional-arg2> has optional=false (it can be specified only if arg1 was specified as well, so it doesn't need to be optional) <optional-arg3> has optional=true <optional-arg4> has optional=true Given the above:
CMDNAME a0
is a valid commandCMDNAME a0 a1 a2
is a valid commandCMDNAME a0 a1
is not a valid command, because if a1 is specified, also a2 has to beCMDNAME a0 a1 a2 a3
is a valid commandCMDNAME a0 a1 a2 a3 a4
is a valid command Definition at line 244 of file rz_cmd.h.
Referenced by cmd_descs_generate.Arg::__str__().
RzCmdArgType rz_cmd_desc_arg_t::type |
Type of the argument.
Definition at line 253 of file rz_cmd.h.
Referenced by cmd_descs_generate.Arg::__str__(), cmd_descs_generate.Arg::_get_choices_cname(), cmd_descs_generate.Arg::_get_union(), cmd_descs_generate.CmdDesc::_validate(), cmd_descs_generate.Arg::decl(), cmd_descs_generate.Arg::get_cstructure(), and cmd_descs_generate.CmdDesc::get_handler_cname().