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

Switch to C++ streams for index saving and loading #157

Merged
merged 3 commits into from
Sep 21, 2021
Merged

Switch to C++ streams for index saving and loading #157

merged 3 commits into from
Sep 21, 2021

Conversation

dokempf
Copy link
Contributor

@dokempf dokempf commented Sep 20, 2021

This PR introduces C++ streams instead of the C file handles used before. The intent here is to make the library more consistent w.r.t. its programming language usage and enable specific use cases that are hard to realize portably with C file handles (e.g. in-memory streams).

Some comments in response to @jlblancoc s comments in #156:

  • Using <iosfwd> did not work out, as it only contains forward declarations of the stream classes, so we cannot use stream methods like read and write directly in the header. My compiler only produced warnings for this, but they are rather annoying. Instead, I had to include <istream> + <ostream>.
  • The Doxygen annotations already state that we save in binary format. Nothing changed about that.

This fixes #156.

@jlblancoc jlblancoc merged commit 4cc31db into jlblancoc:master Sep 21, 2021
@jlblancoc
Copy link
Owner

Great, thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switching to C++ streams for save/load operations
2 participants