libclap 1.0.0
Command Line Argument Parser for C
Loading...
Searching...
No Matches
clap_types.h
Go to the documentation of this file.
1
6#ifndef CLAP_TYPES_H
7#define CLAP_TYPES_H
8
9#include <stdbool.h>
10#include <stddef.h>
11#include <clap/clap_error.h>
12#include <clap/clap_export.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
27
37
47
66
89typedef bool (*clap_type_handler_t)(
90 const char *input,
91 void *output,
92 size_t output_size,
93 clap_error_t *error
94);
95
134typedef bool (*clap_action_handler_t)(
135 clap_parser_t *parser,
136 clap_argument_t *argument,
137 clap_namespace_t *namespace,
138 const char **values,
139 size_t value_count,
140 void *user_data,
141 clap_error_t *error
142);
143
144#ifdef __cplusplus
145}
146#endif
147
148#endif /* CLAP_TYPES_H */
Error handling for libclap.
Symbol export/import macros for libclap.
bool(* clap_type_handler_t)(const char *input, void *output, size_t output_size, clap_error_t *error)
Type validation / conversion handler function pointer.
Definition clap_types.h:89
bool(* clap_action_handler_t)(clap_parser_t *parser, clap_argument_t *argument, clap_namespace_t *namespace, const char **values, size_t value_count, void *user_data, clap_error_t *error)
Custom action handler function pointer.
Definition clap_types.h:134
clap_parse_result_t
Parse result codes returned by clap_parse_args()
Definition clap_types.h:60
@ CLAP_PARSE_HELP
Definition clap_types.h:63
@ CLAP_PARSE_ERROR
Definition clap_types.h:62
@ CLAP_PARSE_VERSION
Definition clap_types.h:64
@ CLAP_PARSE_SUCCESS
Definition clap_types.h:61
Argument definition (positional or optional).
Error information structure.
Definition clap_error.h:36
Container for parsed argument values.
Parsing engine state and configuration.