Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce number of classes #197

Open
robUx4 opened this issue Mar 9, 2024 · 0 comments
Open

reduce number of classes #197

robUx4 opened this issue Mar 9, 2024 · 0 comments
Labels
abi-break breaks the ABI (e.g. programs linked against the library have to be recompiled) api-break breaks the API (e.g. programs using it will have to adjust their source code)

Comments

@robUx4
Copy link
Contributor

robUx4 commented Mar 9, 2024

With the API rework/cleanup for 2.0, it has become more apparent that a lof of the classes we define in KaxSemantic are just the base integer/string class with a semantic context attached.

Rather than creating these classes, we could just use the base types instead, just exporting the semantic of the element to identify would is what. Only a few classes (not found in KaxSemantic) would actually need to have proper C++ classes because they have extra methods.

These semantic are currently constexpr in KaxSemantics.cpp. We may be able to put these constexpr in KaxSemantics.h, eliminating the need to even export them from the DLL.

While this is true for libmatroska, this can also be done with all the elements in the EBML header in libebml.

@robUx4 robUx4 added api-break breaks the API (e.g. programs using it will have to adjust their source code) abi-break breaks the ABI (e.g. programs linked against the library have to be recompiled) labels Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abi-break breaks the ABI (e.g. programs linked against the library have to be recompiled) api-break breaks the API (e.g. programs using it will have to adjust their source code)
Projects
None yet
Development

No branches or pull requests

1 participant