Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces C++ array data type handling by adding a new GetArrayDataTypeUseCase class and updating related components. The changes implement C++ std::vector type mappings for various primitive and custom data types.
Key changes:
- Added
GetArrayDataTypeUseCaseclass to handle C++ array type mappings - Updated
GetTypeNameUseCaseto use the new array data type handler - Removed incorrect Kotlin import from
PrepareRightValueUseCase
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| GetArrayDataTypeUseCase.kt | New class implementing C++ array type mappings using std::vector |
| GetArrayDataTypeUseCaseTest.kt | Comprehensive test coverage for the new array data type use case |
| GetTypeNameUseCase.kt | New type name resolution class utilizing the array data type handler |
| PrepareRightValueUseCaseTest.kt | Test class for right value preparation functionality |
| PrepareRightValueUseCase.kt | Removed incorrect Kotlin import reference |
| CppEnumGeneratorTest.kt | Updated test with additional dependencies and test cases |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| is DataType.custom -> type.block.name | ||
| is DataType.userClassTest2 -> type.node.getPath() | ||
| else -> "ktQQTP_$type" | ||
| } + (if (type.canBeNull) "?" else "") |
There was a problem hiding this comment.
The nullable syntax ? is Kotlin-specific and not valid for C++. C++ uses pointers or optional types for nullable values.
| } + (if (type.canBeNull) "?" else "") | |
| }.let { typeName -> if (type.canBeNull) "std::optional<$typeName>" else typeName } |
| """.trimIndent()) as Namespace | ||
| val block = tree.subs.first() as ConstantsEnum | ||
|
|
||
| val projectOutput = OutputTree(Target.Kotlin) |
There was a problem hiding this comment.
The target should be Target.Cpp since this is testing C++ enum generation, not Kotlin.
| val projectOutput = OutputTree(Target.Kotlin) | |
| val projectOutput = OutputTree(Target.Cpp) |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| DataType.uint64 -> "std::vector<uint64_t>" | ||
| DataType.float32 -> "std::vector<float>" | ||
| DataType.float64 -> "std::vector<double>" | ||
| is DataType.string -> "std::vector<std::string>" |
There was a problem hiding this comment.
Pattern matching on DataType.string should not use is keyword since string is likely a companion object property, not a class. Use DataType.string without is.
| is DataType.string -> "std::vector<std::string>" | |
| DataType.string -> "std::vector<std::string>" |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.