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

parse dbc with istream instead of filename #27

Closed
TheWhiteBug opened this issue Apr 30, 2024 · 2 comments
Closed

parse dbc with istream instead of filename #27

TheWhiteBug opened this issue Apr 30, 2024 · 2 comments

Comments

@TheWhiteBug
Copy link

TheWhiteBug commented Apr 30, 2024

Hi Devon! Thanks for the great lib! I selected it because of its simplicity.

void DbcParser::parse_file(const std::string& file) {
	std::ifstream s(file.c_str());
(...)

The file argument is only needed for the ifstream .
I would suggest to expose an std::istream overload in which case hitting the filesystem would not be required.
This looks like a low hanging fruit while the current limitation causes my current project to depend on writable storage which is highly inconvenient.

Thanks in advance!
Also, reading the announcement, you can make it a c++17 project if you ask me :)

@TheWhiteBug TheWhiteBug changed the title parse dbc with ifstream instead of filename parse dbc with istream instead of filename Apr 30, 2024
@LinuxDevon
Copy link
Owner

LinuxDevon commented May 9, 2024

Hi @TheWhiteBug, Thank you for the feedback and appreciate you picking my library! That seems like an easy add and can take care of that. I will try and add that in a few weeks. Bit slammed on time right now. I can cut a release with that change when I get that in.

I'll pop back here if I have any questions and tag you on the PR to make sure I implement what you require.

@LinuxDevon
Copy link
Owner

Will be included in v0.5.0

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