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

Remove necessity for RecordComponent::SCALAR #1154

Merged
merged 22 commits into from
Dec 22, 2023

Commits on Nov 20, 2023

  1. Configuration menu
    Copy the full SHA
    b4cbe37 View commit details
    Browse the repository at this point in the history
  2. Prepare Attributable for virtual inheritance

    Use only zero-param constructors to avoid diamond initialization
    pitfalls
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    16ff346 View commit details
    Browse the repository at this point in the history
  3. Fix default constructors/operators of Container and BaseRecordComponent

    These derive virtually from Attributable, and this avoids that pitfalls
    propagate to user code.
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    e8daa0d View commit details
    Browse the repository at this point in the history
  4. Add m_datasetDefined

    See in-code documentation.
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    44db18d View commit details
    Browse the repository at this point in the history
  5. Prepare class structure without applying logic yet

    BaseRecord is now derived by its contained RecordComponent type.
    If it is scalar, the idea is that the BaseRecord itself is used as a
    RecordComponent, without needing to retrieve the [SCALAR] entry.
    No logic implemented yet around this, this just prepares the class
    structure.
    Notice that this will write some unnecessary attributes since the
    RecordComponent types initialize some default attributes upon
    construction.
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    e1c34ef View commit details
    Browse the repository at this point in the history
  6. No longer use map entry SCALAR in application logic

    Not yet supported: Backward compatibility for still allowing legacy
    access to scalar entries
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    52a4d4e View commit details
    Browse the repository at this point in the history
  7. Remove KEEP_SYNCHRONOUS task

    No longer needed, as one object in the openPMD hierarchy is no longer
    represented by possibly multiple Writable objects.
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    7d37e5a View commit details
    Browse the repository at this point in the history
  8. Adapt Coretests

    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    9817075 View commit details
    Browse the repository at this point in the history
  9. No virtual methods in Container class

    Either this way, or make all of them virtual
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    8ad6c8d View commit details
    Browse the repository at this point in the history
  10. Fully override Container methods in BaseRecord

    Special care for legacy usage of SCALAR constant. Implement iteration
    API such that it works for scalar components as well.
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    95b8315 View commit details
    Browse the repository at this point in the history
  11. Adapt Container API to C++17

    insert() and reverse iterators
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    882195f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    1a5583e View commit details
    Browse the repository at this point in the history
  13. Factor out create_and_bind_container() function template

    Will later be called by Record-type classes, too
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    96310c9 View commit details
    Browse the repository at this point in the history
  14. Factor out RecordComponent.__setitem__ and __getitem__

    Similarly to the Container API, we will need to apply this to
    Record-type classes.
    Defining `__setitem__` and `__getitem__` for them is sufficient, as all
    other members are inherited from RecordComponent.
    `__setitem__` and `__getitem__` need special care, as they are inherited
    from Container AND from RecordComponent, so some conflict resolution is
    needed.
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    bb03e16 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    0ccf5ba View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    bf58bf7 View commit details
    Browse the repository at this point in the history
  17. Adapt openpmd-pipe to new design

    This somewhat demonstrates that this change is slightly API-breaking.
    Since openpmd-pipe acts directly on the class structure via
    `instanceof()`, fixes are necessary.
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    5160f31 View commit details
    Browse the repository at this point in the history
  18. Safeguard: No scalar and vector components side by side

    "A scalar component can not be contained at the same time as one or more regular components."
    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    1cd6c6b View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    b117863 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    3142ef4 View commit details
    Browse the repository at this point in the history
  21. Documentation

    franzpoeschel committed Nov 20, 2023
    Configuration menu
    Copy the full SHA
    796da2f View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    8b9239a View commit details
    Browse the repository at this point in the history