-
Notifications
You must be signed in to change notification settings - Fork 0
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
RValue Stream Loading #286
Comments
Alternative idea: auto artFile = Stream::FileReader("filename.art").Read<ArtFile>(); That syntax would also make it easier to read one-off trivial types: // int someValue;
// reader.Read(someValue);
auto someValue = reader.Read<int>(); Assuming the template parameter doesn't interfere with existing templated stream methods. |
I'll handle adding RValue Reading of a bitmap file in Bitmap.h We do not support reading a clm or vol from an arbitrary stream (they both use their constructor to read via filename). Are you wanting to add an overload for a stream, both in lvalue and rvalue form? We don't currently have a use case but I am not opposed to the idea either. |
Yes, I was thinking of adding Stream overloads to both Vol and CLM files. Any thoughts about the second alternative idea I suggested? I suppose they aren't mutually exclusive, but I suspect we would only use 1 form in any given project. |
Sorry for the very late reply. I would certainly support a factory read function. This would allow easy creation of custom read functions for a class, which I have done on occasion on other C# projects. |
It's convenient to be able to load objects from files in 1 line of code. This is easier to do if we are able to load from unnamed temporary stream objects.
Ex:
We should update the library to allow for more wide-spread 1 line loading of various objects from streams.
The text was updated successfully, but these errors were encountered: