Skip to content

Commit d19b86a

Browse files
committed
@brief -> ""
1 parent cb571c4 commit d19b86a

94 files changed

Lines changed: 780 additions & 402 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ file(
2222
*.cpp
2323
)
2424

25+
if(WIN32)
26+
set(platform_suffix win32)
27+
elseif(APPLE)
28+
set(platform_suffix macos)
29+
elseif(UNIX)
30+
set(platform_suffix linux)
31+
else()
32+
message(FATAL_ERROR "Unsupported platform.")
33+
endif()
34+
2535
macro(es_filter_sources pattern)
2636
list(
2737
FILTER private_sources

src/argb_color.ixx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import std;
2525

2626
export namespace essence {
2727
/**
28-
* @brief Describes a ARGB color.
28+
* Describes a ARGB color.
2929
*/
3030
struct alignas(std::uint32_t) argb_color {
3131
std::uint8_t r{};
@@ -34,15 +34,15 @@ export namespace essence {
3434
std::uint8_t alpha{0xFF};
3535

3636
/**
37-
* @brief Converts a 32-bit unsigned integer.
37+
* Converts a 32-bit unsigned integer.
3838
*/
3939
constexpr explicit operator std::uint32_t() const noexcept {
4040
return (static_cast<std::uint32_t>(alpha) << 24) + (static_cast<std::uint32_t>(b) << 16)
4141
+ (static_cast<std::uint32_t>(g) << 8) + r;
4242
}
4343

4444
/**
45-
* @brief Normalizes the data to a new range.
45+
* Normalizes the data to a new range.
4646
* @tparam T The type of the data in the new range.
4747
* @param min The lower bound.
4848
* @param max The upper bound.
@@ -67,7 +67,7 @@ export namespace essence {
6767
};
6868

6969
/**
70-
* @brief Constructs an ARGB color from a 32-bit unsigned integer.
70+
* Constructs an ARGB color from a 32-bit unsigned integer.
7171
* @param color The color in a 32-bit unsigned integer.
7272
* @return ARGB color.
7373
*/
@@ -81,7 +81,7 @@ export namespace essence {
8181
}
8282

8383
/**
84-
* @brief Common predefined colors.
84+
* Common predefined colors.
8585
* @remark http://www.flounder.com/csharp_color_table.htm
8686
*/
8787
struct argb_colors {

src/boolean.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import std;
2525

2626
export namespace essence {
2727
/**
28-
* @brief Converts a value to a boolean with a non-boolean-convertible value to be true.
28+
* Converts a value to a boolean with a non-boolean-convertible value to be true.
2929
* @tparam T The type of the value.
3030
* @param value The value.
3131
* @return The boolean.

src/cli/abstract/option.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import std;
3131

3232
export namespace essence::cli::abstract {
3333
/**
34-
* @brief A CLI option, i.e. --xxx=yyy.
34+
* A CLI option, i.e. --xxx=yyy.
3535
* @tparam T The data type of the option.
3636
*/
3737
class option {

src/cli/arg_parser.ixx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,87 +34,87 @@ import std;
3434

3535
export namespace essence::cli {
3636
/**
37-
* @brief A parser to handle the command line arguments.
37+
* A parser to handle the command line arguments.
3838
*/
3939
class arg_parser {
4040
public:
4141
using parse_result_type = abi::map<abi::string, option_result, std::less<>>;
4242

4343
/**
44-
* @brief Creates an instance.
44+
* Creates an instance.
4545
*/
4646
ES_API(CPPESSENCE) arg_parser();
4747
ES_API(CPPESSENCE) arg_parser(arg_parser&&) noexcept;
4848
ES_API(CPPESSENCE) ~arg_parser();
4949
ES_API(CPPESSENCE) arg_parser& operator=(arg_parser&&) noexcept;
5050

5151
/**
52-
* @brief Checks whether the previous parsing operation succeeds.
52+
* Checks whether the previous parsing operation succeeds.
5353
* @return True if succeeds; otherwise false.
5454
*/
5555
ES_API(CPPESSENCE) explicit operator bool() const noexcept;
5656

5757
/**
58-
* @brief Gets the added options.
58+
* Gets the added options.
5959
* @return The added options.
6060
*/
6161
[[nodiscard]] ES_API(CPPESSENCE) std::span<const abstract::option> options() const noexcept;
6262

6363
/**
64-
* @brief Gets the cached result after parsing.
64+
* Gets the cached result after parsing.
6565
* @return The cached result as a map, or an empty map if not exists.
6666
*/
6767
[[nodiscard]] ES_API(CPPESSENCE) const parse_result_type& cached_result() const noexcept;
6868

6969
/**
70-
* @brief Gets the unmatched arguments after parsing.
70+
* Gets the unmatched arguments after parsing.
7171
* @return The unmatched arguments.
7272
*/
7373
[[nodiscard]] ES_API(CPPESSENCE) std::span<const abi::string> unmatched_args() const noexcept;
7474

7575
/**
76-
* @brief Adds a new option.
76+
* Adds a new option.
7777
* @param option The CLI option.
7878
*/
7979
ES_API(CPPESSENCE) void add_option(abstract::option option) const; // NOLINT(*-use-nodiscard)
8080

8181
/**
82-
* @brief Parses the startup command line arguments.
82+
* Parses the startup command line arguments.
8383
*/
8484
ES_API(CPPESSENCE) void parse() const;
8585

8686
/**
87-
* @brief Parses the input command line arguments.
87+
* Parses the input command line arguments.
8888
* @param argc The count of the arguments.
8989
* @param argv The array of the arguments.
9090
*/
9191
ES_API(CPPESSENCE) void parse(std::int32_t argc, char* argv[]) const;
9292

9393
/**
94-
* @brief Parses the input command line arguments.
94+
* Parses the input command line arguments.
9595
* @param args The arguments.
9696
*/
9797
ES_API(CPPESSENCE) void parse(std::span<const abi::string> args) const;
9898

9999
/**
100-
* @brief Prints the help string.
100+
* Prints the help string.
101101
*/
102102
ES_API(CPPESSENCE) void show_help() const;
103103

104104
/**
105-
* @brief Subscribes an event to be invoked when an error occurs.
105+
* Subscribes an event to be invoked when an error occurs.
106106
* @param handler The handler.
107107
*/
108108
ES_API(CPPESSENCE) void on_error(const output_handler& handler) const;
109109

110110
/**
111-
* @brief Subscribes an event to be invoked when a normal output is ready.
111+
* Subscribes an event to be invoked when a normal output is ready.
112112
* @param handler The handler.
113113
*/
114114
ES_API(CPPESSENCE) void on_output(const output_handler& handler) const;
115115

116116
/**
117-
* @brief Fill a data model with the parsed result.
117+
* Fill a data model with the parsed result.
118118
* @tparam T The type of the model.
119119
* @return The filled model.
120120
*/

src/cli/common_types.ixx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import std;
2525

2626
export namespace essence::cli {
2727
/**
28-
* @brief A handler to provide a message to be output to the console or any other target.
28+
* A handler to provide a message to be output to the console or any other target.
2929
*/
3030
using output_handler = std::function<void(std::string_view message)>;
3131
} // namespace essence::cli

src/cli/option.ixx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ import std;
3434

3535
export namespace essence::cli {
3636
/**
37-
* @brief Creates a base internal implementation of a CLI option class.
37+
* Creates a base internal implementation of a CLI option class.
3838
* @return The base implementation.
3939
*/
4040
ES_API(CPPESSENCE) abstract::option make_base_option();
4141

4242
/**
43-
* @brief A CLI option, i.e. --xxx=yyy.
43+
* A CLI option, i.e. --xxx=yyy.
4444
* @tparam T The data type of the option.
4545
*/
4646
template <std::default_initializable T>
@@ -58,7 +58,7 @@ export namespace essence::cli {
5858
static constexpr meta::fingerprint type_id{std::type_identity<T>{}};
5959

6060
/**
61-
* @brief Creates an instance.
61+
* Creates an instance.
6262
*/
6363
option() : base_{make_base_option()} {
6464
// Makes default values for an enumeration.

src/cli/option_result.ixx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ import std;
2828

2929
export namespace essence::cli {
3030
/**
31-
* @brief The raw parsed result of a CLI option.
31+
* The raw parsed result of a CLI option.
3232
*/
3333
struct option_result {
3434
/**
35-
* @brief The corresponding CLI option.
35+
* The corresponding CLI option.
3636
*/
3737
abstract::option option;
3838

3939
/**
40-
* @brief The raw parsed value.
40+
* The raw parsed value.
4141
*/
4242
std::optional<abi::string> raw_value;
4343
};

src/cli/validation_result.ixx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ import std;
2626

2727
export namespace essence::cli {
2828
/**
29-
* @brief The validation result from parsing a CLI option.
29+
* The validation result from parsing a CLI option.
3030
*/
3131
struct validation_result {
3232
/**
33-
* @brief Whether the validation succeeds.
33+
* Whether the validation succeeds.
3434
*/
3535
bool success{true};
3636

3737
/**
38-
* @brief The error message.
38+
* The error message.
3939
*/
4040
abi::string error;
4141
};

src/crypto/abstract/chunk_processor.ixx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import std;
2626

2727
export namespace essence::crypto::abstract {
2828
/**
29-
* @brief Provides a uniform interface for processing crypto chunks.
29+
* Provides a uniform interface for processing crypto chunks.
3030
* @remark This interface always keeps uniquely referenced.
3131
*/
3232
class chunk_processor {
@@ -36,39 +36,39 @@ export namespace essence::crypto::abstract {
3636
explicit chunk_processor(T&& value) : wrapper_{std::make_unique<wrapper<T>>(std::forward<T>(value))} {}
3737

3838
/**
39-
* @brief Indicates whether this is a forward transformer.
39+
* Indicates whether this is a forward transformer.
4040
* @return True if this is a forward transformer; false if an inverse transformer.
4141
*/
4242
[[nodiscard]] bool transformer() const {
4343
return wrapper_->transformer();
4444
}
4545

4646
/**
47-
* @brief Gets the name of the cipher.
47+
* Gets the name of the cipher.
4848
* @return The name of the cipher.
4949
*/
5050
[[nodiscard]] abi::string cipher_name() const {
5151
return wrapper_->cipher_name();
5252
}
5353

5454
/**
55-
* @brief Gets the size of the input buffer.
55+
* Gets the size of the input buffer.
5656
* @return The size of the input buffer.
5757
*/
5858
[[nodiscard]] std::size_t buffer_size() const {
5959
return wrapper_->buffer_size();
6060
}
6161

6262
/**
63-
* @brief Gets the extra size of the output buffer.
63+
* Gets the extra size of the output buffer.
6464
* @return The extra size of the output buffer.
6565
*/
6666
[[nodiscard]] std::size_t extra_size() const {
6767
return wrapper_->extra_size();
6868
}
6969

7070
/**
71-
* @brief Gets the factor to be multiplied to the input buffer size and the result is the size of the output
71+
* Gets the factor to be multiplied to the input buffer size and the result is the size of the output
7272
* buffer.
7373
* @return The factor described as a rational number.
7474
*/
@@ -77,14 +77,14 @@ export namespace essence::crypto::abstract {
7777
}
7878

7979
/**
80-
* @brief Initializes the processor.
80+
* Initializes the processor.
8181
*/
8282
void init() const {
8383
wrapper_->init();
8484
}
8585

8686
/**
87-
* @brief Processes a memory chunk.
87+
* Processes a memory chunk.
8888
* @param input The input chunk.
8989
* @param output The output chunk, which may be replaced with a subspan of the given span.
9090
*/
@@ -93,7 +93,7 @@ export namespace essence::crypto::abstract {
9393
}
9494

9595
/**
96-
* @brief Gets the final chunk.
96+
* Gets the final chunk.
9797
* @param output The output chunk, which may be replaced with a subspan of the given span.
9898
*/
9999
void finalize(std::span<std::byte>& output) const {

0 commit comments

Comments
 (0)