tag::reference[] [#lyra_command_ctor] == Construction [source] ---- command::command(const std::string & n); command::command( const std::string & n, const std::function & f); ---- To construct an `command` we need a name (`n`) that matches, and triggers, that command. end::reference[] */
| 146 | |
| 147 | end::reference[] */ |
| 148 | inline command::command(const std::string & n) |
| 149 | { |
| 150 | this->sequential() |
| 151 | .add_argument(literal(n)) |
| 152 | .add_argument(group().required()); |
| 153 | } |
| 154 | inline command::command( |
| 155 | const std::string & n, const std::function<void(const group &)> & f) |
| 156 | : group(f) |