Conversation
added 2 commits
February 24, 2026 01:48
…units - Enhanced UnitTraits for mass units (e.g., Yoctogram, Kilogram) to include symbol definitions. - Added SPDX license header to mass.hpp, power.hpp, time.hpp, and velocity.hpp files. - Updated UnitTraits for power units (e.g., Yoctowatt, Kilowatt) to include symbol definitions. - Enhanced UnitTraits for time units (e.g., Attosecond, Minute) to include symbol definitions. - Introduced support for compound units in velocity, including common velocity types with appropriate symbols.
added 9 commits
February 24, 2026 02:07
…ialization support - Added SPDX license and copyright information to all relevant files. - Improved documentation in `qtty.hpp` and `serialization.hpp` for better clarity on usage and functionality. - Reordered includes in `qtty.hpp` and `serialization.hpp` for consistency. - Simplified inline functions in `qtty.hpp` and `serialization.hpp` for better readability. - Enhanced JSON serialization and deserialization functions to ensure robust error handling. - Added unit tests for serialization in `test_serialization.cpp` to validate JSON round-trip conversions. - Updated tests across various dimensions (length, mass, time, etc.) for consistency in formatting and readability. - Ensured all test cases utilize modern C++ practices for better maintainability.
- Created CMakeDoxyfile.in for Doxygen configuration generation. - Added Doxyfile.qtty_cpp for project-specific Doxygen settings. - Updated main.rs to allow for an optional 6th field in CSV parsing. - Enhanced ffi_core.hpp with compound unit type traits and conversion logic. - Modified literals.hpp to include angular units and clean up operator overloads. - Expanded serialization.hpp to support JSON serialization/deserialization for derived quantities. - Updated length.hpp and velocity.hpp to improve compound unit handling and conversions. - Added comprehensive tests for derived quantities, including conversion and arithmetic operations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a consistent mechanism for associating unit symbols with quantity types and improves the usability of the library by enabling formatted output of quantities with their units. The main changes include adding a default
symbol()method to theUnitTraitstemplate, specializing it for many units, and implementing a stream insertion operator for quantities. Additionally, SPDX license headers have been added to several files.Unit Symbol Support and Output Formatting
symbol()method to theUnitTraitstemplate inffi_core.hpp, allowing unit traits to provide a string symbol for each unit. This method is specialized for a wide range of units in thelength.hpp,mass.hpp, andangular.hppfiles, enabling each unit to return its appropriate symbol (e.g., "m" for meters, "kg" for kilograms). [1] [2] [3] [4]operator<<) for theQuantityclass inffi_core.hpp. This allows quantities to be printed directly to output streams along with their value and unit symbol, improving debuggability and user experience.Licensing and Documentation
length.hpp,mass.hpp, andpower.hppfor legal clarity and compliance. [1] [2] [3]Other Minor Improvements
<ostream>inffi_core.hppto support the new stream insertion operator.length.hppfor readability.These changes enhance the clarity, maintainability, and usability of the codebase, especially for displaying and working with quantities and their units.