/* * Copyright (c) 2019-2020, Sergey Bugaev * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Manual { class SectionNode; class PageNode : public Node { public: virtual ~PageNode() override = default; PageNode(NonnullRefPtr section, String page) : m_section(move(section)) , m_page(move(page)) { } virtual ErrorOr>> children() const override; virtual Node const* parent() const override; virtual ErrorOr name() const override { return m_page; }; virtual bool is_page() const override { return true; } virtual PageNode const* document() const override { return this; }; virtual ErrorOr path() const override; static ErrorOr> help_index_page(); private: NonnullRefPtr m_section; String m_page; }; }