From cb9ff31b5ab93c44e9a09235254feae50aa01179 Mon Sep 17 00:00:00 2001 From: "Taylor C. Richberger" Date: Thu, 5 May 2016 14:43:24 -0600 Subject: improve doxygenation --- Doxyfile | 8 ++++---- README.md | 25 ++++++++++++++----------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Doxyfile b/Doxyfile index d3de7e3..9fd04f7 100644 --- a/Doxyfile +++ b/Doxyfile @@ -765,7 +765,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = +INPUT += README.md # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -906,7 +906,7 @@ FILTER_SOURCE_PATTERNS = # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = +USE_MDFILE_AS_MAINPAGE = README.md #--------------------------------------------------------------------------- # Configuration options related to source browsing @@ -1054,7 +1054,7 @@ GENERATE_HTML = YES # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_OUTPUT = public +HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). @@ -1590,7 +1590,7 @@ EXTRA_SEARCH_MAPPINGS = # If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output. # The default value is: YES. -GENERATE_LATEX = YES +GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of diff --git a/README.md b/README.md index b8873f4..97038e4 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,9 @@ license and my name from the header of the args.hxx file in source redistributions (ie. don't pretend that you wrote it). I do welcome additions and updates wherever you feel like contributing code. -There is no API documentation here. The APIs that are most important are the -ArgumentParser and the constructors of the individual types. The examples -should be, for the most part, enough to use this library, but the API -documentation will come soon enough. +The API documentation can be found at https://taywee.github.io/args + +There are also somewhat extensive examples below. # What does it do @@ -78,7 +77,11 @@ All the code examples here will be complete code examples, with some output. ## Simple example: -```c++ +```cpp +#include +#include +int main(int argc, char **argv) +{ args::ArgumentParser parser("This is a test program.", "This goes after the options."); args::HelpFlag help(parser, "help", "Display this help menu", args::Matcher({'h'}, {"help"})); try @@ -117,7 +120,7 @@ All the code examples here will be complete code examples, with some output. ## Boolean flags, special group types, different matcher construction: -```c++ +```cpp #include #include int main(int argc, char **argv) @@ -194,7 +197,7 @@ Group validation failed somewhere! ## Argument flags, Positional arguments, lists -```c++ +```cpp #include #include int main(int argc, char **argv) @@ -281,7 +284,7 @@ Argument 'numbers' received invalid value type 'a' # Custom type parsers (here we use std::tuple) -```c++ +```cpp #include #include #include @@ -374,7 +377,7 @@ there are unextracted characters left in the stream. ## Long descriptions and proper wrapping and listing -```c++ +```cpp #include #include int main(int argc, char **argv) @@ -480,7 +483,7 @@ int main(int argc, char **argv) ### dd-style -```c++ +```cpp #include #include int main(int argc, char **argv) @@ -546,7 +549,7 @@ if = /tmp/input The code is the same as above, but the two lines are replaced out: -```c++ +```cpp parser.LongPrefix("/"); parser.LongSeparator(":"); ``` -- cgit v1.2.1