6 #ifndef TURI_SFRAME_ENCODED_BLOCK_HPP 7 #define TURI_SFRAME_ENCODED_BLOCK_HPP 9 #include <boost/circular_buffer.hpp> 12 #include <core/data/flexible_type/flexible_type.hpp> 13 #include <core/storage/sframe_data/sarray_v2_block_types.hpp> 27 namespace v2_block_impl {
29 class encoded_block_range;
30 struct typed_decode_stream;
56 init(info, std::move(data));
84 void init(
block_info info, std::shared_ptr<std::vector<char> > data);
99 inline size_t size()
const {
104 return m_block.m_block_info;
107 std::shared_ptr<std::vector<char> > get_block_data()
const {
108 return m_block.m_data;
120 std::shared_ptr<std::vector<char> > m_data;
160 size_t decode_to(
flexible_type* decode_target,
size_t num_elem);
168 encoded_block::block m_block;
169 std::unique_ptr<typed_decode_stream> decoder;
void init(block_info info, std::vector< char > &&data)
encoded_block & operator=(const encoded_block &)=default
Default Copy assignment.
encoded_block(block_info info, std::vector< char > &&data)
block constructor from data contents; simply calls init().
encoded_block(block_info info, std::shared_ptr< std::vector< char > > data)
block constructor from data contents; simply calls init().
encoded_block_range get_range()
encoded_block()
Default constructor. Does nothing.