|
lexLeo
|
This page defines the standard suffix-based naming conventions used across the project to make architectural intent immediately readable from names.
This document is a reference index only.
It does not define architecture, lifecycle rules, or ownership semantics. Those are defined in:
The purpose of this page is to help readers quickly identify the role of a type, file, or build target from its name alone.
Value-only configuration parameters.
Indicates:
Details and rules: see Type standards.
Wiring-time context used to assemble a module.
Indicates:
Details and rules: see Type standards and Module layout standards.
Mutable execution state of a module instance.
Indicates:
Details and rules: see Type standards.
Primary runtime handle of a module.
Indicates:
Details and rules: see Type standards.
Abstract capability interfaces expressed as function pointer tables.
Indicates:
Details and rules: see Type standards.
Callable contracts binding a port to an opaque backend implementation.
Indicates:
void *;Details and rules: see Type standards.
Client-provided notification callbacks.
Indicates:
Details and rules: see Type standards.
Naming used for modules whose primary responsibility is the construction (and typically destruction) of instances from another module.
Indicates:
*_factory_t) or stateless (functions only).Notes:
*_factory_ops_t denotes an injectable factory capability table.This project uses explicit CMake targets to express usage requirements and avoid consumers manually managing include paths and transitive dependencies.
Target naming follows the same idea: intent must be readable from the name.
Production runtime target for the module.
Wiring-only target exporting headers and transitive requirements needed by the composition root (or by test wiring/injection).
Used to expose internal wiring headers without turning them into public API.
Test-only target exporting <module>/tests/include.
Contains module-specific test-only headers such as <module>_test_api.h.
Test-only "deps bundle" target used by the module's own tests.
This target aggregates the module-specific requirements needed by the module's own tests (wiring + test headers + module-level test dependencies). Test framework dependencies (e.g., cmocka, global test support) are linked by the test executable target.
Reusable fake implementation (STATIC library) located under lexleo/tests/test_support/.
These fakes are meant to be consumed by multiple modules' test targets.
Lightweight test-support (STATIC library) located under <module>/tests/support/.
A <module>_fake_provider offers a local facade to retrieve/configure reusable fake components (from fake_<module>) and optionally exposes wiring headers needed for injection.
This rule applies to CMake target names (not to C types such as *_ctx_t).
*_test_* = used by the module's own test targets*_fake_* = used to test other modules (reusable fakes)*_wiring_* = used by the composition root / wiring / injection layerThe project intentionally avoids vague or ambiguous suffixes such as:
*_support*_utils*_helpers (unless strictly internal)Integration and variation points must be expressed explicitly using *_ops_t, *_vtbl_t, adapter modules, or callbacks.
| Suffix | Intent (at a glance) |
|---|---|
| *_cfg_t | Value-only configuration |
| *_ctx_t | Wiring / dependency injection |
| *_state_t | Mutable runtime state |
| <module>_t | Runtime module handle |
| *_ops_t | Capability interfaces |
| *_vtbl_t | Port / adapter contracts |
| *_callbacks_t | Outbound notifications |
This page exists to improve readability and onboarding. Architectural rules and guarantees are defined elsewhere and must not be inferred solely from naming.