|
ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
|
Option descriptor. More...
#include <lib/options/builder.h>
Data Fields | |
| const char * | long_name |
| Long option name (e.g., "port") | |
| char | short_name |
| Short option char (e.g., 'p', or '\0' if none) | |
| option_type_t | type |
| Value type. | |
| size_t | offset |
| offsetof(struct, field) - where to store value | |
| const char * | help_text |
| Description for –help. | |
| const char * | group |
| Group name for help sections (e.g., "NETWORK OPTIONS") | |
| bool | hide_from_mode_help |
| If true, don't show in mode-specific help (binary-level only) | |
| const void * | default_value |
| Pointer to default value (or NULL if required) | |
| bool | required |
| If true, option must be provided. | |
| const char * | env_var_name |
| Environment variable fallback (or NULL) | |
| bool(* | validate )(const void *options_struct, char **error_msg) |
| bool(* | parse_fn )(const char *arg, void *dest, char **error_msg) |
| void(* | action_fn )(void) |
| Action to execute (may call exit) | |
| bool | owns_memory |
| If true, strings are strdup'd and freed on cleanup. | |
| bool | optional_arg |
| If true, argument is optional (for callbacks like –verbose) | |
Option descriptor.
Describes a single command-line option with all its metadata.
| void(* option_descriptor_t::action_fn) (void) |
| const void* option_descriptor_t::default_value |
Pointer to default value (or NULL if required)
Definition at line 85 of file builder.h.
Referenced by options_config_print_usage(), and options_config_set_defaults().
| const char* option_descriptor_t::env_var_name |
Environment variable fallback (or NULL)
Definition at line 87 of file builder.h.
Referenced by options_config_print_usage(), options_config_set_defaults(), and options_config_validate().
| const char* option_descriptor_t::group |
Group name for help sections (e.g., "NETWORK OPTIONS")
Definition at line 81 of file builder.h.
Referenced by options_config_print_usage().
| const char* option_descriptor_t::help_text |
Description for –help.
Definition at line 80 of file builder.h.
Referenced by options_config_print_usage().
| bool option_descriptor_t::hide_from_mode_help |
If true, don't show in mode-specific help (binary-level only)
Definition at line 82 of file builder.h.
Referenced by options_builder_mark_binary_only(), and options_config_print_usage().
| const char* option_descriptor_t::long_name |
Long option name (e.g., "port")
Definition at line 72 of file builder.h.
Referenced by options_builder_add_action(), options_builder_add_bool(), options_builder_add_callback(), options_builder_add_callback_optional(), options_builder_add_double(), options_builder_add_int(), options_builder_add_string(), options_builder_mark_binary_only(), options_config_print_usage(), and options_config_validate().
| size_t option_descriptor_t::offset |
offsetof(struct, field) - where to store value
Definition at line 77 of file builder.h.
Referenced by options_config_cleanup(), options_config_set_defaults(), and options_config_validate().
| bool option_descriptor_t::optional_arg |
| bool option_descriptor_t::owns_memory |
If true, strings are strdup'd and freed on cleanup.
Definition at line 99 of file builder.h.
Referenced by options_config_cleanup().
| bool(* option_descriptor_t::parse_fn) (const char *arg, void *dest, char **error_msg) |
| bool option_descriptor_t::required |
If true, option must be provided.
Definition at line 86 of file builder.h.
Referenced by options_config_print_usage(), and options_config_validate().
| char option_descriptor_t::short_name |
Short option char (e.g., 'p', or '\0' if none)
Definition at line 73 of file builder.h.
Referenced by options_config_print_usage().
| option_type_t option_descriptor_t::type |
Value type.
Definition at line 76 of file builder.h.
Referenced by options_config_cleanup(), options_config_print_usage(), options_config_set_defaults(), and options_config_validate().
| bool(* option_descriptor_t::validate) (const void *options_struct, char **error_msg) |
Definition at line 90 of file builder.h.
Referenced by options_config_validate().