mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
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.
This commit is contained in:
parent
aa5e574872
commit
44e4a38535
3 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue