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

No support for reading from stringstream or char buffer? #35

Open
bramtechs opened this issue Jun 27, 2024 · 1 comment
Open

No support for reading from stringstream or char buffer? #35

bramtechs opened this issue Jun 27, 2024 · 1 comment

Comments

@bramtechs
Copy link

bramtechs commented Jun 27, 2024

Hello,
at first sight, the constructor of mINI::INIFile only accepts path to a file.

Could it be possible to pass in your own stream (like a std::stringstream) or just an std::string with content instead of a file path?
It seems that the library is hardcoded to use std::ifstream and std::ofstream, which are handled internally and can't be changed.

Please let me know if I'm missing something or this is unsupported.
Kind regards.

@bramtechs bramtechs changed the title No support for reading from a stringstream? No support for reading from stringstream or char buffer? Jun 27, 2024
@metayeti
Copy link
Owner

Hey. Yeah it only supports a file interface, a stream interface could in theory be implemented. If you make a good enough implementation for it make a PR and I'll consider merging it in. Personally I simply never use it with streams so I have little incentive to implement it myself.

Hope that helps. All the best

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

No branches or pull requests

2 participants