<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.9.3" xml:lang="en-US">
  <compounddef id="namespaceargagg" kind="namespace" language="C++">
    <compoundname>argagg</compoundname>
    <innerclass refid="structargagg_1_1definition" prot="public">argagg::definition</innerclass>
    <innerclass refid="structargagg_1_1fmt__ostream" prot="public">argagg::fmt_ostream</innerclass>
    <innerclass refid="structargagg_1_1invalid__flag" prot="public">argagg::invalid_flag</innerclass>
    <innerclass refid="structargagg_1_1option__lacks__argument__error" prot="public">argagg::option_lacks_argument_error</innerclass>
    <innerclass refid="structargagg_1_1option__result" prot="public">argagg::option_result</innerclass>
    <innerclass refid="structargagg_1_1option__results" prot="public">argagg::option_results</innerclass>
    <innerclass refid="structargagg_1_1parser" prot="public">argagg::parser</innerclass>
    <innerclass refid="structargagg_1_1parser__map" prot="public">argagg::parser_map</innerclass>
    <innerclass refid="structargagg_1_1parser__results" prot="public">argagg::parser_results</innerclass>
    <innerclass refid="structargagg_1_1unexpected__argument__error" prot="public">argagg::unexpected_argument_error</innerclass>
    <innerclass refid="structargagg_1_1unexpected__option__error" prot="public">argagg::unexpected_option_error</innerclass>
    <innernamespace refid="namespaceargagg_1_1convert">argagg::convert</innernamespace>
      <sectiondef kind="func">
      <memberdef kind="function" id="namespaceargagg_1acb5531e41fdc903b94502fc13736d94a" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>bool</type>
        <definition>bool argagg::cmd_line_arg_is_option_flag</definition>
        <argsstring>(const char *s)</argsstring>
        <name>cmd_line_arg_is_option_flag</name>
        <qualifiedname>argagg::cmd_line_arg_is_option_flag</qualifiedname>
        <param>
          <type>const char *</type>
          <declname>s</declname>
        </param>
        <briefdescription>
<para>Checks whether or not a command line argument should be processed as an option flag. This is very similar to <ref refid="namespaceargagg_1affa2ac4b0385ceafd6f97af921f7579e" kindref="member">is_valid_flag_definition()</ref> but must allow for short flag groups (e.g. &quot;-abc&quot;) and equal-assigned long flag arguments (e.g. &quot;--output=foo.txt&quot;). </para>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" line="824" column="6" bodyfile="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" bodystart="824" bodyend="900" declfile="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" declline="439" declcolumn="6"/>
        <references refid="cpp/algorithm/all_any_none_of_1">std::all_of</references>
        <references refid="cpp/string/byte/isalnum_1">std::isalnum</references>
        <references refid="cpp/string/byte/strlen_1">std::strlen</references>
      </memberdef>
      <memberdef kind="function" id="namespaceargagg_1affa2ac4b0385ceafd6f97af921f7579e" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>bool</type>
        <definition>bool argagg::is_valid_flag_definition</definition>
        <argsstring>(const char *s)</argsstring>
        <name>is_valid_flag_definition</name>
        <qualifiedname>argagg::is_valid_flag_definition</qualifiedname>
        <param>
          <type>const char *</type>
          <declname>s</declname>
        </param>
        <briefdescription>
<para>Checks whether a flag in an option definition is valid. I suggest reading through the function source to understand what dictates a valid. </para>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" line="904" column="6" bodyfile="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" bodystart="904" bodyend="956" declfile="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" declline="448" declcolumn="6"/>
        <references refid="cpp/algorithm/all_any_none_of_1">std::all_of</references>
        <references refid="cpp/string/byte/isalnum_1">std::isalnum</references>
        <references refid="cpp/string/byte/strlen_1">std::strlen</references>
      </memberdef>
      <memberdef kind="function" id="namespaceargagg_1abcf4845730ad824564affe95051a5b98" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>bool</type>
        <definition>bool argagg::flag_is_short</definition>
        <argsstring>(const char *s)</argsstring>
        <name>flag_is_short</name>
        <qualifiedname>argagg::flag_is_short</qualifiedname>
        <param>
          <type>const char *</type>
          <declname>s</declname>
        </param>
        <briefdescription>
<para>Tests whether or not a valid flag is short. Assumes the provided cstring is already a valid flag. </para>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" line="960" column="6" bodyfile="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" bodystart="960" bodyend="964" declfile="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" declline="457" declcolumn="6"/>
        <references refid="cpp/string/byte/isalnum_1">std::isalnum</references>
      </memberdef>
      <memberdef kind="function" id="namespaceargagg_1a7a7eacb2cf495cc33c08df68619fbf95" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type><ref refid="structargagg_1_1parser__map" kindref="compound">parser_map</ref></type>
        <definition>parser_map argagg::validate_definitions</definition>
        <argsstring>(const std::vector&lt; definition &gt; &amp;definitions)</argsstring>
        <name>validate_definitions</name>
        <qualifiedname>argagg::validate_definitions</qualifiedname>
        <param>
          <type>const <ref refid="cpp/container/vector" kindref="compound" external="/usr/src/slapt-src/development/argagg/argagg-0.4.6/doc/cppreference-doxygen-web.tag.xml">std::vector</ref>&lt; <ref refid="structargagg_1_1definition" kindref="compound">definition</ref> &gt; &amp;</type>
          <declname>definitions</declname>
        </param>
        <briefdescription>
<para>Validates a collection (specifically an <ref refid="cpp/container/vector" kindref="compound" external="/usr/src/slapt-src/development/argagg/argagg-0.4.6/doc/cppreference-doxygen-web.tag.xml">std::vector</ref>) of <ref refid="structargagg_1_1definition" kindref="compound">definition</ref> objects by checking if the contained flags are valid. If the set of <ref refid="structargagg_1_1definition" kindref="compound">definition</ref> objects is not valid then an exception is thrown. Upon successful validation a <ref refid="structargagg_1_1parser__map" kindref="compound">parser_map</ref> object is returned. </para>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" line="1005" column="12" bodyfile="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" bodystart="1005" bodyend="1057" declfile="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" declline="528" declcolumn="12"/>
        <references refid="namespaceargagg_1abcf4845730ad824564affe95051a5b98" compoundref="argagg_8hpp" startline="960" endline="964">flag_is_short</references>
        <references refid="namespaceargagg_1affa2ac4b0385ceafd6f97af921f7579e" compoundref="argagg_8hpp" startline="904" endline="956">is_valid_flag_definition</references>
        <references refid="cpp/utility/pair/make_pair_1">std::make_pair</references>
        <references refid="cpp/utility/move_1">std::move</references>
        <references refid="cpp/io/basic_ostringstream/str_1">std::ostringstream::str</references>
      </memberdef>
      <memberdef kind="function" id="namespaceargagg_1ae9d8a0de66b416e737bddcb36a9eddf0" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type><ref refid="cpp/string/basic_string" kindref="compound" external="/usr/src/slapt-src/development/argagg/argagg-0.4.6/doc/cppreference-doxygen-web.tag.xml">std::string</ref></type>
        <definition>std::string argagg::fmt_string</definition>
        <argsstring>(const std::string &amp;s)</argsstring>
        <name>fmt_string</name>
        <qualifiedname>argagg::fmt_string</qualifiedname>
        <param>
          <type>const <ref refid="cpp/string/basic_string" kindref="compound" external="/usr/src/slapt-src/development/argagg/argagg-0.4.6/doc/cppreference-doxygen-web.tag.xml">std::string</ref> &amp;</type>
          <declname>s</declname>
        </param>
        <briefdescription>
<para>Processes the provided string using the fmt util and returns the resulting output as a string. Not the most efficient (in time or space) but gets the job done. </para>
        </briefdescription>
        <detaileddescription>
<para>This function is cowardly so if there are any errors encountered such as a syscall returning -1 then the input string is returned.</para>
<para><simplesect kind="note"><para>This only has formatting behavior if the <computeroutput><bold>unix</bold></computeroutput> preprocessor definition is defined since it relies on the POSIX API for forking, executing a process, reading/writing to/from file descriptors, and the existence of the fmt util. </para>
</simplesect>
</para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" line="1458" column="13" bodyfile="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" bodystart="1458" bodyend="1511" declfile="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" declline="633" declcolumn="13"/>
        <references refid="cpp/string/basic_string/c_str_1">std::string::c_str</references>
        <references refid="cpp/string/basic_string/size_1">std::string::length</references>
        <references refid="cpp/io/basic_ostringstream/str_1">std::ostringstream::str</references>
        <references refid="cpp/io/basic_ostream/write_1">std::ostringstream::write</references>
      </memberdef>
      </sectiondef>
    <briefdescription>
<para>There are only two hard things in Computer Science: cache invalidation and naming things (Phil Karlton). </para>
    </briefdescription>
    <detaileddescription>
<para>The names of types have to be succint and clear. This has turned out to be a more difficult thing than I expected. Here you&apos;ll find a quick overview of the type names you&apos;ll find in this namespace (and thus &quot;library&quot;).</para>
<para>When a program is invoked it is passed a number of &quot;command line arguments&quot;. Each of these &quot;arguments&quot; is a string (C-string to be more precise). An &quot;option&quot; is a command line argument that has special meaning. This library recognizes a command line argument as a potential option if it starts with a dash (&apos;-&apos;) or double-dash (&apos;<ndash/>&apos;).</para>
<para>A &quot;parser&quot; is a set of &quot;definitions&quot; (not a literal <ref refid="cpp/container/set" kindref="compound" external="/usr/src/slapt-src/development/argagg/argagg-0.4.6/doc/cppreference-doxygen-web.tag.xml">std::set</ref> but rather a <ref refid="cpp/container/vector" kindref="compound" external="/usr/src/slapt-src/development/argagg/argagg-0.4.6/doc/cppreference-doxygen-web.tag.xml">std::vector</ref>). A parser is represented by the <ref refid="structargagg_1_1parser" kindref="compound">argagg::parser</ref> struct.</para>
<para>A &quot;definition&quot; is a structure with four components that define what &quot;options&quot; are recognized. The four components are the name of the option, the strings that represent the option, the option&apos;s help text, and how many arguments the option should expect. &quot;Flags&quot; are the individual strings that represent the option (&quot;-v&quot; and &quot;--verbose&quot; are flags for the &quot;verbose&quot; option). A definition is represented by the <ref refid="structargagg_1_1definition" kindref="compound">argagg::definition</ref> struct.</para>
<para>Note at this point that the word &quot;option&quot; can be used interchangeably to mean the notion of an option and the actual instance of an option given a set of command line arguments. To be unambiguous we use a &quot;definition&quot; to represent the notion of an option and an &quot;option result&quot; to represent an actual option parsed from a set of command line arguments. An &quot;option
result&quot; is represented by the <ref refid="structargagg_1_1option__result" kindref="compound">argagg::option_result</ref> struct.</para>
<para>There&apos;s one more wrinkle to this: an option can show up multiple times in a given set of command line arguments. For example, &quot;-n 1 -n 2 -n 3&quot;. This will parse into three distinct <ref refid="structargagg_1_1option__result" kindref="compound">argagg::option_result</ref> instances, but all of them correspond to the same <ref refid="structargagg_1_1definition" kindref="compound">argagg::definition</ref>. We aggregate these into the <ref refid="structargagg_1_1option__results" kindref="compound">argagg::option_results</ref> struct which represents &quot;all parser results for a
given option definition&quot;. This <ref refid="structargagg_1_1option__results" kindref="compound">argagg::option_results</ref> is basically a <ref refid="cpp/container/vector" kindref="compound" external="/usr/src/slapt-src/development/argagg/argagg-0.4.6/doc/cppreference-doxygen-web.tag.xml">std::vector</ref> of <ref refid="structargagg_1_1option__result" kindref="compound">argagg::option_result</ref>.</para>
<para>Options aren&apos;t the only thing parsed though. Positional arguments are also parsed. Thus a parser produces a result that contains both option results and positional arguments. The parser results are represented by the <ref refid="structargagg_1_1parser__results" kindref="compound">argagg::parser_results</ref> struct. All option results are stored in a mapping from option name to the <ref refid="structargagg_1_1option__results" kindref="compound">argagg::option_results</ref>. All positional arguments are simply stored in a vector of C-strings. </para>
    </detaileddescription>
    <location file="/usr/src/slapt-src/development/argagg/argagg-0.4.6/include/argagg/argagg.hpp" line="101" column="1"/>
  </compounddef>
</doxygen>
