openPMD / openPMD-api

:floppy_disk: C++ & Python API for Scientific I/O
https://openpmd-api.readthedocs.io
GNU Lesser General Public License v3.0
134 stars 51 forks source link

Add visit-like pattern for RecordComponent #1544

Closed franzpoeschel closed 6 months ago

franzpoeschel commented 8 months ago

Close #1372

TODO:

This adds:

  1. std::variant<...> aliases for openPMD datatypes
  2. A RecordComponent::visit(...) call that instantiates the passed Functor Template Object with the current type of the RecordComponent
  3. Using 1. and 2., a RecordComponent::loadChunkVariant() call that returns a std::variant<...> of shared_ptr types