class basic_option

Declaration

template <class Char>
class basic_option { /* full declaration omitted */ };

Description

Option found in input source. Contains a key and a value. The key, in turn, can be a string (name of an option), or an integer (position in input source) \ -- in case no name is specified. The latter is only possible for command line. The template parameter specifies the type of char used for storing the option's value.

Declared at: libs/pika/program_options/include/pika/program_options/option.hpp:24

Member Variables

public std::string string_key
String key of this option. Intentionally independent of the template parameter.
public int position_key
Position key of this option. All options without an explicit name are sequentially numbered starting from 0. If an option has explicit name, 'position_key' is equal to -1. It is possible that both position_key and string_key is specified, in case name is implicitly added.
public std::vector<std::basic_string<Char>> value
Option's value
public std::vector<std::basic_string<Char>> original_tokens
The original unchanged tokens this option was created from.
public bool unregistered
True if option was not recognized. In that case, 'string_key' and 'value' are results of purely syntactic parsing of source. The original tokens can be recovered from the "original_tokens" member.
public bool case_insensitive
True if string_key has to be handled case insensitive.

Method Overview

Methods

basic_option<Char>()

Declared at: libs/pika/program_options/include/pika/program_options/option.hpp:27

basic_option<Char>(
    const std::string& xstring_key,
    const std::vector<std::string>& xvalue)

Declared at: libs/pika/program_options/include/pika/program_options/option.hpp:33

Parameters

const std::string& xstring_key
const std::vector<std::string>& xvalue