Doxygen XLinks
by
V: 2511R0
Website: doxygen
Loading...
Searching...
No Matches
index.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_INDEX
10#define HPP_DXL_INDEX
11#pragma once
12#include "target.hpp"
13#include "threadpool.hpp"
15#include "ALib.ThreadModel.H"
16#include "ALib.Files.H"
17#include <fstream>
18
19/// A preprocessor constant defined in the file #"F;index.hpp".
20#define TEST_CONSTANT 5
21#undef TEST_CONSTANT
22
23namespace dxl {
24class XLink;
25class DoxygenXLinks;
26
27/// Denotes whether to find inherited members..
28extern bool FindInheritedMembers;
29
30// TODO(251222 17:52): ^^^^ make configurable
31// And: if all is done, disable with ALib dox and instead change links everywhere
32// to XLink to base types and insert the word "inherited" into the documentation.
33// This is much nicer for the reader of a manual.
34// Then: Add a chapter to the DXL manual that it is recommended to switch this off.
35// Or: Change display to automatically display first parent of the path.
36
37
38/// This class holds an #"StringTree;alib::StringTree" of all tags found in a doxygen tag-file.
39/// In addition, a non-unique hash-map is created that allows to find entities in O(1).
40class Index : public alib::containers::StringTree< alib::MonoAllocator,
41 Target*,
42 alib::containers::StringTreeNamesAlloc<> > {
43 friend class DoxygenXLinks;
44
45 protected:
46 /// The type of the string tree that holds the tag-file.
48
49 /// The allocator used for the parent #"StringTree" and for the hashtable in the field #map.
51
52 /// A pod-like struct providing the key for the hash table found in the field #"Index::anchorMap;2".
53 struct AnchorKey {
54 const alib::String& file; ///< The HTML file name that the anchor is defined in.
55 const alib::String& anchor; ///< The anchor name.
56
57 /// Equality operator for AnchorKey.
58 /// @param other The anchor to compare with.
59 /// @return The result of the comparison.
60 bool operator==(const AnchorKey& other) const {
61 return file == other.file && anchor == other.anchor;
62 }
63
64 /// Hash functor for AnchorKey.
65 struct Hash {
66 /// The hash function. Combines the hashes of the two strings using the XOR operator.
67 /// @param key The key to hash.
68 /// @return The hash value.
69 std::size_t operator()(const AnchorKey& key) const {
70 return std::hash<alib::String>()(key.file)
71 ^ std::hash<alib::String>()(key.anchor);
72 }
73 };
74 };
75
76 /// The hashmap providing an index to tree nodes by their name.
77 /// For some compound types, for example, those that represent \e overloaded methods in C++,
78 /// the tree node name string contains additional information like parameter types or
79 /// method qualifiers. Those are stripped before inserted into this map. Thus, this table
80 /// contains multiple entries and has to be fed and queried using the according set of
81 /// interface methods.
84 CursorHandle > entityMap;
85
86 /// Maps HTML-files found to their corresponding tree nodes.
88 const alib::String&,
89 CursorHandle,
90 std::hash<alib::String>,
91 std::equal_to<const alib::String>,
92 alib::lang::Caching::Disabled,
93 alib::Recycling::None > fileMap;
94
95 /// Maps HTML-files found to their corresponding tree nodes.
98 CursorHandle,
100 std::equal_to<AnchorKey>,
101 alib::lang::Caching::Enabled > anchorMap;
102
103 public:
104 /// The cursor type of the #"StringTree".
105 struct Node : protected Cursor {
106
107 /// Defaulted default constructor. Creates an invalid node.
108 Node() = default;
109
110 /// Move constructor from underlying cursor type.
111 /// @param other The cursor to move.
112 Node( Cursor&& other) : Cursor(std::move(other)) {}
113
114 /// Copy constructor from underlying cursor type.
115 /// @param other The cursor to copy.
116 Node( Cursor& other) : Cursor(other) {}
117
118 /// Gets the parent node by calling #"TCursor::Parent;2".
119 /// @return The parent node.
120 Node Parent() { return Cursor::Parent(); }
121
122 /// Gets the parent node by calling #"TCursor::Parent;2".
123 /// @return The parent node.
124 Node Parent() const { return Cursor::Parent(); }
125
126 /// Comparison operator.
127 /// @param other The object to compare ourselves to.
128 /// @return \c true if this and the given cursor are equal, \c false
129 /// otherwise.
130 bool operator==(const Node &other) const {
131 return node == other.node
132 && tree == other.tree;
133 }
134
135 /// Comparison operator.
136 /// @param other The object to compare ourselves to.
137 /// @return \c false if this and the given cursor are equal, \c true otherwise.
138 bool operator!=(const Node &other) const { return !((*this) == other); }
139
140 /// Calls the parent method and then replaces the separator characters accordingly.
141 /// @param targetString The string buffer to append the path to.
142 /// @param targetData Denotes whether \p{target} should be cleared before
143 /// appending the path. Defaults to \b CurrentData::Clear.
144 /// @return The given \b AString to allow concatenated operations.
147 alib::lang::CurrentData targetData=
148 alib::lang::CurrentData::Clear ) const {
149 alib::integer prevLength= targetData == alib::lang::CurrentData::Keep
150 ? targetString.Length()
151 : 0;
152 Cursor::AssemblePath(targetString, targetData);
153 Index().ReplaceFromTreeSeparator(targetString, Kind(), prevLength);
154 return targetString;
155 }
156
157 /// Calls the parent method and then replaces the separator charachters accordingly.
158 /// @param targetString The string buffer to append the path to.
159 /// @param parent Denotes the parent node to start a relative path from.
160 /// @return The given \b AString to allow concatenated operations.
163 Node& parent ) const {
164
165 alib::integer prevLength= targetString.Length();
166 Cursor::AssemblePath(targetString, parent, alib::lang::CurrentData::Keep);
167 Index().ReplaceFromTreeSeparator(targetString, Kind(), prevLength);
168 return targetString;
169 }
170
171 /// Returns the #"Index" that this #"%Index::Node" belongs to.
172 /// @return The index that this object refers to.
173 Index& Index() const { dbgCheckTree(); return *static_cast<class Index*>(tree); }
174
175 /// @return The target that this node refers to.
176 const Target* Target() const { return Value(); }
177
178 /// @return The target that this node refers to.
179 class Target* Target() { return Value(); }
180
181 /// Returns the line number in the tag-file that this node created.
182 /// @return The line number in the tag-file.
183 int LineNo() const { return Target()->LineNo; }
184
185 /// The HTML file that this node links to (or into).
186 /// @return The HTML file name.
187 const alib::String& HTMLFile() const { return Target()->HTMLFile; }
188
189 /// Returns the kind of this target. The result may be used to cast a pointer to the
190 /// corresponding descendant
191 /// @return The kind of this target.
192 Target::Kinds Kind() const { return Target()->Kind(); }
193
194 /// Tests if this node holds a target is of a given \p{aKind}.
195 /// @param kind The kind to test this instance for.
196 /// @return The result of #"Target::IsA;Target()->IsA".
197 bool IsA(Target::Kinds kind) const { return Target()->IsA(kind); }
198
199
200 /// While usually targets are never replaced, this method is only exclamatory used.
201 /// For example, with the method #"tryResolveHTMLTargetFile;2".
202 /// @param newTarget The new target to set.
203 void ReplaceTarget(class Target* newTarget) { Cursor::Value()= newTarget; }
204
205 /// Shortcut to #"Cast(const Target*);(" passing this's #"TCursor::Value;value".
206 /// @tparam TGT The requested target type.
207 /// @tparam TCheck If #"alib::NC" is given, no check whether the right kind is contained in
208 /// this node is performed. Defaults to #"alib::CHK".
209 /// @return The cast type or \c nullptr if the \p{node}'s target is not of the requested type.
210 template<typename TGT, typename TCheck= alib::CHK>
211 requires std::derived_from<TGT, dxl::Target>
212 const TGT* Cast() const { return dxl::Cast<TGT,TCheck>(Value()); }
213
214 // Allowed functions
215 using Cursor::Name;
216 using Cursor::IsRoot;
217 using Cursor::IsValid;
218 using Cursor::IsInvalid;
219 using Cursor::Export;
220
221 /// Cast to to protected parent #"StringTree::Cursor;2".
222 /// @return The cast cursor.
223 Cursor& AsCursor() { return static_cast<Cursor&>(*this); }
224 };
225
226 /// The path to the doxygenTagFile.
228
229 /// The base name component of #FilePath.
231
232 /// The URL of the HTML-output created with this tag-file.
234
235 /// A shared lock to this index. While most of the time (during link resolve) read-only
236 /// access is needed, for a few operations a write-lock must be set. This is, for example,
237 /// done in method #"tryResolveHTMLTargetFile", which modifies the index.
239
240 /// Indicates whether this index is for the main tag file or an imported tag-file of a
241 /// different project. Set with construction.
242 const bool IsMainTagFile;
243
244 protected:
245 /// A list of parts of the #FileName separated by dots. This is used by the methods
246 /// #ScopeHintMatch and #Search to find scope-hints and parent-scopes.<br>
247 /// This list is created once with construction.
249
250 /// The number of components in #fileNameDotComponents.
252 //--------------------------------------- tag-file reading ---------------------------------------
253protected:
254 /// Internal struct that parses a tag-file. Used by the method #loadTagFile.
255 struct Parser {
256 /// our parent
258
259 /// our parent's parent
260 DoxygenXLinks& dxl;
261
262 /// A referenced to the allocator of outer class #Index.
264
265 /// The log verbosity of the parser (used for performance optimization)
267
268 /// A referenced to the \alib text file reader tool.
270
271 /// The path to the doxygenTagFile.
273
274 /// The current line number when reading
275 int lineNo= 0;
276
277 /// The buffer of the line currently read
279
280 /// A parser for the currently read line.
282
283 /// The current tag attributes. Set by #parseTag.
285
286 /// The maximum line width found.
288
289 /// Set by nextLine() in case it finds a <docanchor>.
291
292 /// Constructor
293 /// @param parent The index this instance belongs to.
294 /// @param pReader The input data.
295 /// @param pFilePath The file path of the tag-file.
296 Parser(Index& parent, alib::IStreamReader& pReader, const alib::String& pFilePath);
297
298 /// parses an XML-attribute with the given \p{key} from field #tagAttr.
299 /// @param key The key of the attribute to parse.
300 /// @return The attribute value.
302 return alib::Substring( tagAttr.Substring(
303 tagAttr.IndexOf(alib::String32(key)._("=")) + key.Length() + 2 ))
304 .ConsumeToken('"', alib::lang::Inclusion::Exclude);
305 }
306
307 /// Reads the next line of the file into #lineBuf. Increases #lineNo and sets #line.
308 /// If it reads a \b Doxygen <em><docanchor></em> text, that anchor is added to
309 /// the \p{actCompound}.
310 /// \note This might not be the nicest design, but it's an effective solution. Doc-Anchors
311 /// can just appear in any component.
312 void nextLine();
313
314 /// Parses the given tag from the actual line. If the tag has attributes, that string
315 /// is copied to the field #tagAttr. Otherwise, that field is \e nulled.
316 /// @param tagName The name of the tag to parse.
317 /// @return the contents of the tag.
318 alib::String parseTag(const alib::String& tagName);
319
320 /// Calls #parseTag and allocates the result in our \b MonoAllocator.
321 /// @param tagName The name of the tag to parse.
322 /// @return The allocated copy of the parsed tag.
324 { return alib::String(ma, parseTag(tagName)); }
325
326 /// Parses the given attribute from the current string in #tagAttr.
327 /// If not found, an exception is thrown.
328 /// @param attrName The name of the attribute to parse.
329 /// @param isOptional if \c false if given, an error is logged if the attribute was not
330 /// found.
331 /// @return the contents of the tag.
332 alib::String parseAttr(const alib::String& attrName, bool isOptional= false);
333
334 /// Calls #nextLine and then parseTag.
335 /// @param tagName The name of the tag to parse.
336 /// @return The allocated copy of the parsed tag.
337 alib::String nextTag(const alib::String& tagName) { nextLine(); return parseTag(tagName); }
338
339 /// Calls #nextTag and allocates the result in our \b MonoAllocator.
340 /// @param tagName The name of the tag to parse.
341 /// @return The allocated copy of the parsed tag.
343 { return alib::String(ma, nextTag(tagName)); }
344
345
346 /// Tries to identify \p{tagName} in the current #line. If found, #parseTag is called.
347 /// @param tagName The name of the tag to try to parse.
348 /// @return On success the parsed tag, a \e nulled string otherwise.
350 if (line.Substring(1).StartsWith(tagName))
351 return parseTag(tagName);
352 return alib::NULL_STRING;
353 }
354
355 /// Reads a member at the actual position.
356 /// The returned key equals the member name.
357 /// With #"TGTFunction;function-members", in addition, the argument list is added by
358 /// using the method #"FunctionArguments::PARSE" and likewise the field #"TGT Qualifiers".
359 ///
360 /// If the \p{compoundKind} indicates a \b Doxygen group, then parsing is very tolerant
361 /// because most members are just references to entities defined elsewhere.
362 ///
363 /// @param[out] key The key to use for the string tree.
364 /// @param compoundKind The kind of the compound actually parsed.
365 /// @return A member struct of a type derived of type #"TGTMember".
367
368 /// Adds all anchors in #actDocAnchors to the given parent node and clears the list.
369 /// @param parent The parent node that receives the anchors as children.
370 void addDocAnchors(Cursor& parent);
371 };
372
373 /// Loads the tag-file. This is called by #Load.
374 void loadTagFile();
375
376 public:
377 /// Statistics on the number of entities found per kind in #"Target::Kinds;2".
379
380 /// Statistics on the number of lines in the tag-file
382
383 /// An entry in the vector of search results generated by the method #Search.
385 /// The cursor pointing to the result.
387
388 /// Set if the user has given some hint to match the qualifiers.
389 /// Note that in the case of qualifiers, they are all added to the display, even if just a
390 /// hint was given.
392
393 /// The name of the target HTML-file. If empty, the #HTMLAnchor resides in the same file as
394 /// it was found
396
397 /// The HTML anchor hash. Set only with members.
399
400 /// The result of #"Target::FunctionArguments::MATCH".
401 /// Note that function arguments are only added to the display, if they precisely match.
403
404 /// Set if the user has given some hint to match the qualifiers.
405 /// Note that in the case of qualifiers, they are all added to the display, even if just a
406 /// hint was given.
408
409 /// Set if a member was found in a base type and not in the originally given one.
411
412 /// Set if the given outer scope is a type definition and the member was found in its
413 /// target type.
415
416 /// Set the \xl targets a type-definition and requested to resolve that.
418
419 /// Set if a link targets file that is not in indexed (in the tag-file) but evaluated
420 /// by the file-scanner of \dxl. (Done with the method #"tryResolveHTMLTargetFile".)
422
423 /// Set if the method #DoxygenXLinks::tryResolveHTMLTargetFile" is needed and succeeds.
425
426 /// Shortcut to #"Cast(const Target*);(" passing the #"Index::Node"'s #"TCursor::Value;value".
427 /// @tparam TGT The requested target type.
428 /// @return The cast type or \c nullptr if the #"%Index::Node"'s target is not of the
429 /// requested type.
430 template<typename TGT>
431 requires std::derived_from<TGT, Target>
432 const TGT* Cast() const;
433
434 }; // struct SearchResult
435
436 protected:
437 /// Sub-function called by method #Search in case flag #"XLink::KindSpec" equals
438 /// #"Target::Dir", hence a file is searched by <c>"!d"</c>-specification.
439 /// @param xLink The link found in the HTML-files.
440 void searchFile( XLink& xLink );
441
442 /// Sub-function by #Search which checks various things, like function arguments, template
443 /// parameters, etc, and applies internal disambiguation rules.
444 /// @param xLink The link that is processed.
445 /// @param node The node to evaluate.
446 /// @param isIndirectByInheritance Set if \p{node} is inherited member
447 /// @param isIndirectByTypeDef Set if \p{node} is indirectly found through a type definiton.
448 void evaluateEntity( XLink& xLink, Node node,
449 bool isIndirectByInheritance, bool isIndirectByTypeDef );
450
451 /// Sub-function called at the end of the search-methods to remove group entries.
452 /// @param targets The vector to remove group entries from.
454
455
456 public:
457 /// A timestamp set when loaded.
458 alib::Ticks::Duration LoadTime;
459
460 /// Constructor.
461 /// @param tagFilePath The path to the tag-file.
462 /// @param baseURL The URL that the HTML files that this tag-files represent are found.
463 /// @param isMainTagFile Sets field #".IsMainTagFile".
464 Index(const alib::system::PathString& tagFilePath, const alib::String& baseURL,
465 bool isMainTagFile);
466
467 /// Destructor.
468 ~Index();
469
470 /// After all source code and html files have been scanned, \dxl continues single-threadded.
471 /// By calling this method from #"DoxygenXLinks::Run", we can omit locks in the rest of the
472 /// code without getting warnings. However, when option <c>--doxyfy</c> is given, we
473 /// later enable them again.
474 /// @param sWitch Determines to enable or disable the checks.
476 (void) sWitch;
477 #if ALIB_DEBUG_CRITICAL_SECTIONS
478 alib::lang::DbgCriticalSections::AssociatedLock* lockp= sWitch == alib::lang::Switch::On
479 ? &SLock : nullptr;
480 nodeTable.dcs.DCSLock= lockp;
481 entityMap.dcs.DCSLock= lockp;
482 fileMap .dcs.DCSLock= lockp;
483 anchorMap.dcs.DCSLock= lockp;
484 #endif
485 }
486
487 /// Imports a node (cursor) previously exported with #"TCursor Export".
488 /// @param handle The handle value.
489 /// @return The imported node instance.
490 Node ImportNode( CursorHandle handle ) { return ImportCursor(handle); }
491
492 /// Loads the tag-file and creates the index.
493 void Load();
494
495 /// Returns the #"StringTree"-node of the entity that is described in the given HTML file.
496 /// @param htmlFile The HTML file node.
497 /// @return A cursor pointing to the local entity.
498 ConstCursorHandle GetHTMLFileEntity(const alib::File& htmlFile);
499
500 /// Searches entries in this doxygen tag-file index.
501 /// The given \p{results} vector might be filled already by other instances of this type
502 /// in the case that multiple tag-files are provided with the doxygen INI-file.
503 /// Also, a call to this function might insert more than one result.
504 /// @param xLink The link found in the HTML-files.
505 void Search(XLink& xLink);
506
507 /// Tests if the given node in the Index's #"StringTree" sits in a path that matches the
508 /// #"scopeHintsSize;path hints" of the given \p{searchLink}.
509 /// @param entry The node in the "dxl #Index" to test.
510 /// @param searchLink The search definition to test against.
511 /// @return \c true if the path ints given with this search specification are matching this
512 /// the path to the \p{entry}
513 bool ScopeHintMatch(Node entry, XLink& searchLink);
514
515 /// Replaces the tree separator with the character(s) appropriate for the given kind.
516 /// @param buffer The string buffer to modify.
517 /// @param kind The kind of target for which the separator should be replaced.
518 /// @param startPos The starting position within the buffer where the replacement should begin.
519 /// Defaults to \c 0.
521 alib::integer startPos= 0 );
522
523 /// Replaces character(s) separating the scope of the given kind with the tree separator.
524 /// @param buffer The string buffer to modify.
525 /// @param kind The kind of target for which the separator should be replaced.
526 /// @param startPos The starting position within the buffer where the replacement should begin.
527 /// Defaults to \c 0.
529 alib::integer startPos= 0 );
530
531 /// Dumps the contents of the tag-file branch to the Lox.
532 /// @param branch The branch to dump.
533 void DumpTree(Node branch);
534}; // class Index
535
536/// Shortcut to #"Cast(const Target*);(" passing the given \p{node}'s #"TCursor::Value;value".
537/// @tparam TGT The requested target type.
538/// @tparam TCheck If #"alib::NC" is given, no check whether the right kind is contained in
539/// this node is performed. Defaults to #"alib::CHK".
540/// @param node The index-node.
541/// @return The cast type or \c nullptr if the \p{node}'s target is not of the requested type.
542template<typename TGT, typename TCheck= alib::CHK>
543requires std::derived_from<TGT, Target>
544const TGT* Cast(const Index::Node& node) { return node.Cast<TGT,TCheck>(); }
545
546template<typename TGT>
547requires std::derived_from<TGT, Target>
548const TGT* Index::SearchResult::Cast() const { return dxl::Cast<TGT>(Node); }
549
550
551} //namespace [dxl]
552
553
554#endif // HPP_DXL_INDEX
strings::TAString< typename cmTree::CharacterType, lang::HeapAllocator > & AssemblePath(strings::TAString< typename cmTree::CharacterType > &targetString, const TCursor< true > &parent, lang::CurrentData targetData=lang::CurrentData::Clear) const
constexpr integer Length() const
TString< TChar > ConsumeToken(TChar separator=',', lang::Inclusion includeSeparator=lang::Inclusion::Include)
alib::system::PathString FilePath
The path to the doxygenTagFile.
Definition index.hpp:227
ConstCursorHandle GetHTMLFileEntity(const alib::File &htmlFile)
Definition index.cpp:209
const bool IsMainTagFile
Definition index.hpp:242
alib::MonoAllocator ma
The allocator used for the parent #"StringTree" and for the hashtable in the field map.
Definition index.hpp:50
void dedupGroupEntries(alib::StdVectorMA< SearchResult > &targets)
Definition index.cpp:693
void Search(XLink &xLink)
Definition index.cpp:581
void DbgCriticalSectionCheck(alib::lang::Switch sWitch)
Definition index.hpp:475
alib::Ticks::Duration LoadTime
A timestamp set when loaded.
Definition index.hpp:458
alib::containers::HashMap< alib::MonoAllocator, const alib::String &, CursorHandle, std::hash< alib::String >, std::equal_to< const alib::String >, alib::lang::Caching::Disabled, alib::Recycling::None > fileMap
Maps HTML-files found to their corresponding tree nodes.
Definition index.hpp:93
const alib::String & BaseURL
The URL of the HTML-output created with this tag-file.
Definition index.hpp:233
int fileNameDotComponentsSize
The number of components in fileNameDotComponents.
Definition index.hpp:251
void DumpTree(Node branch)
Definition tagfile.cpp:880
alib::system::PathString FileName
The base name component of FilePath.
Definition index.hpp:230
void Load()
Loads the tag-file and creates the index.
Definition index.cpp:76
void ReplaceToTreeSeparator(alib::AString &buffer, Target::Kinds kind, alib::integer startPos=0)
Definition index.cpp:219
alib::containers::HashMap< alib::MonoAllocator, AnchorKey, CursorHandle, AnchorKey::Hash, std::equal_to< AnchorKey >, alib::lang::Caching::Enabled > anchorMap
Maps HTML-files found to their corresponding tree nodes.
Definition index.hpp:101
void ReplaceFromTreeSeparator(alib::AString &buffer, Target::Kinds kind, alib::integer startPos=0)
Definition index.cpp:226
void searchFile(XLink &xLink)
Definition index.cpp:286
void evaluateEntity(XLink &xLink, Node node, bool isIndirectByInheritance, bool isIndirectByTypeDef)
Definition index.cpp:345
void loadTagFile()
Loads the tag-file. This is called by Load.
Definition tagfile.cpp:372
Node ImportNode(CursorHandle handle)
Definition index.hpp:490
alib::containers::HashMap< alib::MonoAllocator, alib::String, CursorHandle > entityMap
Definition index.hpp:84
bool ScopeHintMatch(Node entry, XLink &searchLink)
Definition index.cpp:235
alib::SharedLock SLock
Definition index.hpp:238
int StatCtdLines
Statistics on the number of lines in the tag-file.
Definition index.hpp:381
Target::KindStats KindStats
Statistics on the number of entities found per kind in #"Target::Kinds;2".
Definition index.hpp:378
StringTree TreeType
The type of the string tree that holds the tag-file.
Definition index.hpp:47
Index(const alib::system::PathString &tagFilePath, const alib::String &baseURL, bool isMainTagFile)
Definition index.cpp:23
~Index()
Destructor.
Definition index.cpp:62
alib::String fileNameDotComponents[10]
Definition index.hpp:248
bool IsA(Kinds aKind) const
Definition target.hpp:240
Kinds Kind() const
Definition target.hpp:235
alib::String HTMLFile
The HTML file that this target links to (or into).
Definition target.hpp:219
Kinds
Enumerates the kinds of compounds found in a the Doxygen tagfile.
Definition target.hpp:28
int LineNo
The line number in the Doxygen tag-file where this entity is defined.
Definition target.hpp:216
HashTable< TAllocator, TPairDescriptor< TKey, TMapped >, THash, TEqual, THashCaching, TRecycling > HashMap
strings::TString< PathCharType > PathString
monomem::TMonoAllocator< lang::HeapAllocator > MonoAllocator
threads::SharedLock SharedLock
constexpr String NULL_STRING
strings::compatibility::std::IStreamReader IStreamReader
files::File File
containers::List< T, MonoAllocator, TRecycling > ListMA
lang::integer integer
strings::TString< character > String
strings::TSubstring< character > Substring
LocalString< 2048 > String2K
strings::TAString< character, lang::HeapAllocator > AString
std::vector< T, StdMA< T > > StdVectorMA
LocalString< 32 > String32
LocalString< 512 > String512
todox
Definition doxyfile.cpp:20
bool FindInheritedMembers
Denotes whether to find inherited members..
const TGT * Cast(const Index::Node &node)
Definition index.hpp:544
HashTable< TAllocator, typename NodeKey::ValueDescriptor, typename NodeKey::Hash, typename NodeKey::EqualTo, lang::Caching::Enabled, TRecycling > nodeTable
Hash functor for AnchorKey.
Definition index.hpp:65
std::size_t operator()(const AnchorKey &key) const
Definition index.hpp:69
A pod-like struct providing the key for the hash table found in the field #"Index::anchorMap;2".
Definition index.hpp:53
const alib::String & anchor
The anchor name.
Definition index.hpp:55
bool operator==(const AnchorKey &other) const
Definition index.hpp:60
const alib::String & file
The HTML file name that the anchor is defined in.
Definition index.hpp:54
The cursor type of the #"StringTree".
Definition index.hpp:105
const TGT * Cast() const
Definition index.hpp:212
const alib::String & HTMLFile() const
Definition index.hpp:187
bool operator==(const Node &other) const
Definition index.hpp:130
alib::strings::TAString< cmTree::CharacterType, alib::lang::HeapAllocator > & Path(alib::strings::TAString< cmTree::CharacterType > &targetString, Node &parent) const
Definition index.hpp:162
class Target * Target()
Definition index.hpp:179
const Target * Target() const
Definition index.hpp:176
Node Parent() const
Definition index.hpp:124
alib::strings::TAString< cmTree::CharacterType, alib::lang::HeapAllocator > & Path(alib::strings::TAString< cmTree::CharacterType > &targetString, alib::lang::CurrentData targetData=alib::lang::CurrentData::Clear) const
Definition index.hpp:146
bool operator!=(const Node &other) const
Definition index.hpp:138
void ReplaceTarget(class Target *newTarget)
Definition index.hpp:203
Index & Index() const
Definition index.hpp:173
Node(Cursor &&other)
Definition index.hpp:112
bool IsA(Target::Kinds kind) const
Definition index.hpp:197
Target::Kinds Kind() const
Definition index.hpp:192
int LineNo() const
Definition index.hpp:183
Node()=default
Defaulted default constructor. Creates an invalid node.
Cursor & AsCursor()
Definition index.hpp:223
Node(Cursor &other)
Definition index.hpp:116
alib::String nextTag(const alib::String &tagName)
Definition index.hpp:337
alib::system::PathString FilePath
The path to the doxygenTagFile.
Definition index.hpp:272
TGTMember * readMember(alib::String512 &key, Target::Kinds compoundKind)
todo: add parameter parent and if html file is the same, then re-use instead of allocation.
Definition tagfile.cpp:187
alib::IStreamReader & reader
A referenced to the ALib text file reader tool.
Definition index.hpp:269
alib::Substring tagAttr
The current tag attributes. Set by parseTag.
Definition index.hpp:284
Parser(Index &parent, alib::IStreamReader &pReader, const alib::String &pFilePath)
Definition tagfile.cpp:22
alib::lox::Verbosity verbosity
The log verbosity of the parser (used for performance optimization).
Definition index.hpp:266
alib::ListMA< TGTDocAnchor * > actDocAnchors
Set by nextLine() in case it finds a <docanchor>.
Definition index.hpp:290
alib::String getAttr(const alib::String &key)
Definition index.hpp:301
void addDocAnchors(Cursor &parent)
Definition tagfile.cpp:64
alib::String tryTag(const alib::String &tagName)
Definition index.hpp:349
alib::Substring line
A parser for the currently read line.
Definition index.hpp:281
alib::MonoAllocator & ma
A referenced to the allocator of outer class Index.
Definition index.hpp:263
alib::String allocNextTag(const alib::String &tagName)
Definition index.hpp:342
alib::String allocTag(const alib::String &tagName)
Definition index.hpp:323
int lineNo
The current line number when reading.
Definition index.hpp:275
alib::String2K lineBuf
The buffer of the line currently read.
Definition index.hpp:278
Index & index
our parent
Definition index.hpp:257
alib::String parseTag(const alib::String &tagName)
Definition tagfile.cpp:98
alib::String parseAttr(const alib::String &attrName, bool isOptional=false)
Definition tagfile.cpp:146
alib::integer maxWidth
The maximum line width found.
Definition index.hpp:287
An entry in the vector of search results generated by the method Search.
Definition index.hpp:384
Node Node
The cursor pointing to the result.
Definition index.hpp:386
alib::String HTMLBaseURL
Definition index.hpp:391
bool IsIndirectLinkToScannedHTMLSourceFile
Set if the method DoxygenXLinks::tryResolveHTMLTargetFile" is needed and succeeds.
Definition index.hpp:424
bool IsIndirectByInheritance
Set if a member was found in a base type and not in the originally given one.
Definition index.hpp:410
alib::String HTMLFile
Definition index.hpp:395
const TGT * Cast() const
Definition index.hpp:548
bool IsResolvedTypeDef
Set the XLink targets a type-definition and requested to resolve that.
Definition index.hpp:417
alib::String HTMLAnchor
The HTML anchor hash. Set only with members.
Definition index.hpp:398