cpp-project-template
0.0.1.0
C++ Project Template
Toggle main menu visibility
Loading...
Searching...
No Matches
UserOpt.hpp
Go to the documentation of this file.
1
6
7
#ifndef CPP_PROJ_USEROPT_HPP
8
#define CPP_PROJ_USEROPT_HPP
9
10
#include <span>
11
#include <string_view>
12
16
namespace
cpp_proj
17
{
18
23
inline
std::string_view
24
progName
;
// NOLINT: Yes, I know that global variables should
25
// be constant (whenever possible) and carefully used.
26
// In this case it should be fine.
27
33
void
parseUserOptions
(
const
std::span<char*>& args);
34
38
void
printHelp
();
42
void
printVersion
();
46
[[noreturn]]
void
printHelpAndExit
();
50
[[noreturn]]
void
printVersionAndExit
();
51
52
}
// namespace cpp_proj
53
54
#endif
cpp_proj
Namespace for this application.
Definition
UserOpt.cpp:12
cpp_proj::progName
std::string_view progName
This application's executable name, to be set at the start of the main function.
Definition
UserOpt.hpp:24
cpp_proj::printHelp
void printHelp()
Print the usage of the application.
Definition
UserOpt.cpp:14
cpp_proj::printVersionAndExit
void printVersionAndExit()
Calls cpp_proj::printVersion and exits with success.
Definition
UserOpt.cpp:37
cpp_proj::parseUserOptions
void parseUserOptions(const std::span< char * > &args)
Gets the user options from the command line.
Definition
UserOpt.cpp:43
cpp_proj::printHelpAndExit
void printHelpAndExit()
Calls cpp_proj::printHelp and exits with success.
Definition
UserOpt.cpp:31
cpp_proj::printVersion
void printVersion()
Print the version of the application.
Definition
UserOpt.cpp:22
src
projectcli
UserOpt.hpp
Generated by
1.18.0