#include <command_line.h>
Definition at line 56 of file command_line.h.
◆ CommandLine() [1/4]
| fml::CommandLine::CommandLine |
( |
| ) |
|
|
default |
◆ CommandLine() [2/4]
| fml::CommandLine::CommandLine |
( |
const CommandLine & |
from | ) |
|
|
default |
◆ CommandLine() [3/4]
◆ CommandLine() [4/4]
| fml::CommandLine::CommandLine |
( |
const std::string & |
argv0, |
|
|
const std::vector< Option > & |
options, |
|
|
const std::vector< std::string > & |
positional_args |
|
) |
| |
|
explicit |
Definition at line 22 of file command_line.cc.
25 : has_argv0_(true),
29 for (
size_t i = 0;
i < options_.size();
i++) {
30 option_index_[options_[
i].name] =
i;
31 }
32}
const std::string & argv0() const
const std::vector< Option > & options() const
const std::vector< std::string > & positional_args() const
References i.
◆ ~CommandLine()
| fml::CommandLine::~CommandLine |
( |
| ) |
|
|
default |
◆ argv0()
| const std::string & fml::CommandLine::argv0 |
( |
| ) |
const |
|
inline |
◆ GetOptionValue()
| bool fml::CommandLine::GetOptionValue |
( |
std::string_view |
name, |
|
|
std::string * |
value |
|
) |
| const |
◆ GetOptionValues()
| std::vector< std::string_view > fml::CommandLine::GetOptionValues |
( |
std::string_view |
name | ) |
const |
◆ GetOptionValueWithDefault()
| std::string fml::CommandLine::GetOptionValueWithDefault |
( |
std::string_view |
name, |
|
|
std::string_view |
default_value |
|
) |
| const |
◆ has_argv0()
| bool fml::CommandLine::has_argv0 |
( |
| ) |
const |
|
inline |
◆ HasOption()
| bool fml::CommandLine::HasOption |
( |
std::string_view |
name, |
|
|
size_t * |
index = nullptr |
|
) |
| const |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ operator==()
| bool fml::CommandLine::operator== |
( |
const CommandLine & |
other | ) |
const |
|
inline |
Definition at line 99 of file command_line.h.
99 {
100
101 return has_argv0_ == other.has_argv0_ && argv0_ == other.argv0_ &&
102 options_ == other.options_ &&
103 positional_args_ == other.positional_args_;
104 }
◆ options()
| const std::vector< Option > & fml::CommandLine::options |
( |
| ) |
const |
|
inline |
◆ positional_args()
| const std::vector< std::string > & fml::CommandLine::positional_args |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: