-
Notifications
You must be signed in to change notification settings - Fork 171
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
Refactor OriginalLabel class to remove inheritance from Blob #4309
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just two small comments really.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things to discuss but overall looks good!
void Cube::write(OriginalLabel lab) { | ||
write(*(lab.toBlob())); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this write method makes things easier but I don't know how necessary it is and that's something I have been going back and forth on. It'd be good for us to figure out exactly how we want to be writing these blobs back out. While the *(lab.toBlob())
is a little messy I don't think it's bad to have write(*(lab.toBlob()))
all over the place rather than write(lab)
For reading/writing these things, I think the purest thing to do is enforce File <-> Blob <-> Class. It requires a bit more code but it's straight forward. Then, I start writing code and I just wish I had a direct read/write method that wrapped the File <-> Blob part. I could see either way, but we should be consistent. |
* Updated to new blob structure * Clean up after being able to look at all of the changes at once * Changed the history read to return a history object rather than a pointer * Addressed PR feedback * Imagepolygon Update (#4308) * Converted Imagepolygon to no longer be a subclass of blob * Updated Imagepolygon with constructor chaining * Fixed error message * Refactor OriginalLabel class to remove inheritance from Blob (#4309) * Initial refactor of OriginalLabel class * Addressed PR feedback * Fixed error message Co-authored-by: Jesse Mapel <[email protected]> * Modified Table to not inherit from Blob anymore (#4312) * Ported Table test to gtest * Table refactor * Fixed merge issue * Fixed merge issues * Removes blob inheritance from OriginalXmlLabel (#4316) * Initial refactor of OriginalLabel class * Addressed PR feedback * Fixed error message * Remove blob inheritance from originalxmllabel * Removed commented / old code * Added byte order specification * History object tests (#4314) * Adds History object tests * Updated blob tests to use a non-pointer variable * Removed gisblob from isis (#4329) * Removed blob inheritance from stretchblob (#4331) * Removed blob inheritance from stretchblob * Addressed feedback + working read/write * Updated cubestretch with the stretch blob functionality * Removed stretchBlob and updated cubestretch/cube with read write functionality * Replaced readStretchBlob with readCubeStretch * Fixed segfault * Removed debug print statements * Added check for existence of OriginalLabel before attempting to propagate * Addressed PR feedback Co-authored-by: Adam Paquette <[email protected]> * Removed StringBlob Class (#4321) * Converted StringBlob * Removed StretchBlob class * Changed Blob setData to copy * Added csminit change and docs * Removed old memcopy * History Blob Old Implementation (#4342) * Implemented old history functionality * Removed old history unit test * Fixed original label reading * Fixed Blob branch test failures (#4344) * Fixed test failures * More clean-up * Fixed marci2isis test * Blob final clean-up (#4346) * Redid Blob writing * Added docs * Review feedback * Fixed int comparison Co-authored-by: Adam Paquette <[email protected]> Co-authored-by: AustinSanders <[email protected]>
Refactor OriginalLabel class to remove inheritance from Blob
Description
Refactor OriginalLabel to remove inheritance from Blob.
Related Issue
Motivation and Context
More clearly separates functionality so that we can move toward building pvl / blob / functionality independently.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Licensing
This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words: