advgetopt 2.0.49
Parse complex command line arguments and configuration files in C++.
Classes | Functions | Variables
edit_config.cpp File Reference

Tool used to edit configuration files from the command line. More...

#include <advgetopt/advgetopt.h>
#include <advgetopt/conf_file.h>
#include <advgetopt/exception.h>
#include <advgetopt/version.h>
#include <snapdev/join_strings.h>
#include <libexcept/file_inheritance.h>
#include <boost/preprocessor/stringize.hpp>
#include <iostream>
#include <unistd.h>
#include <snapdev/poison.h>
Include dependency graph for edit_config.cpp:

Go to the source code of this file.

Classes

class  edit_config
 

Functions

int main (int argc, char *argv[])
 

Variables

advgetopt::group_description const g_group_descriptions []
 
advgetopt::option const g_options []
 
advgetopt::options_environment const g_options_environment
 

Detailed Description

Retrieve a parameter from a configuration file, allow for the editing of a snap configuration file parameter, all from the command line.

Definition in file edit_config.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 411 of file edit_config.cpp.

References advgetopt::getopt_exit::code(), and edit_config::run().

Variable Documentation

◆ g_group_descriptions

advgetopt::group_description const g_group_descriptions[]
Initial value:

Definition at line 159 of file edit_config.cpp.

◆ g_options

advgetopt::option const g_options[]

Definition at line 67 of file edit_config.cpp.

◆ g_options_environment

advgetopt::options_environment const g_options_environment
Initial value:
=
{
.f_project_name = "advgetopt",
.f_group_name = nullptr,
.f_options = g_options,
.f_options_files_directory = nullptr,
.f_environment_variable_intro = "EDIT_CONFIG_",
.f_section_variables_name = nullptr,
.f_configuration_files = nullptr,
.f_configuration_filename = nullptr,
.f_configuration_directories = nullptr,
.f_help_header = "Usage: %p [-<opt>] <configuration filename> <field name> [<new value>]\n"
"where -<opt> is one or more of:",
.f_help_footer = "%c",
.f_license = "GNU GPL v2",
.f_copyright = "Copyright (c) 2013-"
" by Made to Order Software Corporation -- All Rights Reserved",
.f_build_date = UTC_BUILD_DATE,
.f_build_time = UTC_BUILD_TIME,
.f_groups = g_group_descriptions,
}
advgetopt::option const g_options[]
advgetopt::group_description const g_group_descriptions[]
constexpr flag_t GETOPT_ENVIRONMENT_FLAG_PROCESS_SYSTEM_PARAMETERS
Definition options.h:435
char const * f_environment_variable_name
Definition options.h:74
#define LIBADVGETOPT_VERSION_STRING
Definition version.h:32

Definition at line 178 of file edit_config.cpp.

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.