logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

include/Zycore/ArgParse.h

Author

       Generated automatically by Doxygen for Zycore from the source code.

Zycore                                           Version 1.5.2.0                    include/Zycore/ArgParse.h(3)

Detailed Description

       Implements command-line argument parsing.

Function Documentation

ZYCORE_EXPORTZyanStatusZyanArgParse(constZyanArgParseConfig*cfg,ZyanVector*parsed,constchar**error_token)
       Parse arguments according to a ZyanArgParseConfig definition.

       Parameterscfg Argument parser config to use.
           parsed Receives the parsed output. Vector of ZyanArgParseArg. Ownership is transferred to the user.
           Input is expected to be uninitialized. On error, the vector remains uninitialized.
           error_token On error, if it makes sense, receives the argument fragment causing the error. Optional,
           may be ZYAN_NULL. The pointer borrows into the cfg struct and doesn't have to be freed by the user.

       Returns
           A ZyanStatus status determining whether the parsing succeeded.

   ZYCORE_EXPORTZyanStatusZyanArgParseEx(constZyanArgParseConfig*cfg,ZyanVector*parsed,constchar**error_token,ZyanAllocator*allocator)
       Parse arguments according to a ZyanArgParseConfig definition.

       This version allows specification of a custom memory allocator and thus supports no-libc.

       Parameterscfg Argument parser config to use.
           parsed Receives the parsed output. Vector of ZyanArgParseArg. Ownership is transferred to the user.
           Input is expected to be uninitialized. On error, the vector remains uninitialized.
           error_token On error, if it makes sense, receives the argument fragment causing the error. Optional,
           may be ZYAN_NULL. The pointer borrows into the cfg struct and doesn't have to be freed by the user.
           allocator The ZyanAllocator to be used for allocating the output vector's data.

       Returns
           A ZyanStatus status determining whether the parsing succeeded.

Name

       include/Zycore/ArgParse.h

Synopsis

       #include <Zycore/Types.h>
       #include <Zycore/Status.h>
       #include <Zycore/Vector.h>
       #include <Zycore/String.h>

   Classes
       struct ZyanArgParseDefinition_
       struct ZyanArgParseConfig_
       struct ZyanArgParseArg_Typedefs
       typedef struct ZyanArgParseDefinition_ZyanArgParseDefinition
       typedef struct ZyanArgParseConfig_ZyanArgParseConfig
       typedef struct ZyanArgParseArg_ZyanArgParseArgFunctionsZYCORE_EXPORTZyanStatusZyanArgParse (const ZyanArgParseConfig *cfg, ZyanVector *parsed, const char
           **error_token)
       ZYCORE_EXPORTZyanStatusZyanArgParseEx (const ZyanArgParseConfig *cfg, ZyanVector *parsed, const char
           **error_token, ZyanAllocator *allocator)

Typedef Documentation

typedefstructZyanArgParseArg_ZyanArgParseArg
       Information about a parsed argument.

   typedefstructZyanArgParseConfig_ZyanArgParseConfig
       Configuration for argument parsing.

   typedefstructZyanArgParseDefinition_ZyanArgParseDefinition
       Definition of a single argument.

See Also