{"id":20454783,"url":"https://github.com/cpiber/cest","last_synced_at":"2025-03-05T10:18:23.044Z","repository":{"id":119472847,"uuid":"465689168","full_name":"cpiber/cest","owner":"cpiber","description":"Simple inheritance in C","archived":false,"fork":false,"pushed_at":"2022-04-26T16:52:33.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-15T23:24:56.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cpiber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-03T11:21:55.000Z","updated_at":"2022-05-16T04:32:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"2bf89888-58f1-4cd3-9a0e-c43a9422820c","html_url":"https://github.com/cpiber/cest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpiber%2Fcest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpiber%2Fcest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpiber%2Fcest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpiber%2Fcest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpiber","download_url":"https://codeload.github.com/cpiber/cest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242005820,"owners_count":20056434,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T11:17:04.338Z","updated_at":"2025-03-05T10:18:23.030Z","avatar_url":"https://github.com/cpiber.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cest\n\nInheritance in C.\n\nThis program, similarly to the standard preprocessor, can take a file and produce valid C syntax, providing inheritance features.\n\n\n## Getting started\n\n1. Clone this repo\n1. Compile and view help:\n```console\n$ make\n$ ./cest -h\n```\n\nSee [examples](./examples) for more info.\n\n\n## Syntax\n\nCurrently only a single parent is supported. Support for multiple parents is planned.\n\nDeclare `struct child` to inherit from `struct Base`:\n```c\nstruct Child (struct Base) {\n  // child members\n};\n```\n\nCurrently using any struct present in the current file and its includes is possible, as well as names from direct `typedef`s (i.e. `typedef struct ... name;`). Support for separate `typedef`s is planned.\n\nThe special name `CEST_MACROS_HERE` is used to denote the place where the casting-macros should be placed.\n\nThe macros allow type-safe casting of child-structs to their parent structs. They are of the form `CEST_AS_\u003ctypename\u003e`, where `\u003ctypename\u003e` can be `struct_\u003cstructname\u003e` or the typedef'd name. `S` may be appended for the pointer version.\n\n\n## Integrating into the build\n\nSince this tool is not part of the regular C-toolchain, it needs to be called separately. Using a build tool like [GNU Make](https://www.gnu.org/software/make/) or [CMake](https://cmake.org/), the following approach can be used:\n1. Instruct build tool to transform `.h.in` files and place them in build folder as `.h`\n1. Setup up build folder for includes, or directly include from there\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpiber%2Fcest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpiber%2Fcest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpiber%2Fcest/lists"}