advgetopt 2.0.47
Parse complex command line arguments and configuration files in C++.
Variables
advgetopt::anonymous_namespace{option_info.cpp} Namespace Reference

Variables

std::string g_configuration_filename = std::string()
 The filename of the configuration being processed.
 
bool g_trace_sources = false
 The library trace mode.
 

Variable Documentation

◆ g_configuration_filename

std::string advgetopt::anonymous_namespace{option_info.cpp}::g_configuration_filename = std::string()

This variable holds the filename of the configuration currently being processed. This information is used to generate the trace of the sources. That way it is possible to see where the current value of a given variable comes from.

This parameter is currently set from the getopt::process_configuration_file() function.

Definition at line 97 of file option_info.cpp.

◆ g_trace_sources

bool advgetopt::anonymous_namespace{option_info.cpp}::g_trace_sources = false

This flag is used to determine whether the source of each option should be traced. Very often, I have a problem where I'm not so sure where a certain option was defined and how to fix the value of that option. This flag allows us to debug that information at run time.

When the flag is set to true (automatically done by the getopt object when argv includes the "--show-sources" command line option), the sources start to be traced. Once all the parsing is done, getopt again will check whether it has the "--show-sources" command line option specified and if so, it prints out all the options current values and the various sources that were involved.

Definition at line 84 of file option_info.cpp.

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.