2020-01-18 11:38:21 +03:00
|
|
|
/*
|
2020-01-24 16:45:29 +03:00
|
|
|
* Copyright (c) 2019-2020, Sergey Bugaev <bugaevc@serenityos.org>
|
2020-01-18 11:38:21 +03:00
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 11:38:21 +03:00
|
|
|
*/
|
|
|
|
|
2019-09-21 00:47:31 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ManualNode.h"
|
|
|
|
|
|
|
|
class ManualSectionNode;
|
|
|
|
|
|
|
|
class ManualPageNode : public ManualNode {
|
|
|
|
public:
|
2020-09-18 10:49:51 +03:00
|
|
|
virtual ~ManualPageNode() override { }
|
2019-09-21 00:47:31 +03:00
|
|
|
|
2021-11-11 02:55:02 +03:00
|
|
|
ManualPageNode(const ManualSectionNode& section, StringView page)
|
2019-09-21 00:47:31 +03:00
|
|
|
: m_section(section)
|
|
|
|
, m_page(page)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual NonnullOwnPtrVector<ManualNode>& children() const override;
|
|
|
|
virtual const ManualNode* parent() const override;
|
|
|
|
virtual String name() const override { return m_page; };
|
|
|
|
virtual bool is_page() const override { return true; }
|
|
|
|
|
|
|
|
String path() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
const ManualSectionNode& m_section;
|
|
|
|
String m_page;
|
|
|
|
};
|