Skip to content

Conversation

@ArthurVasseur
Copy link
Contributor

Implement template class reflection with:

  • Template class declaration and specialization parsing via ClangParser
  • TemplateClass runtime representation with specialization lookup
  • Code generation for template classes and their specializations
  • Header generation for template class declarations
  • Documentation and test coverage

Implement template class reflection with:
- Template class declaration and specialization parsing via ClangParser
- TemplateClass runtime representation with specialization lookup
- Code generation for template classes and their specializations
- Header generation for template class declarations
- Documentation and test coverage
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 77.00258% with 178 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.46%. Comparing base (4058247) to head (134342f).

Files with missing lines Patch % Lines
...ckageGenerator/HeaderGenerator/HeaderGenerator.cpp 3.50% 55 Missing ⚠️
...certo/PackageGenerator/ClangParser/ClangParser.cpp 76.19% 10 Missing and 25 partials ⚠️
...oncerto/Reflection/TemplateClass/TemplateClass.cpp 34.21% 24 Missing and 1 partial ⚠️
Src/Tests/TemplateClass.cpp 78.37% 21 Missing and 3 partials ⚠️
...rto/PackageGenerator/CppGenerator/CppGenerator.cpp 87.19% 12 Missing and 9 partials ⚠️
.../Concerto/Reflection/GenericClass/GenericClass.cpp 48.14% 14 Missing ⚠️
Src/Tests/GenericClass.cpp 98.54% 2 Missing and 1 partial ⚠️
Src/Tests/SampleBar.refl.hpp 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #5      +/-   ##
==========================================
+ Coverage   69.65%   72.46%   +2.81%     
==========================================
  Files          36       42       +6     
  Lines        1493     2252     +759     
  Branches      208      285      +77     
==========================================
+ Hits         1040     1632     +592     
- Misses        357      490     +133     
- Partials       96      130      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ArthurVasseur ArthurVasseur changed the title feat: add template class support to Concerto Reflection feat: add template/generic class support to Concerto Reflection Dec 17, 2025
@ArthurVasseur ArthurVasseur force-pushed the feat/templates branch 2 times, most recently from 6081826 to 134342f Compare December 17, 2025 17:50
Implements runtime-parameterized generic classes for inter-DLL compatibility.

**GenericClass Runtime Class:**
- New reflection class type for runtime-parameterized types
- Auto-detects type parameters from m_*Type fields
- Supports CreateDefaultObject(span<const Class*>) for instantiation
- Coexists with TemplateClass for compile-time templates

**Code Generation:**
- ClangParser: Auto-detection of m_*Type fields matching "const Class*"
- CppGenerator: Generates InternalXxxGenericClass with type injection
- HeaderGenerator: Generates interface matching regular classes
- Includes GenericClass.hpp in generated files

**Parser & Macros:**
- CCT_GENERIC_CLASS() annotation macro
- Detection of [[cct::generic_class]] attributes
- Namespace registration of generic classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants