Commit Graph

39 Commits

Author SHA1 Message Date
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
35318505e4 feat: add arg parser feature but not finished 2024-07-28 22:42:16 +08:00
052fa7f4d1 chore: update build script.
- update CMake build script to make install statement is more legal.
- add Windows-only build script for creating CMake used package and MSVC used package on Windows.
- documentation will be added in the next commit.
2024-07-22 13:56:00 +08:00
4f1e2447d0 fix: make exception handler be singleton in same process.
- use CreateMutexW to make sure exception handler is singleton in the same process.
	- Because one process may load multiple DLLs using YYCC.
	- According to this, it will produce N times error log. N is the count of DLLs using YYCC exception handler.
- refactor exception handler. use a class instance to manage all global variables and add a std::mutex to let module be thread safe.
- change the way of check in console input testbench.
2024-07-07 17:29:26 +08:00
a1699f13db doc: update documentation
- rename Constrain to Constraint in code and documentation.
- remove massive annotation of encoding helper because the documentation is enough.
- fix doxygen character shift warnings.
2024-07-05 22:25:14 +08:00
e374575852 fix: fix issue in config manager.
- fix fwrite fread issue in config manager.
- add testbench for config manager.
- change testbench order to get better experience.
2024-07-03 10:14:17 +08:00
e1823d4b8e feat: add new split function reducing memory cost.
- add a new split function, SplitView which can reduce cost memory by using string view.
- add a new testbench for split function for testing empty source string.
- add documentation for some string helper function.
- improve library encoding documentation.
2024-06-29 17:39:13 +08:00
e5b6e8c6c3 refactor: refactor testbench for UTF8 string. fix refactor bug 2024-06-28 16:24:27 +08:00
ccb729c718 refactor: update all modules for UTF8 string. waiting for debugging 2024-06-28 15:46:58 +08:00
bb17bb6a1f chore: update build system
- use configuration-arch-based path in MSVC to make sure generated package can be used by native MSVC project.
- add github action and corresponding build script. but not tested.
- fix some testbench code.
2024-06-20 15:51:40 +08:00
1fd132f0c9 fix: fix build error in Linux environment.
- fix various build error in Linux environment.
- the convertion between UTF8, UTF16 and UTF32 have error in Linux and will be fixed in future.
2024-06-19 13:28:51 +08:00
b61f718084 fix: add if macro for Windows only testbench code.
- add if macro for Windows only testbench code to make sure testbench can be run on other platforms.
2024-06-19 09:17:04 +08:00
f153f9bc22 doc: update comments of code.
- add lost testbench for wchar encoding convertion.
- update code documentation.
2024-06-18 16:03:41 +08:00
77b6f439f7 feat: add encoding convertion functions between utf8 and utf16, utf32.
- add bidirectional convertion between utf8 and utf16, utf32 in every platforms.
- add testbench for new added functions.
2024-06-18 11:03:48 +08:00
0319be7e19 feat: finish exception helper.
- finish exception helper.
	- switch to LOCALAPPDATA/CrashDumps as output directory.
- add testbench for exception helper.
- add lost testbench for GetLocalAppData in WinFctHelper.
- link with DbgHelp.lib on Windows in CMake.
2024-06-17 15:10:45 +08:00
e20c03a5f1 refactor: move COM type and guard into independent file
- move COM types and guard into independent file and namespace COMHelper because not only dialog, but also other parts also need to use COM related fucntion.
- remove ParserHelper.cpp because it is empty (ParserHelper is header only namespace).
- Add a function fetching LOCALAPPDATA in WinFctHelper.
2024-06-17 12:46:32 +08:00
8465d80a54 chore: update CMakeLists
- update the use of target_sources() to remove duplicated header file declarations.
	- thx Gary Wang
2024-06-15 22:03:17 +08:00
5481898ad9 feat: move std::filesystem::path related function to independent namespace.
- create FsPathPatch namespace to hold std::filesystem::path related functions.
- add corresponding testbench code for it.
2024-06-15 17:57:33 +08:00
d0a8733379 refactor: change 2 functions declarations in WinFctHelper
- update GetTempPath and GetModuleName function to let them more reliable.
2024-06-15 16:44:11 +08:00
c32806ea03 feat: add more output functions in console helper.
- add more output functions in console helper.
	* split output functions by format string and plain string as Format and Write.
	* add functions which output to stderr.
- improve document.
2024-06-14 11:59:08 +08:00
0ef1939e6e feat: update IO helper.
- add utf8 path to std::filesystem::path convertion function.
- add left-padding zero format string for printing pointer.
- update exception handler, but not finished because console helper need update.
2024-06-13 15:24:12 +08:00
015ff874f8 feat: add windows function helper
- add windows function helper namespace for some commonly used windows functions.
- add corresponding testbench for added code.
2024-06-13 11:18:25 +08:00
b6c53ac707 fix: fix console helper
- add annotations for console helper for better user experience.
- change build macro to allow using console helper in non-Windows platform. because console color macros is universal and should not be limited in Windows platform.
2024-06-11 11:40:09 +08:00
629a608133 feat: finish console input.
- finish console input function. add test for it.
- add Replace function in string helper.
2024-06-10 17:55:23 +08:00
1e990b74ae feat: update console output method
- remove the macros disable the warning and error of std functions in MSVC because YYCC has disable them in header.
- update console input output functions. provide CSharp-like interface for UTF8 console input output.
	- console output function is done by WriteConsoleW and WriteFile.
	- console input function still work in progress.
- rename console ASCII color macros
- add console ASCII color test.
- remove EnableUTF8Console because no longer needed.
- add a bunch of annotation to describe YYCC UTF8 console strategy.
- add UNICODE macro in CMakeLists.txt to order CMake generate Visual Studio solution with UNICODE charset enabled, not MBCS.
2024-06-09 21:34:28 +08:00
019034a9c2 chore: update CMakeLists.txt
- update CMakeLists.txt. Add an option to disable the generation of testbench.
- rename testbench name to YYCCTestbench.
- allow emoji test in code.
2024-06-06 13:16:55 +08:00
642db411f5 chore: update cmake build scripts
- update cmake build scripts
- the install part of build scripts may still have issues.
2024-06-03 14:24:05 +08:00
67bd445885 refactor: update ParserHelper
- update the implementation of ParserHelper from locale-based std::to_string, std::stod, std::stoull, to locale-independent function std::from_chars and std::to_chars.
- rename TerminalHelper to ConsoleHelper.
2024-05-31 12:12:48 +08:00
7044a0cff2 fix: fix utf8 output again.
- I write a wrong CMakeLists.txt so the generated utf8 string is wrong.
- Fixed in CMakeLists.txt. But still remove all utf8 string literal heading becasue it is not compatible with my code under C++ 20 standard.
2024-05-30 16:22:03 +08:00
e1e8a33c50 fix: fix utf-8 output error.
- I figure out how UTF-8 output bug happend, but I don't have any clues proving why this happend.
	- it seems that we can simply remove utf8 string literal heading to solve this issue (u8"" -> "")
	- the compiled string char array in executable application already is wrong.
	- compiler generated string bytes is `'original string'.encode('utf-8').decode(your pc encoding).encode('utf-8')`.
	- idk why, as the compromise, I remove all utf8 string literal heading to solve this issue.
	- I highly think this is a bug of MSVC. because everything is okey if I use MSVC native project file to build.
	- I have compared the build flags between native project and cmake generated project but I can't find any difference.
- add full testbench code for ParserHelper.
2024-05-30 14:53:46 +08:00
5726c81fdb chore: switch to CMake build system.
- switch to CMake build system and delete original project files because Visual Studio supports CMake project debugging.
- there is a UTF-8 bug for library after switching, but I don't know why it happends. maybe fixed in future.
2024-05-29 23:11:52 +08:00
72eb79ce1a feat: basically finish parser helper.
- basically finish parser helper, including TryParse, Parse and ToString.
- only Parse has been tested. other test should be filled in future.
2024-05-28 19:59:41 +08:00
cebe2f004d feat: finish dialog helper.
- finish dialof helper.
- dialog helper still nned some annotation.
2024-05-27 14:27:11 +08:00
84228b5f8c feat: add some work
- add dialog parameter class for dialog helper. prepare to write real dialog popup function.
- refactor file filters class in dialog helper to make it no const syntax conflict.
- improve windows header import prefix and suffix header. remove the barrier limiting headers only can be imported once. fix define preprocessor usage bug.
- move crt warning and errors macro from project settings to internal headers.
- copy IronPad as ExceptionHandler but not adapted to this project.
2024-05-23 09:37:41 +08:00
359aff82ac feat: finish FileFilters class in dialog helper.
- finish FileFilters class representing the file types area in popup dialog.
2024-05-22 15:53:46 +08:00
b8a56efd7c feat: finish string helper.
- finish Split() in string helper.
- make complement to testbench test code.
2024-05-22 13:42:43 +08:00
9c943705de feat: finish string helper except Split()
- add string lower upper function in string helper.
- add join function in string helper.
- add split function in string helper but implementation is not perfect and should be imporved in future.
2024-05-21 10:24:05 +08:00
6ebb457bd1 finish terminal helper 2024-05-20 21:41:48 +08:00
b6cffd8a97 first commit 2024-04-25 10:38:13 +08:00