add-new-file
Add or update PerfectHash generated file outputs (file work entries, prepare/save callbacks, CMake/VCXProj registration, and tests) when new output files or artifacts need to be added.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Add New Generated File
Workflow
- Add a new entry to
src/PerfectHash/PerfectHashFileWork.hinVERB_FILE_WORK_TABLEwith the right suffix/extension/EOF init; keep ordering invariants (streams follow owning files, VC project entries stay contiguous, context files stay contiguous). - Implement prepare/save callbacks in
src/PerfectHash/Chm01FileWork*.c. If a stage is intentionally unused, setPrepareXxxChm01orSaveXxxChm01toNULLinsrc/PerfectHash/Chm01FileWork.h. - If a new file extension is needed, add a
UNICODE_STRINGinsrc/PerfectHash/PerfectHashConstants.cand wire it into the file work entry. - Register new sources in
src/PerfectHash/CMakeLists.txt; mirror additions insrc/PerfectHash/PerfectHash.vcxprojandsrc/PerfectHash/PerfectHash.vcxproj.filters. - Update
src/PerfectHash/Chm01FileWork.cpath logic when a file needs custom base names, directories, or stream rules. - Update generators/tests (
src/PerfectHash/Chm01FileWorkCMakeListsTextFile.c,tests/run_cli_codegen_test.cmake, etc.) if the new file needs build/test coverage. - Add or expand tests to write the new files and compile/run them.
File Enum Capacity
- When the 64-bit bitmap for file enums is exhausted, add a new enum group with
_2,_3, etc. suffix and preserve existing ordering rules.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-03-03
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!