Doxygen XLinks
by
V: 2511R0
Website: doxygen
Loading...
Searching...
No Matches
jobs.hpp
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header-file is part of \dxl - A doxygen post-processor that allows to define smarter
4/// <b>Doxygen</b>-links.
5///
6/// \emoji :copyright: 2025-2026 A-Worx GmbH, Germany.
7/// Published under \ref mainpage_license "Boost Software License".
8//==================================================================================================
9#ifndef HPP_DXL_JOB
10#define HPP_DXL_JOB
11#pragma once
12#include "threadpool.hpp"
13#include "ALib.ThreadModel.H"
14#include "ALib.Files.H"
15
16
17
18namespace dxl {
19
20class DoxygenXLinks;
21class Index;
22
23/// This is a job executed by the #"ThreadPool" in class #"DoxygenXLinks".
24/// The job loads an index file. Only external tag-file are loaded by the thread pool.
25/// The main tag-file is loaded by the main thread.
27 /// The index to load.
29
30 /// Constructor.
31 /// @param pIndex The index to load.
32 IndexLoader( Index& pIndex )
33 : DXLJob(typeid(IndexLoader))
34 , index(pIndex) {}
35
36 /// Overrides the parent function as necessary.
37 /// @return The sizeof this derived type.
38 size_t SizeOf() override { return sizeof(IndexLoader); }
39
40 /// Implements this job.
41 /// @return Constant \c true.
42 bool Do() override;
43};
44
45/// This is a job executed by the #"ThreadPool" in class #"DoxygenXLinks".
46/// The job loads an HTML file and searches for #"XLink"s and replaces them with an
47/// HTML anchor.
49 /// The main linker class.
51
52 /// The HTML-file to load and search for \dxl links.
54
55 /// Constructor.
56 /// @param pDL A reference to the main class.
57 /// @param pHtmlFileNode The HTML file to read and search for #"XLink"s.
59 : DXLJob(typeid(HTMLReplacer))
60 , dxl(pDL)
61 , htmlFileNode(pHtmlFileNode) {}
62
63 /// Overrides the parent function as necessary.
64 /// @return The sizeof this derived type.
65 size_t SizeOf() override { return sizeof(HTMLReplacer); }
66
67 /// Implements this job.
68 /// @return Constant \c true.
69 bool Do() override;
70};
71
72/// This is a job executed by the #"ThreadPool" in class #"DoxygenXLinks".
73/// The job loads a source file and searches for locations of the "original" source strings
74/// which are found in HTML files. With that information \dxl is enabled to print the location
75/// of erroneous \xls.<br>
76/// The job just collects the data. The result output is done later in a sorted fashion.
78 /// The main linker class.
80
81 /// The source-file to load and search for \dxl links.
83
84 /// Constructor.
85 /// @param pDL A reference to the main class.
86 /// @param pSrcFileNode The source file to read and search for #"XLink"s.
89 , dxl(pDL)
90 , srcFileNode(pSrcFileNode) {}
91
92 /// Overrides the parent function as necessary.
93 /// @return The sizeof this derived type.
94 size_t SizeOf() override { return sizeof(SourceLocationFinder); }
95
96 /// Implements this job.
97 /// @return Constant \c true.
98 bool Do() override;
99};
100
101/// This is a job executed by the #"ThreadPool" in class #"DoxygenXLinks".
102/// The job loads a source file and searches and replaces \xl.
103/// This is used with option <c>--doxyfy</c> to create a version of the sources that are
104/// free of \xls which can be used as input to \b Doxygen again for creating other output targets.
106 /// The main linker class.
108
109 /// The source-file to load and search for \dxl links.
111
112 /// Constructor.
113 /// @param pDL A reference to the main class.
114 /// @param pSrcFileNode The source file to read and replace #"XLink" in.
117 , dxl(pDL)
118 , srcFileNode(pSrcFileNode) {}
119
120 /// Overrides the parent function as necessary.
121 /// @return The sizeof this derived type.
122 size_t SizeOf() override { return sizeof(SourceLocationFinder); }
123
124 /// Implements this job.
125 /// @return Constant \c true.
126 bool Do() override;
127};
128
129} //namespace [dxl]
130
131
132#endif // HPP_DXL_JOB
todox
Definition doxyfile.cpp:20
The base class DoxygenXLinks-jobs.
bool Do() override
size_t SizeOf() override
Definition jobs.hpp:65
HTMLReplacer(DoxygenXLinks &pDL, alib::files::File pHtmlFileNode)
Definition jobs.hpp:58
alib::files::File htmlFileNode
The HTML-file to load and search for DoxygenXLinks links.
Definition jobs.hpp:53
IndexLoader(Index &pIndex)
Definition jobs.hpp:32
size_t SizeOf() override
Definition jobs.hpp:38
Index & index
The index to load.
Definition jobs.hpp:28
bool Do() override
Definition index.cpp:20
size_t SizeOf() override
Definition jobs.hpp:94
alib::files::File srcFileNode
The source-file to load and search for DoxygenXLinks links.
Definition jobs.hpp:82
SourceLocationFinder(DoxygenXLinks &pDL, alib::files::File pSrcFileNode)
Definition jobs.hpp:87
SourceReplacer(DoxygenXLinks &pDL, alib::files::File pSrcFileNode)
Definition jobs.hpp:115
alib::files::File srcFileNode
The source-file to load and search for DoxygenXLinks links.
Definition jobs.hpp:110
size_t SizeOf() override
Definition jobs.hpp:122