|
| | program_args () noexcept=default |
| | Default constructor. More...
|
| |
|
| program_args (span_size_t argn, char **args) noexcept |
| | Construction from the length and pointer to the argument list.
|
| |
|
| program_args (span_size_t argn, const char **args) noexcept |
| | Construction from the length and const pointer to the argument list.
|
| |
|
auto | argc () const noexcept -> int |
| | Returns the number of arguments.
|
| |
|
auto | argv () const noexcept -> const char ** |
| | Returns a pointer to tha list of argument C-strings.
|
| |
|
auto | empty () const noexcept -> bool |
| | Indicates if the argument list is completely empty.
|
| |
|
auto | none () const noexcept -> bool |
| | Indicates if the argument list does not contain any arguments.
|
| |
|
auto | size () const noexcept -> int |
| | Returns the count of arguments (counting in the command name)
|
| |
|
auto | is_valid (const valid_index &pos) const noexcept -> bool |
| | Tests if the specified index references a command line argument.
|
| |
| auto | get (const valid_index &pos) const noexcept -> value_type |
| | Returns the command line argument value at the specified position. More...
|
| |
| auto | operator[] (const valid_index &pos) const noexcept -> value_type |
| | Returns the command line argument value at the specified position. More...
|
| |
|
auto | command () const noexcept -> value_type |
| | Returns the command name.
|
| |
|
auto | first () const noexcept -> program_arg |
| | Returns first argument.
|
| |
|
auto | begin () const noexcept -> iterator |
| | Returns an iterator to the first argument (not the command name).
|
| |
|
auto | end () const noexcept -> iterator |
| | Returns an iterator past the last argument.
|
| |
|
auto | find (string_view what) const noexcept -> program_arg |
| | Finds and returns the argument with the specified value.
|
| |
|
template<typename T > |
| auto | parse_param (program_parameter< T > ¶m, std::ostream &errlog) const -> bool |
| | Parses the specified parameter, using errlog for error output.
|
| |
Class wrapping the main function arguments, providing a convenient API.
- Examples
- eagine/bindump.cpp, eagine/shape_topology.cpp, and eagine/sudoku_solver.cpp.