17namespace kaycxx::cli {
22 std::optional<std::string_view>
version = std::nullopt;
28 std::optional<std::string_view>
author = std::nullopt;
31 std::optional<std::string_view>
email = std::nullopt;
34 std::optional<std::string_view>
bugs = std::nullopt;
37 std::optional<std::string_view>
copyright = std::nullopt;
40 std::optional<std::string_view>
license = std::nullopt;
81 [[nodiscard]] std::optional<std::string>
const&
version() const noexcept;
88 [[nodiscard]] std::optional<std::
string> const&
author() const noexcept;
95 [[nodiscard]] std::optional<std::
string> const&
email() const noexcept;
102 [[nodiscard]] std::optional<std::
string> const&
bugs() const noexcept;
109 [[nodiscard]] std::optional<std::
string> const&
copyright() const noexcept;
116 [[nodiscard]] std::optional<std::
string> const&
license() const noexcept;
133 [[nodiscard]]
app const& root() const noexcept override;
136 std::optional<std::
string> version_;
139 std::optional<std::
string> author_;
142 std::optional<std::
string> email_;
145 std::optional<std::
string> bugs_;
148 std::optional<std::
string> copyright_;
151 std::optional<std::
string> license_;
Defines and parses a command-line application.
Definition app.hpp:50
std::optional< std::string > const & license() const noexcept
Returns the configured license text.
app(app &&other) noexcept
Moves a command-line application.
std::optional< std::string > const & version() const noexcept
Returns the configured application version.
std::optional< std::string > const & email() const noexcept
Returns the configured author email address.
std::optional< std::string > const & author() const noexcept
Returns the configured author name.
std::optional< std::string > const & bugs() const noexcept
Returns the configured bug-report destination.
app(app const &)=delete
Prevents copying applications.
~app() override=default
Destroys the application and all definitions owned by it.
app(std::string_view name, app_options options=app_options{})
Creates a command-line application.
std::optional< std::string > const & copyright() const noexcept
Returns the configured copyright notice.
app & operator=(app const &)=delete
Prevents copy-assigning applications.
Handle for a registered command.
Definition command_handle.hpp:25
Common base class for an application and its commands.
Definition command.hpp:45
std::string const & name() const noexcept
Returns the command name.
std::optional< std::string > const & description() const noexcept
Returns this command's configured description.
Defines the common command base class.
Optional application metadata.
Definition app.hpp:20
std::optional< std::string_view > version
Application version string used by version output.
Definition app.hpp:22
std::optional< std::string_view > description
Short application description used by generated help output.
Definition app.hpp:25
std::optional< std::string_view > email
Author contact address used by generated version output.
Definition app.hpp:31
std::optional< std::string_view > author
Author name used by generated version output.
Definition app.hpp:28
std::optional< std::string_view > license
License text used by generated version output.
Definition app.hpp:40
std::optional< std::string_view > copyright
Copyright notice used by generated version output.
Definition app.hpp:37
std::optional< std::string_view > bugs
Email address or website URL to which to report bugs to.
Definition app.hpp:34