Skip to content

Rename generated extension classes#373

Merged
kring merged 3 commits intoordered-mapfrom
extension-class-rename
Oct 26, 2021
Merged

Rename generated extension classes#373
kring merged 3 commits intoordered-mapfrom
extension-class-rename

Conversation

@lilleyse
Copy link
Contributor

Merge #372 first

Renamed all the generated extension classes based on discussion in #307 (comment)

The extension names in the existing code are pretty cumbersome. Maybe we should normalize them by prefixing with Extension and then a de-underscored, case-normalized version of the extension name. So EXT_meshopt_compression becomes ExtensionExtMeshoptCompression and 3DTiles_implicit_tiling becomes Extension3dtilesImplicitTiling. And when we have different types for extending different objects, ExtensionMeshPrimitiveExtFeatureMetadata. Still kinda cumbersome, but I don't have any better ideas short of totally manual names that wouldn't seem connected to the extension names at all, such as MeshPrimitiveFeatureMetadata for that last one.

I didn't implement the namespace idea because we would still have extensions starting with numbers that would need a prefix. And I wanted to keep the changes simple for now.

Daniel's idea of using namespaces is an interesting one! Put all the extensions in CesiumGltf::Extensions and then remove that Extension prefix?

@lilleyse lilleyse requested a review from kring October 25, 2021 16:27
@kring kring merged commit 6e792db into ordered-map Oct 26, 2021
@kring kring deleted the extension-class-rename branch October 26, 2021 11:40
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

Comments