Reorganization of files, refactors, doc updates (WIP)

Removing the gen. namespace from the files for components, dependencies, and file_processors.
They are only necessary if the include directory is transparent, and in my case those are not.

Made a docs directory. I'm offloading information from the main readme to there along with additional informationn I end up elaborating on down the line.
Enum tables were moved to their own directory (project/enums).

Library will not compile for now. Major refactor occuring with parsing related components.
This commit is contained in:
2023-07-29 05:52:06 -04:00
parent 31e1c38c18
commit c5afede7b5
68 changed files with 1077 additions and 888 deletions

View File

@ -1,12 +1,34 @@
# Scripts
Build and cleanup scripts for the test directory are found here along with `natvis` and `natstepfilter` files for debugging.
Generation, testing, and cleanup scripts for the test directory are found here along with `natvis` and `natstepfilter` files for debugging.
The build works as follows:
## Refactoring
* Compile and run the meta-program, it will dump files to the `test/gen` directory.
* Format the files using clang-format
* Build a program that uses some the generated definitions. (Have not done yet)
`refactor.ps1` Provides a way to run the [refactor](github.com/Ed94/refactor) program. It uses the `gencpp.refactor` script to complete a mass refactor of all content within the files of the specified within the script.
The `test/gen` directory has the meson.build config for the meta-program
The `test` directory has the one for the dependent-program.
Currently `refactor` only supports naive sort of *find and replace* feature set and will not be able to rename identifiers excluisvely to a specific context (such as only renaming member names of a specific struct, etc).
## Build & Run Scripts
**`clean.ps1`**
Remove any generated content from the repository.
**`bootstrap.ps1`**
Generate a version of gencpp where components are inlined directly to `gen.<hpp/cpp>` and `gen. <hpp/cpp>`
Any heavily preprocessed code is not inlined and are instead generated using the code in the `helpers` directory.
**`singlheader.build.ps1`**
Generate a single-header version of the library where all code that would normally good in the usual four files (see bootstrap) are inlined into a single `gen.hpp` file.
As with the bootstrap, any heavily preprocessed code is not inlined and instead generated with helper code.
**`test.gen.build.ps1`**
Build the metaprogram for generating the test code.
**`test.gen.ps1`**
Build (if not already) the metaprogram for generating test code, then run it to generate code.
**`test.build.ps1`**
Build and run metaprogram, build test program.
**`test.run.ps1`**
Build and run metaprogram, build and run test program.

View File

@ -1,12 +0,0 @@
[string[]] $include = 'gen.cpp' #'*.c', '*.cc', '*.cpp'
# [string[]] $exclude =
$path_root = git rev-parse --show-toplevel
$path_proj = Join-Path $path_root project
$files = Get-ChildItem -Recurse -Path $path_proj -Include $include -Exclude $exclude
$sources = $files | Select-Object -ExpandProperty FullName | Resolve-Path -Relative
$sources = $sources.Replace( '\', '/' )
return $sources