1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/storage/block.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/common/common.hpp"
12#include "duckdb/storage/storage_info.hpp"
13#include "duckdb/common/file_buffer.hpp"
14
15namespace duckdb {
16
17class Block : public FileBuffer {
18public:
19 Block(Allocator &allocator, block_id_t id);
20 Block(Allocator &allocator, block_id_t id, uint32_t internal_size);
21 Block(FileBuffer &source, block_id_t id);
22
23 block_id_t id;
24};
25
26struct BlockPointer {
27 BlockPointer(block_id_t block_id_p, uint32_t offset_p) : block_id(block_id_p), offset(offset_p) {};
28 BlockPointer() {};
29 block_id_t block_id {0};
30 uint32_t offset {0};
31};
32
33} // namespace duckdb
34