Madrick3 / code-template-generator

0 stars 0 forks source link

Basic .h template creation #1

Closed Madrick3 closed 1 day ago

Madrick3 commented 3 days ago

Update code-template-generator with basic generation of header files, similar to what is present for source code generation

Madrick3 commented 3 days ago

Generate header files like how C source files are generated. The COG file itself acts as a Controller The 'HEADER" file acts as a subset of the controller as well

The module specific python file should contain whatever data is special required for the module header.

  1. Differs from Source file generation in that the header file should have more robust comments, i.e. describing a function in detail instead of relying on just a brief.
  2. May include a list of include files, these would be necessary for the types.
  3. Functions which are global may be defined as extern - to accommodate some C compilers
  4. local functions have to be excluded from the header file a. This implies that the C code implementation needs to be corrected or adapted so that a longer description for static functions can be added. This will have to be a new feature/issue
Madrick3 commented 2 days ago

To support header generation, I am adding a 'longDescription' parameter to the ommon_types.py class. Will reuse this for local funcs in the source code later.

Madrick3 commented 2 days ago

Also adding a formatting mechanism for breaking a comment into many lines (i.e. 120 character word wrap)