6 #ifndef TURI_SERIALIZE_ITERATOR_HPP 7 #define TURI_SERIALIZE_ITERATOR_HPP 10 #include <core/storage/serialization/oarchive.hpp> 11 #include <core/storage/serialization/iarchive.hpp> 35 template <
typename OutArcType,
typename RandomAccessIterator>
37 RandomAccessIterator end){
38 const size_t vsize = std::distance(begin, end);
41 for(; begin != end; ++begin) oarc << *begin;
66 template <
typename OutArcType,
typename InputIterator>
68 InputIterator end,
size_t vsize){
72 for(; begin != end; ++begin) { oarc << *begin; ++count; }
74 ASSERT_EQ(count, vsize);
99 template <
typename InArcType,
typename T,
typename OutputIterator>
106 for (
size_t x = 0; x < length ; ++x){
void serialize_iterator(OutArcType &oarc, RandomAccessIterator begin, RandomAccessIterator end)
Serializes the contents between the iterators begin and end.
void deserialize_iterator(InArcType &iarc, OutputIterator result)
The accompanying function to serialize_iterator() Reads elements from the stream and writes it to the...