1
0
Files
YYCCommonplace/src/yycc/carton/clap/summary.hpp

52 lines
1.7 KiB
C++
Raw Normal View History

#pragma once
#include "../../macro/class_copy_move.hpp"
#include <string>
#include <string_view>
namespace yycc::carton::clap::summary {
2025-10-02 18:19:11 +08:00
2025-12-23 13:59:14 +08:00
/// @brief Represents summary information for a command line application.
class Summary {
public:
2025-12-23 13:59:14 +08:00
/**
* @brief Constructs a new Summary object with the specified parameters.
* @param[in] name The name of the application
* @param[in] author The author of the application
* @param[in] version The version of the application
* @param[in] description A description of the application's purpose
*/
Summary(const std::u8string_view& name,
const std::u8string_view& author,
const std::u8string_view& version,
const std::u8string_view& description);
~Summary();
YYCC_DEFAULT_COPY_MOVE(Summary)
public:
2025-12-23 13:59:14 +08:00
/**
* @brief Gets the name of the application.
* @return The application's name as a string view
*/
std::u8string_view get_name() const;
2025-12-23 13:59:14 +08:00
/**
* @brief Gets the author of the application.
* @return The application's author as a string view
*/
std::u8string_view get_author() const;
2025-12-23 13:59:14 +08:00
/**
* @brief Gets the version of the application.
* @return The application's version as a string view
*/
std::u8string_view get_version() const;
2025-12-23 13:59:14 +08:00
/**
* @brief Gets the description of the application.
* @return The application's description as a string view
*/
std::u8string_view get_description() const;
private:
2025-10-02 18:19:11 +08:00
std::u8string name, author, version, description;
};
2025-10-02 18:19:11 +08:00
} // namespace yycc::carton::clap::summary