Skip to content
  • Christopher Subich's avatar
    Add vector-valued options to the config file · 770804ec
    Christopher Subich authored
    This change modifeis Options.hpp to add the possibility of
    vector-valued options to the config file and command line.
    From the 'case' code, this option is used by (for example)
    
    std::vector<int> intvec;
    add_option("Name",&intvec,"Description);
    
    When run, options of the form --Name 1 2 3 4 (at the command
    line) or Name = 1 2 3 4 (in the config file) will be added
    to the vector 'intvec' as separate entries.
    
    Because add_option is a template function, this works
    identically for double (floating point)-valued options.  It
    has not been tested with string options.
    
    Since an empty vector is a perfectly cromulent and
    unambiguous possibility, vector-valued options do *not*
    permit the specification of defaults.
    770804ec