diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2022-12-14 13:46:13 +0100 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2023-01-02 06:15:13 -0700 |
commit | 44e4a38535be929ca2cc7d14fc3e0a409304071f (patch) | |
tree | 872448648fa64ffe40d6e50f3da907ef0ca0a649 /Userland/Libraries/LibManual/Node.h | |
parent | aa5e5748725b773d1efb7b5cd762925421874229 (diff) | |
download | serenity-44e4a38535be929ca2cc7d14fc3e0a409304071f.zip |
LibManual: Allow overriding a Node's path calculation
This is necessary for subclassing SectionNode, but generally allows more
code to rely on path() virtual dispatch always finding the correct path
regardless of the static type.
Diffstat (limited to 'Userland/Libraries/LibManual/Node.h')
-rw-r--r-- | Userland/Libraries/LibManual/Node.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibManual/Node.h b/Userland/Libraries/LibManual/Node.h index cf72a984a2..5fcd241121 100644 --- a/Userland/Libraries/LibManual/Node.h +++ b/Userland/Libraries/LibManual/Node.h @@ -25,6 +25,7 @@ public: virtual ErrorOr<String> name() const = 0; virtual bool is_page() const { return false; } virtual bool is_open() const { return false; } + virtual ErrorOr<String> path() const = 0; // Backend for the command-line argument format that Help and man accept. Handles: // [/path/to/documentation.md] (no second argument) |