ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
registry_entry_t Struct Reference

Registry entry - stores option definition with mode bitmask and metadata. More...

#include <include/ascii-chat/options/registry/common.h>

Data Fields

const char * long_name
 
char short_name
 
option_type_t type
 
size_t offset
 
const void * default_value
 Default value (single value for all modes, or NULL if mode_default_getter is set)
 
size_t default_value_size
 
const char * help_text
 
const char * group
 
const char * arg_placeholder
 Custom argument placeholder (e.g., "SHELL [FILE]" instead of "STR")
 
bool required
 
const char * env_var_name
 
bool(* validate_fn )(const void *options_struct, char **error_msg)
 
bool(* parse_fn )(const char *arg, void *dest, char **error_msg)
 
bool owns_memory
 
bool optional_arg
 
option_mode_bitmask_t mode_bitmask
 
option_metadata_t metadata
 Enum values, numeric ranges, examples.
 
mode_default_getter_fn mode_default_getter
 Mode-aware default getter (NULL if using default_value) - LAST for backward compat.
 

Detailed Description

Registry entry - stores option definition with mode bitmask and metadata.

Definition at line 31 of file options/registry/common.h.

Field Documentation

◆ arg_placeholder

const char* registry_entry_t::arg_placeholder

Custom argument placeholder (e.g., "SHELL [FILE]" instead of "STR")

Definition at line 40 of file options/registry/common.h.

Referenced by options_registry_add_all_to_builder(), and registry_entry_to_descriptor().

◆ default_value

const void* registry_entry_t::default_value

Default value (single value for all modes, or NULL if mode_default_getter is set)

Definition at line 36 of file options/registry/common.h.

Referenced by options_registry_add_all_to_builder(), options_registry_find_by_name(), options_registry_find_by_short(), and registry_entry_to_descriptor().

◆ default_value_size

size_t registry_entry_t::default_value_size

Definition at line 37 of file options/registry/common.h.

Referenced by options_registry_add_all_to_builder().

◆ env_var_name

◆ group

◆ help_text

◆ long_name

◆ metadata

option_metadata_t registry_entry_t::metadata

Enum values, numeric ranges, examples.

Definition at line 48 of file options/registry/common.h.

Referenced by options_registry_add_all_to_builder(), options_registry_get_metadata(), and registry_entry_to_descriptor().

◆ mode_bitmask

◆ mode_default_getter

mode_default_getter_fn registry_entry_t::mode_default_getter

Mode-aware default getter (NULL if using default_value) - LAST for backward compat.

Definition at line 50 of file options/registry/common.h.

Referenced by registry_entry_to_descriptor().

◆ offset

◆ optional_arg

◆ owns_memory

bool registry_entry_t::owns_memory

◆ parse_fn

bool(* registry_entry_t::parse_fn) (const char *arg, void *dest, char **error_msg)

◆ required

◆ short_name

◆ type

◆ validate_fn

bool(* registry_entry_t::validate_fn) (const void *options_struct, char **error_msg)

The documentation for this struct was generated from the following file: