<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_options_8h">
<title>/Users/bernard/b20/bsoft/include/options.h File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/include/options.h</primary></indexterm>
<para>

<para>Header file for option handlers. </para>
 
</para>
<programlisting>#include &quot;Bstring.h&quot;
#include &quot;Vector3.h&quot;
#include &quot;View.h&quot;
#include &quot;Euler.h&quot;
#include &quot;symmetry.h&quot;
#include &quot;UnitCell.h&quot;
</programlisting><simplesect>
    <title>Classes    </title>
        <itemizedlist>
            <listitem><para>class <link linkend="_class_boption">Boption</link></para>

<para>A class for a command line input option. </para>
</listitem>
        </itemizedlist>
</simplesect>
<simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para><link linkend="_class_boption">Boption</link> * <link linkend="_options_8h_1ae23944f18e1f08316cff4ded49aec1f7">get_option_list</link> (const char *<link linkend="_radonrecon_8cpp_1a4de0ad4c7190962494815c0fa7f948df">use</link>[], int argc, char *argv[], int &amp;optind)</para>

<para>Parses command line arguments based on a template. </para>
</listitem>
            <listitem><para>int <link linkend="_options_8h_1ab897a3ef92122fe785134849f98fb2c7">option_kill</link> (<link linkend="_class_boption">Boption</link> *option)</para>

<para>Deallocates a linked list of option structures. </para>
</listitem>
            <listitem><para>int <link linkend="_options_8h_1a5c2ee1366a96c41d244a611c2059e7a1">get_option_verbose</link> (char *optarg)</para>

<para>Sets the verbose option. </para>
</listitem>
            <listitem><para>int <link linkend="_options_8h_1a8bc2d649c3b19e06502bc470cbd2a824">get_option_verbose</link> (<link linkend="_class_bstring">Bstring</link> &amp;optarg)</para>
</listitem>
            <listitem><para>double <link linkend="_options_8h_1aa3e9ce3b39fbeaae62671432a7cb3589">get_option_mass</link> (<link linkend="_class_bstring">Bstring</link> &amp;optarg)</para>

<para>Returns the adjusted mass based on the added character. </para>
</listitem>
        </itemizedlist>
</simplesect>
<simplesect>
    <title>Variables    </title>
        <itemizedlist>
            <listitem><para>int <link linkend="_options_8h_1a0b2caeb4b6f130be43e5a2f0267dd453">verbose</link></para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Header file for option handlers. </para>

<para><formalpara><title>Author: </title>

<para>Bernard Heymann </para>
</formalpara>
<formalpara><title>Date: </title>

<para>Created: 20010613 </para>

<para>Modified: 20180417 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_options_8h_1ae23944f18e1f08316cff4ded49aec1f7"/>    <section>
    <title>get_option_list()</title>
<indexterm><primary>get_option_list</primary><secondary>options.h</secondary></indexterm>
<indexterm><primary>options.h</primary><secondary>get_option_list</secondary></indexterm>
<para><computeroutput><link linkend="_class_boption">Boption</link>* get_option_list (const char * use[], int argc, char * argv[], int &amp; optind)</computeroutput></para><para>

<para>Parses command line arguments based on a template. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*use[]</entry>
                                <entry>
<para>usage list of strings, the template. </para>
</entry>
                            </row>
                            <row>
                                <entry>argc</entry>
                                <entry>
<para>number of command line arguments. </para>
</entry>
                            </row>
                            <row>
                                <entry>*argv[]</entry>
                                <entry>
<para>array of command line argument strings. </para>
</entry>
                            </row>
                            <row>
                                <entry>&amp;optind</entry>
                                <entry>
<para>first argument after option list. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>Boption* linked list of tag-value pairs. <literallayout><computeroutput>The usage list is parsed to find the desired option tag.
Each option in the usage list must have the following format:
    -&lt;tag&gt; &lt;value,value,...&gt;
The first character on the line must be &apos;-&apos;, the tag may not
extend beyond the 17&apos;th character and the value must start
before the 19&apos;th character.
A partial input tag is tolerated as long as it is unambiguous.
An ambiguous or unknown tag or a tag requiring a value but
without one causes program abortion.
Special tags:
    -verbose 3      sets the verbosity level for all programs.
    -help           returns the usage information and quits.
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 40 of file options.cpp.</para>
    </section><anchor xml:id="_options_8h_1aa3e9ce3b39fbeaae62671432a7cb3589"/>    <section>
    <title>get_option_mass()</title>
<indexterm><primary>get_option_mass</primary><secondary>options.h</secondary></indexterm>
<indexterm><primary>options.h</primary><secondary>get_option_mass</secondary></indexterm>
<para><computeroutput>double get_option_mass (<link linkend="_class_bstring">Bstring</link> &amp; optarg)</computeroutput></para><para>

<para>Returns the adjusted mass based on the added character. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>&amp;optarg</entry>
                                <entry>
<para>mass with added character. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>double adjusted mass. </para>
</formalpara>
</para>
<para>
Definition at line 175 of file options.cpp.</para>
    </section><anchor xml:id="_options_8h_1a5c2ee1366a96c41d244a611c2059e7a1"/>    <section>
    <title>get_option_verbose()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>get_option_verbose</primary><secondary>options.h</secondary></indexterm>
<indexterm><primary>options.h</primary><secondary>get_option_verbose</secondary></indexterm>
<para><computeroutput>int get_option_verbose (char * optarg)</computeroutput></para><para>

<para>Sets the verbose option. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>&amp;optarg</entry>
                                <entry>
<para>verbosity level. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int verbosity number, &lt;0 on error. <literallayout><computeroutput>The verbosity level is defined by the following constants setting 
particular bits:
    VERB_NONE       0       No output
    VERB_RESULT     1       Program results
    VERB_LABEL      2       Function information
    VERB_PROCESS    4       Selected processing information
    VERB_STATS      8       Statistical information on objects
    VERB_FULL       16      All processing information
    VERB_TIME       32      Timing information
    VERB_MEMORY     64      Memory allocation and freeing
    VERB_DEBUG      256     Debugging information
    VERB_DEBUG_STAR 512     STAR code debugging information
</computeroutput></literallayout> </para>
</formalpara>
</para>
<para>
Definition at line 143 of file options.cpp.</para>
    </section><anchor xml:id="_options_8h_1a8bc2d649c3b19e06502bc470cbd2a824"/>    <section>
    <title>get_option_verbose()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>get_option_verbose</primary><secondary>options.h</secondary></indexterm>
<indexterm><primary>options.h</primary><secondary>get_option_verbose</secondary></indexterm>
<para><computeroutput>int get_option_verbose (<link linkend="_class_bstring">Bstring</link> &amp; optarg)</computeroutput></para><para>
Definition at line 149 of file options.cpp.</para>
    </section><anchor xml:id="_options_8h_1ab897a3ef92122fe785134849f98fb2c7"/>    <section>
    <title>option_kill()</title>
<indexterm><primary>option_kill</primary><secondary>options.h</secondary></indexterm>
<indexterm><primary>options.h</primary><secondary>option_kill</secondary></indexterm>
<para><computeroutput>int option_kill (<link linkend="_class_boption">Boption</link> * option)</computeroutput></para><para>

<para>Deallocates a linked list of option structures. </para>
</para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*option</entry>
                                <entry>
<para>linked list of tag-value pairs. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 109 of file options.cpp.</para>
</section>
</section>
<section>
<title>Variable Documentation</title>
<anchor xml:id="_options_8h_1a0b2caeb4b6f130be43e5a2f0267dd453"/>    <section>
    <title>verbose</title>
<indexterm><primary>verbose</primary><secondary>options.h</secondary></indexterm>
<indexterm><primary>options.h</primary><secondary>verbose</secondary></indexterm>
<para><computeroutput>int verbose</computeroutput></para></section>
</section>
</section>
