![]() |
advgetopt 2.0.49
Parse complex command line arguments and configuration files in C++.
|
Public Member Functions | |
edit_config (int argc, char *argv[]) | |
Initialize the DNS options object. | |
void | run () |
Run the command. | |
Private Attributes | |
advgetopt::getopt | f_opt |
Definition at line 209 of file edit_config.cpp.
edit_config::edit_config | ( | int | argc, |
char * | argv[] | ||
) |
This constructor parses the command line options and returns. It does not try to interpret the command line at all, this is reserved to the run() function which has the ability to return an exit code.
[in] | argc | The number of arguments in argv. |
[in] | argv | The array of arguments found on the command line. |
Definition at line 230 of file edit_config.cpp.
References f_opt, advgetopt::getopt::get_program_name(), advgetopt::getopt::is_defined(), and advgetopt::getopt::size().
void edit_config::run | ( | ) |
This checks whether we have 2 or 3 parameters, if 2 we read the field and if 3 we write to the field. Note that the writing will happen in the snapwebsites.d
sub-directory.
Definition at line 274 of file edit_config.cpp.
References advgetopt::ASSIGNMENT_OPERATOR_COLON, advgetopt::ASSIGNMENT_OPERATOR_EQUAL, advgetopt::ASSIGNMENT_OPERATOR_SPACE, advgetopt::COMMENT_INI, advgetopt::COMMENT_SAVE, advgetopt::COMMENT_SHELL, f_opt, advgetopt::conf_file::get_conf_file(), advgetopt::getopt::get_string(), advgetopt::getopt::is_defined(), advgetopt::line_continuation_unix, advgetopt::NAME_SEPARATOR_DASHES, advgetopt::NAME_SEPARATOR_UNDERSCORES, advgetopt::SECTION_OPERATOR_INI_FILE, advgetopt::getopt::size(), and advgetopt::split_string().
Referenced by main().
|
private |
Definition at line 217 of file edit_config.cpp.
Referenced by edit_config(), and run().
This document is part of the Snap! Websites Project.
Copyright by Made to Order Software Corp.