Commit Graph
100 Commits
Author SHA1 Message Date
yyc12345 ce3d5b9556 feat: finish basic of manual in clap 2025-09-25 15:52:28 +08:00
yyc12345 c8d763bdcf feat: add utf8 format
- move utf8 stream and format patch from string to patch namespace.
- add ordinay format alias and utf8 format in our format patch.
- add char8_t and char inter-cast in string reinterpret namespace.
- fix bug of utf8 formatter.
- add test for utf8 format.
2025-09-25 15:29:55 +08:00
yyc12345 a61955bb09 feat: finish summary and application for clap.
- finish summary and application for clap.
- add patch for utf8 string in std::format.
2025-09-24 16:20:21 +08:00
yyc12345 776adb0c96 feat: finish option and variable in clap 2025-09-23 16:13:52 +08:00
yyc12345 c85830902b fix: change the behavior of printf in string op.
- add compiler hint for checking the arguments of printf.
- change the return value of printf. from std::expected to normal value. use C++ exception to indicate error.
	* the error of printf usually caused by programmer. so it can be found when testing program.
	* so i use std::logic_error to indicate this and programmer should fix this before releasing program.
- change the use of encoding convertion. for those cases that convertion must be safe, we unwrap it directly.
2025-09-22 22:21:25 +08:00
yyc12345 45e4031b5c refactor: finish ironpad migration
- finish ironpad migration but no test because it is not easy to test.
2025-09-18 16:04:41 +08:00
yyc12345 ccd0219ead refactor: migrate console helper.
- migrate csharp style console helper.
- i just do a simple migration and mark it as deprecated. it should works like 1.x version.
2025-08-22 23:28:17 +08:00
yyc12345 4bfba6f243 feat: add windows-spec console patch 2025-08-22 21:51:32 +08:00
yyc12345 9e994dd4f0 refactor: bring utf8 patch for std::ostream back. 2025-08-22 21:28:29 +08:00
yyc12345 d6034f8cb0 fix: fix minor issue of testbench
- fix testbench minor issue.
- delete migrated source code files.
2025-08-22 21:09:57 +08:00
yyc12345 0694d923f3 test: finish testbench for tabulate 2025-08-21 14:32:51 +08:00
yyc12345 580b096cb3 fix: fix bug for windows dialog 2025-08-21 11:00:33 +08:00
yyc12345 f9365481b9 fix: fix all build issue of dialog namespace but not test. 2025-08-21 10:26:28 +08:00
yyc12345 15aade052f refactor: expand ugly statement from while statement header to body. 2025-08-20 19:32:44 +08:00
yyc12345 050bed400d doc: update doc 2025-08-20 14:29:41 +08:00
yyc12345 244e39c4d1 revert: remove stacktrace feature for rust panic.
- remove stacktrace feature for rust panic function due to not all STL are ready for this.
- add more os type in CMake file.
- add lost header in fopen.
2025-08-19 21:47:21 +08:00
yyc12345 d52630ac5c feat: add tabulate but no test. 2025-08-19 20:53:51 +08:00
yyc12345 a76f10722d fix: fix todos waiting termcolor. 2025-08-19 13:58:05 +08:00
yyc12345 8a72e6a655 feat: add termcolor in carton.
- add termcolor and its testbench
- add integer() in flag_enum and update its testbench according to the requirements in termcolor.
2025-08-19 13:50:51 +08:00
yyc12345 dfc0c127c5 test: add testbench for macro namespace 2025-08-15 16:55:39 +08:00
yyc12345 2f11ba6023 feat: add new package wcwidth
- add wcwidth in carton.
- order clang-format do not format some generated content.
2025-08-15 16:42:28 +08:00
yyc12345 00c8f09907 doc: start to refactor doc 2025-08-14 21:33:17 +08:00
yyc12345 734cd01da8 feat: add Rust env namespace 2025-08-14 20:17:02 +08:00
yyc12345 bdeaea294f refactor: migrate windows specific content.
- move com, dialog and winfct function into new place.
- add testbench for com and winfct.
- dialog now still not working.
2025-08-13 15:29:47 +08:00
yyc12345 ff8c7d04cc fix: fix utf convertion issue under MSVC 2025-08-13 10:49:35 +08:00
yyc12345 0ab470367c fix: fix safe num overflow ops issue under MSVC 2025-08-13 09:51:40 +08:00
yyc12345 c4d441f5fa fix: fix pycodec MSVC error 2025-08-13 09:36:21 +08:00
yyc12345 f8a696b4e8 fix: fix MSVC __VA_OPT__ error 2025-08-13 09:24:19 +08:00
yyc12345 f65eff6edf fix: replace find with contains in constraint builder
- remove useless old files.
2025-08-13 08:56:09 +08:00
yyc12345 8fcfa180b4 fix: fix unfinished u8 fopen.
- finish unfinished utf8 version fopen.
- add testbench for it.
2025-08-13 08:49:18 +08:00
yyc12345 e23a1346eb test: add testbench for pycodec 2025-08-12 19:47:24 +08:00
yyc12345 2576523dbb fix: use new way to manage iconv token.
- use new way to manage iconv token, instead of std::unique_ptr which cause template error (no viable sizeof) in pycodec.
- fix the wrong name in pycodec.
- remove useless code.
2025-08-12 19:40:23 +08:00
yyc12345 9ce52e8d4b feat: finish pycodec but has compile issue 2025-08-12 17:34:03 +08:00
yyc12345 7785773196 refactor: use new layout for YYCC 2025-08-12 16:32:59 +08:00
yyc12345 cfbc3c68e0 doc: add Doxygen comment 2025-08-12 16:15:00 +08:00
yyc12345 8dbe32cb8e fix: fix fatal error in encoding/iconv.
- fix the size of input data error (forget mul with the size of unit)
- fix the wrong code name for UTF16 and UTF32.
- fix wrong assign for `outbytesleft`.
2025-08-12 16:05:11 +08:00
yyc12345 664763afbb test: add testbench for stl, windows and iconv encoding 2025-08-12 13:05:35 +08:00
yyc12345 a34bab07c1 refactor: rename encoding/stlcvt to encoding/stl 2025-08-12 09:45:44 +08:00
yyc12345 51d288ac4b test: add testbench for num/safe_cast 2025-08-11 22:19:02 +08:00
yyc12345 20a9ef4166 fix: fix comment for new added files.
- translate zh-CN comment into en-US.
- change some comment into Doxygen style.
- add lost Doxygen comment.
- enrich the testbench for ceil_div.
- add lost metaprogramming functions for some files in macro namespace.
2025-08-11 21:57:42 +08:00
yyc12345 17540072d3 fix: change the find order in PyCodec.
- now PyCodec will try to use Iconv first.
- re-claim the meaning of YYCC_FEAT_ICONV macro.
2025-08-05 14:04:20 +08:00
yyc12345 fcac886f07 refactor: migrate rust-like ops.
- migrate rust-like ops.
- migrate testbench for them but not finished.
2025-08-05 13:53:59 +08:00
yyc12345 27baf2a080 refactor: refactor old IOHelper.
- move pointer left padding macro into single header file.
- move utf8 fopen into single header but not finished.
- add testbench for pointer left padding macro.
- add system pointer size detector according to new migrated features requested.
2025-08-05 10:54:15 +08:00
yyc12345 b9f81c16a0 refactor: refactor enum helper as flag enum.
- refactor enum helper.
- add testbench for it.
2025-08-04 22:31:37 +08:00
yyc12345 54134b342e test: add testbench for macro/versiom_cmp 2025-08-04 21:15:49 +08:00
yyc12345 ce2b411b0b refactor: continue refactor to make the project can be built 2025-07-31 22:25:14 +08:00
yyc12345 5372af79f8 refactor: finish iconv refactor 2025-07-25 11:06:22 +08:00
yyc12345 b79df0c65e refactor: continue refactor project from C++17 to 23 2025-07-25 10:49:07 +08:00
yyc12345 4f0b3d19d1 refactor: update C++ from 17 to 23 2025-07-25 09:35:26 +08:00
yyc12345 f014e54604 feat: update pycodec.
- rename encoding::utf to encoding::stlcvt.
- use uv to manage script and add pycodec generator script.
- update script in modern python.
- fix added pycodec generator.
2025-07-23 16:07:49 +08:00
yyc12345 821a592f02 feat: add various detector.
- add endian and compiler detector, and modify os detector.
- now we use CMake to add detector-used macro, instead of using some C++ features to detect them.
- change Windows environment detection according to the change of os detector.
2025-07-23 10:18:01 +08:00
yyc12345 6043609709 feat: finish windows encoding 2025-07-22 21:52:09 +08:00
yyc12345 53e8a77f47 feat: finish iconv module 2025-07-22 14:15:53 +08:00
yyc12345 6d44c7605b refactor: update encoding namespace
- add all essential functions prototypes in iconv encoding.
- add lost UTF convertion for windows encoding.
2025-07-21 20:36:26 +08:00
yyc12345 c2f6e29c36 feat: finish iconv kernel 2025-07-18 15:57:33 +08:00
yyc12345 c102964703 refactor: write iconv.
- write iconv encoding (not finished).
- rename united_codec to pycodec.
2025-07-15 16:17:59 +08:00
yyc12345 3605151caf refactor: finish Windows encoding namespace.
- finish Windows encoding namespace.
- add std::expected polyfill for help.
2025-07-14 15:06:33 +08:00
yyc12345 fa52d7416f refactor: condense the shared test data of parse and stringify. 2025-07-14 09:43:23 +08:00
yyc12345 e42a3b6e58 refactor: move YYCC_U8 from reinterpret.hpp to string.hpp
- move YYCC_U8 def.
- create shared template in testbench.
2025-07-14 09:13:47 +08:00
yyc12345 cec6091996 refactor: add utf convertion namespace 2025-07-02 10:36:33 +08:00
yyc12345 6e884d865d test: add testbench for patch (starts ends with, and contains) 2025-07-01 14:04:02 +08:00
yyc12345 58ec960e9c refactor: move std patch into correct position 2025-07-01 11:00:09 +08:00
yyc12345 732a560a65 refactor: finish constraint builder and its testbench 2025-06-30 09:33:46 +08:00
yyc12345 3030a67ca3 refactor: re-place files into correct position according to namespace hierarchy 2025-06-30 08:45:18 +08:00
yyc12345 e166dc41ac refactor: finish rust parse and add testbench for it. 2025-06-26 10:27:33 +08:00
yyc12345 a6382d6a22 refactor: add document for some namespaces 2025-06-25 10:40:05 +08:00
yyc12345 adc99274f4 refactor: add testbench for parse and stringify 2025-06-24 11:29:01 +08:00
yyc12345 3abd0969c0 refactor: add Rust infrastructure: Option, Result and panic 2025-06-23 16:22:55 +08:00
yyc12345 28ff7008a8 add parse and stringify 2025-06-22 19:53:49 +08:00
yyc12345 ab8d74efe6 test: add testbench for string module 2025-06-22 17:14:49 +08:00
yyc12345 df3b602110 refactor: start to refactor project 2025-06-20 23:38:34 +08:00
yyc12345 bec36b4b3c fix: fix install path in CMake script.
- replace some CMake variables to our custom variables in install path, however it does nothing because they are equal in default.
2024-12-23 09:30:39 +08:00
yyc12345 0b7e58c8e8 feat: use CMake to generate library version info.
- use CMake to produce YYCC version header when configuring.
2024-11-03 18:52:02 +08:00
yyc12345 831fa130bc feat: improve EnumHelper
- allow multiple enum flags in EnumHelper::Has to check whether given flags contains specified flags.
- update version in CMake script.
2024-11-03 18:06:36 +08:00
yyc12345 7adac00035 doc: fix document about recent changes
- fix build commandline introduction in documentation.
- update build script template.
- only install document in any Release-like build type.
- now testbench will be installed in any Release-like build type, not only Release.
2024-11-03 17:29:34 +08:00
yyc12345 0cd9582757 refactor: refactor project layout
- move header files into an individual directory to prevent the possibility that file name is conflict in Linux include directory.
- update build script generator. use jinja2 template engine to get better view, rather than python code written by hand.
- add version number and version comparation macros in core library.
2024-11-03 14:51:18 +08:00
yyc12345 2206825223 doc: add document for the change of loading function of ConfigManager. 2024-11-02 17:31:19 +08:00
yyc12345 21f7e7f786 feat: add new helper for scoped enum type.
- Add EnumHelper for bitwise operation of scoped enum type (copied from libcmo21)
- Enrich the return value of ConfigManager load function to present more infomation of loading.
- update testbench for new added feature and modification.
- add document for new added feature.
2024-11-02 17:10:55 +08:00
yyc12345 50dd086b53 fix: fix linux build issue 2024-08-27 17:35:57 +08:00
yyc12345 c91df3a74f fix: fix issues.
- add chars format argument for floating point overload of ParserHelper::TryParse.
- add overload for ParserHelper::Parse to match with ParserHelper::TryParse.
- fix the issue that we can not specify c++ standard in command line when configuring project.
- update documentation for changes.
- change following function's argument from const yycc_char8_t* to const yycc_u8string_view&.
	- StringHelper::Split, StringHelper::SplitView
	- StringHelper::Lower, StringHelper::Upper
	- StringHelper::Join
	- StringHelper::Replace
- use iterator type, not std::vector<yycc_u8string> for specialized StringHelper::Join to have more wide usage.
2024-08-26 11:58:20 +08:00
yyc12345 3858b4f3ec fix: use new way to detect c++ version in MSVC.
- use new macro to check C++ version in MSVC, instead of use compiler switch and __cplusplus macro.
2024-08-15 16:50:15 +08:00
yyc12345 f3a88e951c fix: add testbench for new added code. fix issues.
- add testbench for new added code in StdPatch.
- add documentation for new added code.
- fix the old usage of StdPatch::ToStdPath in ExceptionHelper.
2024-08-15 10:38:58 +08:00
yyc12345 59c185a424 doc: update build script and documentation.
- update build script.
- update documentation about build script changes.
2024-08-14 17:26:38 +08:00
yyc12345 dc98486fff chore: add new script for building
- add a python script for generating windows build script but not tested now.
2024-08-14 11:05:36 +08:00
yyc12345 72a48b703f feat: add various functions
- Add Win32 CopyFile, MoveFile, DeleteFile functions in WinFctHelper.
- rename FsPathPatch to StdPatch because this namespace will hold all standard library patches in future.
- add polyfill for std:basic_string::starts_with, std::basic_string::ends_with std::basic_string_view::starts_with, std::basic_string_view::ends_with in StdPatch.
- add polyfill for unordered and ordered associative standard library container's contains function in StdPatch.
- documentation and testbench will be fixed in later commits.
2024-08-13 09:38:12 +08:00
yyc12345 33cb284eb7 feat: add switch for build script to disable documentation build.
- add a new switch to disable documentation build which cost much time and disk space during building.
- add corresponding codumentation for this feature.
2024-08-05 14:46:59 +08:00
yyc12345 e6c24b8b61 feat: add helper macro and new Win32 function.
- add IsValidCodePage in WinFctHelper to check whether code page number is valid.
- add 6 macros to batchly (add / set default) (move / copy) (constructor / assign operator).
- add default or delete (copy / move) (constructor / assign operator) for some classes.
2024-08-04 11:57:56 +08:00
yyc12345 6da990876e feat: add smart FILE pointer.
- use std::unique_ptr and custom deleter to implement smart FILE pointer for convenient auto free.
2024-08-02 09:50:15 +08:00
yyc12345 0ac6b477f9 fix: fix fatal error of ExceptionHelper in x86 environemnt.
- fix a wrong placeholder of printf in ExceptionHelper which cause crash in unhandled exception handler.
- improve format function in ExceptionHelper.
- add a new debugging option and macro in CMake script and code for the convenience of debugging unhandled exception handler.
- add docuementation about previous term.
2024-07-31 20:32:11 +08:00
yyc12345 1cfbcb3b18 doc: update documentation
- use namespace bracket all content in documentation to reduce useless namespace prefix.
- change the argument type of AbstractSetting and CoreManager to yycc_u8string_view instead of const yycc_char8_t*.
- throw exception if given setting name is invalid in ConfigManager, instead of slient fallback.
2024-07-31 14:14:38 +08:00
yyc12345 598aae69ae doc: update documentation 2024-07-31 12:08:30 +08:00
yyc12345 656495f22e doc: update documentation 2024-07-30 22:13:59 +08:00
yyc12345 e167479de3 doc: add documentation for new added features 2024-07-30 17:31:38 +08:00
yyc12345 19023cb949 doc: add callback documentation in ExceptionHelper.
- add callback documentation in ExceptionHelper.
- fix other misc documentation issue.
2024-07-30 10:35:41 +08:00
yyc12345 650fcd12ec feat: add callback for unhandled exception handler.
- add callback for unhandled exception handler to give programmer a chance to fetch log and coredump path, especially for GUI application because its stderr is invisible.
- fix fatal anto-recursive calling bug in unhandled exception handler.
2024-07-29 21:42:27 +08:00
yyc12345 e8a0299fbc feat: finish ArgParser help text output 2024-07-29 19:31:17 +08:00
yyc12345 d1c1743dc9 feat: basically finish ArgParser
- finish ArgParser and test it.
- Help output function will be added in next commit.
2024-07-29 16:58:52 +08:00
yyc12345 35318505e4 feat: add arg parser feature but not finished 2024-07-28 22:42:16 +08:00
yyc12345 f997990af6 doc: finish all documentations 2024-07-26 15:08:12 +08:00
yyc12345 7f373ed354 doc: update documentation in code 2024-07-25 18:15:39 +08:00