24 #ifndef HYRAX_GIT_SUPERCHUNK_H
25 #define HYRAX_GIT_SUPERCHUNK_H
41 std::string d_data_url;
42 std::vector<std::shared_ptr<Chunk>> d_chunks;
43 unsigned long long d_offset;
44 unsigned long long d_size;
48 bool is_contiguous(std::shared_ptr<Chunk> candidate_chunk);
49 void map_chunks_to_buffer();
50 void read_aggregate_bytes();
54 d_data_url(
""), d_offset(0), d_size(0), d_is_read(
false), d_read_buffer(
nullptr){}
57 delete[] d_read_buffer;
60 virtual bool add_chunk(std::shared_ptr<Chunk> candidate_chunk);
62 virtual std::string get_data_url(){
return d_data_url; }
63 virtual unsigned long long get_size(){
return d_size; }
64 virtual unsigned long long get_offset(){
return d_offset; }
67 virtual bool empty(){
return d_chunks.empty(); }
70 std::vector<std::shared_ptr<Chunk>> get_chunks(){
return d_chunks; }
75 std::string
to_string(
bool verbose)
const;
76 virtual void dump(std::ostream & strm)
const;
virtual void read()
Cause the SuperChunk and all of it's subordinate Chunks to be read.
virtual bool add_chunk(std::shared_ptr< Chunk > candidate_chunk)
Attempts to add a new Chunk to this SuperChunk.
std::string to_string(bool verbose) const
Makes a string representation of the SuperChunk.
virtual void dump(std::ostream &strm) const
Writes the to_string() output to the stream strm.