/* * Copyright (c) 2020-2022, Liav A. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include namespace Kernel { class PartitionTable { public: Optional partition(unsigned index); size_t partitions_count() const { return m_partitions.size(); } virtual ~PartitionTable() = default; virtual bool is_valid() const = 0; Vector partitions() const { return m_partitions; } protected: explicit PartitionTable(StorageDevice const&); NonnullRefPtr m_device; Vector m_partitions; }; }