|
C++ Essence Library 0.1.0
A Utility Library for Modern C++ Programming
|
A CLI option, i.e. –xxx=yyy. More...
#include <option.hpp>
Public Member Functions | |
|
template<typename T > requires (!std::same_as<std::decay_t<T>, option>) | |
| option (T &&value) | |
| abi::string | bound_name () const |
| const option & | set_bound_name (std::string_view name) const |
| abi::string | description () const |
| const option & | set_description (std::string_view description) const |
| std::span< const abi::string > | aliases () const |
| const option & | add_aliases (std::span< const abi::string > aliases) const |
| std::optional< abi::string > | default_value_str () const |
| std::span< const abi::string > | valid_value_strs () const |
| abi::string | name_hints () const |
| abi::string | value_hints () const |
| bool | check_target_type (meta::fingerprint id) const |
| bool | parse_value_and_cache (std::string_view value) const |
| void | validate (std::string_view value, validation_result &result) const |
| void | raise_error (std::string_view message) const |
| void * | underlying_ptr () const noexcept |
| void | on_validation (const validation_handler &handler) const |
| void | on_error (const output_handler &handler) const |
| template<std::convertible_to< std::string_view >... Args> | |
| const option & | add_aliases (Args &&... args) const |
| template<typename T > | |
| void | set_target_from_cache (T &target) const |
A CLI option, i.e. –xxx=yyy.
| T | The data type of the option. |