--- PRINT HELP --- Prints out the application description, usage and available options.
| 174 | // --- PRINT HELP --- |
| 175 | // Prints out the application description, usage and available options. |
| 176 | void Sarge::printHelp() { |
| 177 | std::cout << std::endl << description << std::endl; |
| 178 | std::cout << std::endl << "Usage:" << std::endl; |
| 179 | std::cout << "\t" << usage << std::endl; |
| 180 | std::cout << std::endl; |
| 181 | std::cout << "Options: " << std::endl; |
| 182 | |
| 183 | // Print out the options. |
| 184 | std::vector<std::unique_ptr<Argument> >::const_iterator it; |
| 185 | for (it = args.cbegin(); it != args.cend(); ++it) { |
| 186 | std::cout << "-" << (*it)->arg_short << "\t--" << (*it)->arg_long << "\t\t" << (*it)->description << std::endl; |
| 187 | } |
| 188 | } |