This repository has been archived by the owner on Oct 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a
load
Inja callback that loads the JSON data for a given refid.
In certain contexts, Doxygen omits information about template parameters. For example, in the Doxygen data for a group, information on the template parameters of classes in that group is not available. This omission is quite unfortunate, as it's rather vital, and it makes it impossible to properly render the declarations of classes within a group. Fortunately, the template parameter information is available in the data file for the class itself. We can always find that data file, because we always have its refid. So, if we are able to load a Doxygen data file by refid as JSON within Doxybook, we can always get access to the template parameters of a class, or any other missing information. To load the data for a refid, we need: * A `Doxygen` object, to find the `Node` for the refid in the `Node` cache. * A `JsonConverter` object, to load the data from the `Node`. We must add all Inja callbacks before we load the templates. The templates are loaded in the constructor of `Renderer` objects, so we typically add our Inja callbacks in that constructor. However, `Renderer` objects have access to neither a `Doxygen` object nor a `JsonConverter` object. Moving the template loading logic to a place that does have access to a `Doxygen` and `JsonConverter` object would be a big and undesirable change. `Renderer` objects are contained in `Generator` objects, which also contain a reference to an `JsonConverter` object. A reference to a `Doxygen` object was added to `Generator`, which was fairly straightforward. There's always a `Doxygen` object around when a `Generator` is constructed, and `Generator` has a number of methods that need to be passed a `Doxygen` object anyways. A reference to both a `Doxygen` and `JsonConverter` was also added to `Renderer` objects; `Generator` passes them through upon construction of a `Renderer.
- Loading branch information
1 parent
e2083f2
commit 8704496
Showing
5 changed files
with
50 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters