advgetopt 2.0.47
Parse complex command line arguments and configuration files in C++.
Public Attributes | List of all members
advgetopt::option Struct Reference

Structure representing an option. More...

#include <options.h>

Public Attributes

char constf_default = nullptr
 
char constf_environment_variable_name = nullptr
 
flag_t f_flags = GETOPT_FLAG_NONE
 
char constf_help = nullptr
 
char const *constf_multiple_separators = nullptr
 
char constf_name = nullptr
 
short_name_t f_short_name = NO_SHORT_NAME
 
char constf_validator = nullptr
 

Detailed Description

When creating a getopt() object you have to pass an array of options. That array is defined as a set of option structures.

The last option must be an end_options(). It has its f_flags set to GETOPT_FLAG_END and all the other parameters are set to zero (i.e. no name, no short name, etc.)

Note that with the newer version of the library, you are not expected to manually define an array of options. Instead, you want to use the C++ functions such as Name(), ShortName(), Flags(), etc. These functions are capable of verifying that at least some of the values are valid at compile time.

Definition at line 69 of file options.h.

Member Data Documentation

◆ f_default

char const* advgetopt::option::f_default = nullptr

Definition at line 75 of file options.h.

Referenced by advgetopt::getopt::parse_options_info().

◆ f_environment_variable_name

char const* advgetopt::option::f_environment_variable_name = nullptr

Definition at line 74 of file options.h.

Referenced by advgetopt::getopt::parse_options_info().

◆ f_flags

flag_t advgetopt::option::f_flags = GETOPT_FLAG_NONE

Definition at line 72 of file options.h.

Referenced by advgetopt::getopt::parse_options_info().

◆ f_help

char const* advgetopt::option::f_help = nullptr

Definition at line 76 of file options.h.

Referenced by advgetopt::getopt::parse_options_info().

◆ f_multiple_separators

char const* const* advgetopt::option::f_multiple_separators = nullptr

Definition at line 78 of file options.h.

Referenced by advgetopt::getopt::parse_options_info().

◆ f_name

char const* advgetopt::option::f_name = nullptr

Definition at line 73 of file options.h.

Referenced by advgetopt::getopt::parse_options_info().

◆ f_short_name

short_name_t advgetopt::option::f_short_name = NO_SHORT_NAME

Definition at line 71 of file options.h.

Referenced by advgetopt::define_option(), and advgetopt::getopt::parse_options_info().

◆ f_validator

char const* advgetopt::option::f_validator = nullptr

Definition at line 77 of file options.h.

Referenced by advgetopt::getopt::parse_options_info().


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

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.