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

Option metadata for config file parsing. More...

#include <include/ascii-chat/options/schema.h>

Data Fields

const char * toml_key
 TOML key path (e.g., "network.port", "client.address")
 
const char * cli_flag
 CLI flag name (e.g., "--port") or NULL if no CLI flag.
 
option_type_t type
 Value type (from builder)
 
option_context_t context
 Where this option can appear.
 
const char * category
 Category name (e.g., "network", "client", "audio")
 
size_t field_offset
 offsetof(options_t, field) - where to store value
 
size_t field_size
 Size of field in options_t.
 
builder_validate_fn_t validate_fn
 Builder's validation function (can be NULL for simple types)
 
bool(* parse_fn )(const char *arg, void *dest, char **error_msg)
 Custom parser for callbacks (or NULL)
 
option_mode_bitmask_t mode_bitmask
 Which modes this option applies to.
 
const char * description
 Description for docs/help generation.
 
union { 
 
   struct { 
 
      int   min 
 
      int   max 
 
   }   int_range 
 
   struct { 
 
      double   min 
 
      double   max 
 
   }   float_range 
 
} constraints 
 
const void *(* mode_default_getter )(asciichat_mode_t mode)
 Get mode-specific default value (NULL if not mode-aware)
 

Detailed Description

Option metadata for config file parsing.

Describes a single configurable option with its TOML key, validation, and storage location in options_t.

Definition at line 49 of file schema.h.

Field Documentation

◆ category

const char* config_option_metadata_t::category

Category name (e.g., "network", "client", "audio")

Definition at line 54 of file schema.h.

Referenced by config_create_default(), and config_schema_build_from_configs().

◆ cli_flag

const char* config_option_metadata_t::cli_flag

CLI flag name (e.g., "--port") or NULL if no CLI flag.

Definition at line 51 of file schema.h.

Referenced by config_schema_build_from_configs().

◆ [union]

union { ... } config_option_metadata_t::constraints

◆ context

option_context_t config_option_metadata_t::context

Where this option can appear.

Definition at line 53 of file schema.h.

Referenced by config_schema_build_from_configs().

◆ description

const char* config_option_metadata_t::description

Description for docs/help generation.

Definition at line 68 of file schema.h.

Referenced by config_create_default(), and config_schema_build_from_configs().

◆ field_offset

size_t config_option_metadata_t::field_offset

offsetof(options_t, field) - where to store value

Definition at line 55 of file schema.h.

Referenced by config_create_default(), and config_schema_build_from_configs().

◆ field_size

size_t config_option_metadata_t::field_size

Size of field in options_t.

Definition at line 56 of file schema.h.

Referenced by config_create_default(), and config_schema_build_from_configs().

◆ [struct]

struct { ... } config_option_metadata_t::float_range

◆ [struct]

struct { ... } config_option_metadata_t::int_range

◆ max [1/2]

int config_option_metadata_t::max

Definition at line 74 of file schema.h.

Referenced by config_schema_build_from_configs().

◆ max [2/2]

double config_option_metadata_t::max

Definition at line 78 of file schema.h.

◆ min [1/2]

int config_option_metadata_t::min

Definition at line 73 of file schema.h.

Referenced by config_schema_build_from_configs().

◆ min [2/2]

double config_option_metadata_t::min

Definition at line 77 of file schema.h.

◆ mode_bitmask

option_mode_bitmask_t config_option_metadata_t::mode_bitmask

Which modes this option applies to.

Definition at line 65 of file schema.h.

Referenced by config_create_default(), and config_schema_build_from_configs().

◆ mode_default_getter

const void *(* config_option_metadata_t::mode_default_getter) (asciichat_mode_t mode)

Get mode-specific default value (NULL if not mode-aware)

Definition at line 83 of file schema.h.

Referenced by config_create_default(), and config_schema_build_from_configs().

◆ parse_fn

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

Custom parser for callbacks (or NULL)

Definition at line 62 of file schema.h.

Referenced by config_schema_build_from_configs().

◆ toml_key

const char* config_option_metadata_t::toml_key

TOML key path (e.g., "network.port", "client.address")

Definition at line 50 of file schema.h.

Referenced by config_create_default(), and config_schema_build_from_configs().

◆ type

option_type_t config_option_metadata_t::type

Value type (from builder)

Definition at line 52 of file schema.h.

Referenced by config_create_default(), and config_schema_build_from_configs().

◆ validate_fn

builder_validate_fn_t config_option_metadata_t::validate_fn

Builder's validation function (can be NULL for simple types)

Definition at line 59 of file schema.h.

Referenced by config_schema_build_from_configs().


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