| 3909 | } |
| 3910 | |
| 3911 | void show_help() const |
| 3912 | { |
| 3913 | int width = 1; |
| 3914 | for (const auto& [arg, opt] : allowed) |
| 3915 | width = std::max(width, static_cast<int>(arg.size())); |
| 3916 | logln("\nAvailable options (all are on/off and default to off):"); |
| 3917 | for (const auto& [arg, opt] : allowed) |
| 3918 | logln(" ", std::left, std::setw(width), arg, " ", opt.desc); |
| 3919 | log("If no options are entered, the default is:\n "); |
| 3920 | for (const auto& [arg, opt] : allowed) |
| 3921 | { |
| 3922 | if (opt.def) |
| 3923 | log(arg, " "); |
| 3924 | } |
| 3925 | logln(); |
| 3926 | } |
| 3927 | |
| 3928 | /** |
| 3929 | * @brief Get the number of command line arguments. |