diff --git a/LICENSE b/LICENSE index ee8316a..182f150 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2024-2025 yyc12345 +Copyright (c) 2024-2026 yyc12345 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/doc/src/enum_helper.dox b/doc/src/cenum.dox similarity index 51% rename from doc/src/enum_helper.dox rename to doc/src/cenum.dox index 82ea6a9..6a62006 100644 --- a/doc/src/enum_helper.dox +++ b/doc/src/cenum.dox @@ -1,35 +1,37 @@ -namespace YYCC::EnumHelper { +namespace yycc::cenum { /** -\page enum_helper Scoped Enum Helper +\page cenum Scoped Enum Helper -\section enum_helper__intro Intro +\section cenum__intro Intro C++ introduce a new enum called scoped enum. It is better than legacy C enum because it will not leak name into namespace where it locate, and also can specify an underlying type to it to make sure it is stored as specified size. However, the shortcoming of it is that it lack bitwise operator comparing with legacy C enum. -Programmer must implement them for scoped enum one by one. -It is a hardship and inconvenient. -This is the reason why I invent this class +Programmer must implement them for scoped enum one by one but it is a hardship and inconvenient. +This is the reason why I invent this class. +And this is the reason why I call this module "cenum" +because it gives scoped enum type with the same abilities of legacy C enum. -\section enum_helper__Usage Usage +\section cenum__Usage Usage In this namespace, we provide all bitwise functions related to scoped enum type which may be used. -See YYCC::EnumHelper for more detail (It is more clear to read function annotation than I introduce in there repeatedly). +See yycc::cenum for more detail (It is more clear to read function annotation than I introduce in there repeatedly). -\section enum_helper__why Why not Operator Overload +\section cenum__why Why not Operator Overload Way I have try it (and you even can see the relic of it in source code). But it need a extra statement written in following to include it, otherwise compiler can not see it. \code -using namespace YYCC::EnumHelper; +using namespace yycc::cenum; \endcode -Another reason why I do not use this method is that +The last and most important reason why I do not use this method is that this overload strategy may be applied to some type which should not be applied by accient, such as non-scoped enum type. So I gave up this solution. +It is much better that order user explicitly specify when to use them. */ } \ No newline at end of file diff --git a/doc/src/index.dox b/doc/src/index.dox index dfd44cd..98e88b9 100644 --- a/doc/src/index.dox +++ b/doc/src/index.dox @@ -10,7 +10,7 @@