/Users/bernard/b20/bsoft/include/options.h(3)

NAME
/Users/bernard/b20/bsoft/include/options.h - Header file for option handlers.

SYNOPSIS

#include 'Bstring.h'
#include 'Vector3.h'
#include 'View.h'
#include 'Euler.h'
#include 'symmetry.h'
#include 'UnitCell.h'

  Classes
class Boption
A class for a command line input option.

  Functions
Boption * get_option_list (const char *use[], int argc, char *argv[], int &optind)
Parses command line arguments based on a template.
int option_kill (Boption *option)
Deallocates a linked list of option structures.
int get_option_verbose (char *optarg)
Sets the verbose option.
int get_option_verbose (Bstring &optarg)
double get_option_mass (Bstring &optarg)
Returns the adjusted mass based on the added character.

  Variables
int verbose

Detailed Description

Header file for option handlers.

Author:
    Bernard Heymann

Date:
    Created: 20010613

    Modified: 20180417

Definition in file options.h.

Function Documentation

  Boption* get_option_list (const char * use[], int argc, char * argv[], int & optind)

Parses command line arguments based on a template.

Parameters:
    *use[] usage list of strings, the template.
    argc number of command line arguments.
    *argv[] array of command line argument strings.
    &optind first argument after option list.

Returns:
    Boption* linked list of tag-value pairs.

    The usage list is parsed to find the desired option tag.
    Each option in the usage list must have the following format:
        -<tag> <value,value,...>
    The first character on the line must be '-', the tag may not
    extend beyond the 17'th character and the value must start
    before the 19'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.

Definition at line 40 of file options.cpp.

  double get_option_mass (Bstring & optarg)

Returns the adjusted mass based on the added character.

Parameters:
    &optarg mass with added character.

Returns:
    double adjusted mass.

Definition at line 175 of file options.cpp.

  int get_option_verbose (char * optarg)

Sets the verbose option.

Parameters:
    &optarg verbosity level.

Returns:
    int verbosity number, <0 on error.

    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

Definition at line 143 of file options.cpp.

  int get_option_verbose (Bstring & optarg)

Definition at line 149 of file options.cpp.

  int option_kill (Boption * option)

Deallocates a linked list of option structures.

Parameters:
    *option linked list of tag-value pairs.

Returns:
    int 0.

Definition at line 109 of file options.cpp.

Variable Documentation

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.