|
cli20 0.1.2
A C++20 typed-schema command-line parser
|
Terminal actions that write the converted (and validated) value into argument storage. More...
Classes | |
| struct | SetTrue |
| Sets the bool storage to true. More... | |
| struct | SetFalse |
| Sets the bool storage to false. More... | |
| struct | Toggle |
| Flips the bool storage each time the option is seen. More... | |
| struct | Increment |
| Increments a std::size_t counter each time the option is seen. More... | |
| struct | RejectDuplicate |
| Passes the value through unchanged, but returns ErrorCode::duplicate_argument if the option has been seen more than once. More... | |
| struct | SetOnce |
| Stores the input value and rejects subsequent occurrences. More... | |
| struct | PushUnique |
| Appends the value to a std::vector<T>, rejecting duplicate values. More... | |
| struct | Push |
| Appends the value to a std::vector<T>. More... | |
| struct | Insert |
| Inserts the value into a std::set<T> (duplicates are silently ignored by the set). More... | |
| struct | InsertOrAssign |
| struct | Extend |
| struct | MarkPresent |
| Sets a bool flag to true when the option is seen, regardless of value. More... | |
| struct | StoreInto |
| Writes the value directly into an external variable via a T* pointer. More... | |
| struct | Callback |
| Invokes a compile-time callable Fn with the parsed value as a terminal action. More... | |
Concepts | |
| concept | CallbackInvocable |
Variables | |
| constexpr auto | set_true = Action<SetTrue{}>{} |
| constexpr auto | set_false = Action<SetFalse{}>{} |
| constexpr auto | toggle = Action<Toggle{}>{} |
| constexpr auto | increment = Action<Increment{}>{} |
| constexpr auto | set_once = Action<SetOnce{}>{} |
| constexpr auto | reject_duplicate = Action<RejectDuplicate{}>{} |
| constexpr auto | push_unique = Action<PushUnique{}>{} |
| constexpr auto | push = Action<Push{}>{} |
| constexpr auto | insert = Action<Insert{}>{} |
| constexpr auto | insert_or_assign = Action<InsertOrAssign{}>{} |
| constexpr auto | mark_present = Action<MarkPresent{}>{} |
| template<auto Fn> | |
| constexpr auto | callback = Action<Callback<Fn>{}>{} |
| template<class T> | |
| constexpr auto | write_to = Action<StoreInto<T>{}>{} |
Terminal actions that write the converted (and validated) value into argument storage.
Pack actions are always the last step in an action pipeline. They define the storage_type alias that determines the type of the field's .value() member.
Example:
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |