-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add serialization #25
Conversation
Synchronize master with develop
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
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.
Licensing issues...
@@ -12,6 +12,7 @@ project | |||
: requirements | |||
<library>/boost/system//boost_system | |||
<library>/boost/thread//boost_thread | |||
<library>/boost//serialization |
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.
This doesn't match the others - is it correct?
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.
you mean the library location? i don't know why it is different, but this is the correct one for serialization
This would make circular_buffer have a dependency on serialization which I'm not sure we want. |
It would be easy enough to include macro guards to disable it entirely if someone so desired... |
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
The tests only test a completely full buffer consisting of one span. In general, an archive does not allow two save_binary calls on save to be loaded with one load_binary. Using binary serialization is questionable anyway. This only works for trivially copyable types, and the code doesn't check that; and text/xml archives are supposed to be portable, and dumping binary into them defeats their purpose. This implementation is only suitable for use with the nonportable binary archive. |
Fragmented buffer was tested in the examples, will add to the unit test.
Didn't want to use serialize,to avoid changes to the buffer. Can change to 2 separate calls of load_binary. BTW, why is there an issue with 2 calls? In general binary serialization was used for performance reasons, but I do see the issues with it. Will modify the implementation archive the elements one by one. There is probably a way to specialize for the case that the archive is binary anyway - will look into that. |
Well, suppose that some XML archive implements |
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
|
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
Documentation is useful, so if you can add it to the docs (BOOST_CIRCULAR_BUFFER_DISABLE_SERIALIZATION), I think that's best. |
Adding circular buffer serialization (including the space optimized version). This is to address issue #24.
For performance reasons the serialization of the buffer itself is done in, bulk, in binary format, and not element by element.