24 #ifndef GRAPHLAB_SERIALIZE_ITERATOR_HPP
25 #define GRAPHLAB_SERIALIZE_ITERATOR_HPP
28 #include <graphlab/serialization/oarchive.hpp>
29 #include <graphlab/serialization/iarchive.hpp>
53 template <
typename OutArcType,
typename RandomAccessIterator>
55 RandomAccessIterator end){
56 const size_t vsize = std::distance(begin, end);
59 for(; begin != end; ++begin) oarc << *begin;
84 template <
typename OutArcType,
typename InputIterator>
86 InputIterator end,
size_t vsize){
90 for(; begin != end; ++begin) { oarc << *begin; ++count; }
92 ASSERT_EQ(count, vsize);
117 template <
typename InArcType,
typename T,
typename OutputIterator>
124 for (
size_t x = 0; x < length ; ++x){