Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add templated links between arbitrary datatypes (#257)
* Use more suitable name for header * Make things work again (again) with c++17 * [wip] Start working on templated associations * [wip] Almost complete implementation of Association * [wip] Scaffolding of AssociationCollection * [wip] AssociationColllection implementation * [wip] unit tests for subset collection functionality * [wip] Proper move semantics * [wip] Add necessary functionality for SIO backend * [wip] clang-tidy fixes * Move non public headers to detail folder * Fix tests after Frame * [wip] Make everything compile again * Add json output support for associations * Generate all possible combinations for root dicts This makes it easy for the users but compile times explode for the dictionaries as we are instantiating N**2 templates in static variables in order for dictionary generation to pick them up properly. * Add writing of Association collection to Frame I/O tests * Generate SIOBlocks instantiations for associations Similar to root dictionary generation to make them available to the SIO backend. Same caveats and concerns as with ROOT in this case. * Make association read tests version dependent * Fix include guards to comply with clang-tidy * [wip] Make things compile again after rebase * [wip] Make associations work with Root I/O * [wip] Make SIO Frame reading (almost) work again * "fix" legacy sio frame test * Make the AssociationSIOBlock public * [wip] Introduce macros for registering associations * Make Association I/O work with python * Avoid unnecessary string copies, add documentation * Add templated get/set and structured bindings to Associations * Introduce typedefs for consistency with other types * Move all but the public one into detail directory * Fix clang-tidy warning * Default initialize weight to 1 * Simplify and fortify SFINAE logic for mutable associations * Add markdown documentation describing usage and some implemenation details * Make things compile again after PR revival * Fix some runtime errors and cleanup code * Bump patch version and make all tests run * Bring documentation up-to-date * Code cleanup and addressing review comments * Make sure to cleanup cloned associations properly * Add functionality to be closer to Container named requirement * Adapt version check * Add missing header * Switch to more canonical member type names * Switch to podio docstring comment style * Fix cloning to behave the same as other generated types * Add tests for inequality operator * Remove unnecessary NOLINT from tests * Update type requirements to match generated code * Make templated associations work the same as generated ones * Add test for cloning without relations * Add definition of inequality operator * Fix typos in documentation * Move template helpers to class and introduce a new one * Switch to different types in association for tests * Add test to make sure structured bindings work in loops * Simplify and fortify some mutability checks * Silence false-positives from clang-tidy * Rename Association to Link after EDM4hep discussion * Remove empty file * Use proper preprocessor guards to avoid ROOT interference * Ensure that JSON ADL is working correctly for downstream consumers * Add typeName to Interface types * Add tests for reading / writing links with interface types * Make sure info for schema evolution is in buffers * Make sure setFrom and setTo work for python bindings Need a dedicated overload for the Mutable types again, otherwise overload resolution for cppyy doesn't consider the implicit conversion to Mutable as viable option to invoke these * Make it possible to pass in interfaced types for setters Removes the need for an explicit cast that would otherwise be necessary * Make LinkData an explicit type Makes backwards compatibility easier to achieve * Bump versions for tests now that a new tag has been made * Fix typo * Make initialization work for older compilers * Make sure to not expect a non-generated header for roundtrip tests * Make sure cmake runs without ENABLE_SIO=ON * Move generic preprocessor macros to separate header * Try to reduce code duplication in macros * Switch to unique_ptrs for managing the related objects * Fix a few minor typos in documentation * Fix typos in comments and docstrings Co-authored-by: Mateusz Jakub Fila <37295697+m-fila@users.noreply.github.com> * Fix comment --------- Co-authored-by: Mateusz Jakub Fila <37295697+m-fila@users.noreply.github.com>
- Loading branch information