Encapsulates the information given with the links that this whole project was created for. Instances represent an XLink to a doxygen Target as given by the user.
#include <xlink.hpp>
Public Type Index: | |
| enum class | Errors { OK = 0 , TooManyParentsRequested = 1 , AnchorHasNoTitle = 2 , InappropriateDisplayTweak = 3 , WARNINGMARKER = 4 , Empty = 5 , NoTargetNameGiven = 6 , TooManyScopeHints = 7 , ScopeTooDeep = 8 , UnknownUnderlyingType = 9 , IllegalTargetKind =10 , LocalLinkWithScopeHints =11 , RestoringAmbiguousLocalLink = 12 , RestoringUnusedLocalLink = 13 } |
| Possible results when parsing source links. More... | |
Public Static Field Index: | |
| static constexpr int | MAX_SCOPE_DEPTH = 20 |
| The maximum number of scope hints and parents. | |
Public Static Method Index: | |
| static Index::Node | ResolveTypeDef (const Index::Node &startCursor, const alib::String &origSearchString) |
Public Field Index: | |
| Target::FunctionArguments * | Args = nullptr |
| Function arguments provided with the source XLink. | |
| alib::ListMA< Index::Node > * | BaseTypes = nullptr |
| Styles | CSSClasses |
| alib::StdVectorMA< Index::Node > | DidYouMeanFunctionOverload |
| alib::StdVectorMA< Index::Node > | DidYouMeanNotATemplate |
| A list of entries that are not templates, while a template type was searched. | |
| alib::StdVectorMA< Index::Node > | DidYouMeanSameName |
| A list of target nodes with the same name. | |
| alib::StdVectorMA< Index::Node > | DidYouMeanSpecializations |
| Index::Node | DidYouMeanTemplateType |
| alib::StdVectorMA< Index::Node > | DidYouMeanVariable |
| A list of entries that are variables, while the XLink's subscript does not match. | |
| alib::String | Display = nullptr |
| alib::integer | DisplayOriginalPos = 0 |
| Errors | Error = Errors::OK |
| Possible errors that occured during parsing the search string given by the user. | |
| alib::files::FTree::ConstCursorHandle | HTMLFileOfLocalLink = 0 |
| The tree node of the HTML file which created this copy of the originally given local XLink. | |
| alib::StdVectorMA< Location > | HTMLLocations |
| bool | IsLocal = false |
| bool | IsUnderlyingTypeDef = false |
| Target::Kinds | KindSpec = Target::UNSPECIFIED |
| Function arguments provided with the source XLink. | |
| alib::String | LinkString |
| The original source string. | |
| XLink * | linkToParentScope = nullptr |
| Index::ConstCursorHandle | LocalLinkEntity = 0 |
| alib::Lock | Lock |
| The lock protecting the creation phase and as well allocator access. | |
| alib::MonoAllocator | MA |
| The mono allocator used to create the members of the class. | |
| XLink * | NextLocal = nullptr |
| bool | NoIndirectionWarning = false |
| bool | NotFoundInHTML = false |
| This flag is set when the specified link identifier was not found in the HTML files. | |
| alib::String | Qualifiers = nullptr |
Function qualifiers like const, or nothrow provided with the source XLink. | |
| alib::StdVectorMA< Location > | SourceLocations |
| Target::TemplateArguments * | SpecializationArgs = nullptr |
| alib::String | Subscript = nullptr |
| A variable subscript provided by the source XLink. | |
| alib::StdVectorMA< Index::SearchResult > | Targets |
| Target::TemplateArguments * | TemplateArgs = nullptr |
| alib::ListMA< Index::Node > * | TypeDefinitionTargets = nullptr |
| bool | WasPrinted = false |
Public Method Index: | |
| XLink () | |
| Constructor. Parses the given searchString and allocates the fields in the ma. | |
| void | AssembleDisplay () |
| int | CountLocalCopies () |
| void | DbgReset () |
| This method is need for the unit-tests and available only with debug-compilations. | |
| void | findInherited (const decltype(TGTRecord::BaseTypes)&bases) |
| XLink * | GetLinkToParent () |
| std::pair< XLink *, bool > | GetLocalCopy (const alib::files::File &htmlFile) |
| bool | HasErrors () const |
| bool | HasWarnings (bool ignoreIndirects) |
| const alib::String & | Hint (int n) const |
| int | HintsSize () const |
| bool | IsGood (bool ignoreIndirects) |
| bool | IsParsed () const |
| bool | IsResolved () const |
| alib::String & | Name () const |
| void | Parse () |
| Parses the given searchString and allocates the fields in the MA. | |
| void | PrintError (alib::Paragraphs &out, const alib::String &linkString, bool suppressHints=false) |
| Index::SearchResult & | Result () |
| const Index::SearchResult & | Result () const |
| const alib::String & | Scope (int n) const |
| int | ScopeSize () const |
Protected Field Index: | |
| alib::String * | scope |
| int | scopeHintsSize |
| The number of strings in the array scope that are only hints. | |
| int | scopeSize = 0 |
|
strong |
Possible results when parsing source links.
| Enumerator | |
|---|---|
| OK | No error or warning. |
| TooManyParentsRequested | Warning: The display requested more parents to include than available. |
| AnchorHasNoTitle | Warning: An anchor without a title was used without providing a user-defined display string. DoxygenXLinks inserts the anchor name in this case. |
| InappropriateDisplayTweak | A display tweak was given that is not applicable to the resolved target type. |
| WARNINGMARKER | This is a marker-element that separates warnings from Errors. |
| Empty | The search string was empty (apart from possible whitespaces). |
| NoTargetNameGiven | No target identifier was given. |
| TooManyScopeHints | Too many scope-hints (words separated with spaces) were given. |
| ScopeTooDeep | The number of nested scope (namespaces/compounds) is too huge. |
| UnknownUnderlyingType | The underlying type requested with '^' was not found. |
| IllegalTargetKind | The target kind specification must be "!k " with k being a valid kind identification-character and a space following. |
| LocalLinkWithScopeHints | A local XLink (aka the identifier section starts with |
| RestoringAmbiguousLocalLink | This error is set, with the command line option |
| RestoringUnusedLocalLink | This error is set, with the command line option |
| Target::FunctionArguments* dxl::XLink::Args = nullptr |
| alib::ListMA<Index::Node>* dxl::XLink::BaseTypes = nullptr |
| Styles dxl::XLink::CSSClasses |
| alib::StdVectorMA<Index::Node> dxl::XLink::DidYouMeanFunctionOverload |
| alib::StdVectorMA<Index::Node> dxl::XLink::DidYouMeanNotATemplate |
| alib::StdVectorMA<Index::Node> dxl::XLink::DidYouMeanSameName |
| alib::StdVectorMA<Index::Node> dxl::XLink::DidYouMeanSpecializations |
| Index::Node dxl::XLink::DidYouMeanTemplateType |
| alib::StdVectorMA<Index::Node> dxl::XLink::DidYouMeanVariable |
| alib::String dxl::XLink::Display = nullptr |
The name of the entity to find (namespace, record, variable, function, enumeration element, type definition, etc).
If "*" is given, the following rules apply:
typename<...> with the list of all template parameters is prepended. <- This is a TODO(251221 08:27):<...> is appended. <- This is a TODO(251221 08:27): | alib::integer dxl::XLink::DisplayOriginalPos = 0 |
The position of the display string in the original search string. Note: This information is solely needed for implementing the ALib expression function LinkDisplay
| Errors dxl::XLink::Error = Errors::OK |
| alib::files::FTree::ConstCursorHandle dxl::XLink::HTMLFileOfLocalLink = 0 |
| alib::StdVectorMA<Location> dxl::XLink::HTMLLocations |
| bool dxl::XLink::IsLocal = false |
| bool dxl::XLink::IsUnderlyingTypeDef = false |
This flag is set if "^" is given at the start of the XLink and the target is a type definition and it's parent is not a record (or the parent was not given).
Note that this flag is set only after the link is resolved in the method GetXLink. Before (namely after parsing the link and during the search and disambiguation process) instead the flag NoIndirectionWarning is set. The latter then is cleared.
| Target::Kinds dxl::XLink::KindSpec = Target::UNSPECIFIED |
| alib::String dxl::XLink::LinkString |
| XLink* dxl::XLink::linkToParentScope = nullptr |
| Index::ConstCursorHandle dxl::XLink::LocalLinkEntity = 0 |
The entity in the string tree that corresponds to the HTML file given with the field HTMLFileOfLocalLink.
| alib::Lock dxl::XLink::Lock |
| alib::MonoAllocator dxl::XLink::MA |
|
staticconstexpr |
| XLink* dxl::XLink::NextLocal = nullptr |
A list of copies of this link, which is filled when disambiguation was (only) possible through the link's HTML file name. In this case, the same link, for example, "Size" can be dissolved into various different targets. This whole concept makes things a little complicated but allows easy linking to local members!
| bool dxl::XLink::NoIndirectionWarning = false |
| bool dxl::XLink::NotFoundInHTML = false |
| alib::String dxl::XLink::Qualifiers = nullptr |
|
protected |
An array of identifiers listed in the source XLink. The first members of the list are 'hints' given by the user separated by spaces. Those hints are used with a substring search in a component path.
The rest of the list represents fully-named parents and finally the component itself. The separation and length of the list is given with the fields scopeHintsSize and scopeSize.
|
protected |
|
protected |
| alib::StdVectorMA<Location> dxl::XLink::SourceLocations |
| Target::TemplateArguments* dxl::XLink::SpecializationArgs = nullptr |
| alib::String dxl::XLink::Subscript = nullptr |
| alib::StdVectorMA<Index::SearchResult> dxl::XLink::Targets |
| Target::TemplateArguments* dxl::XLink::TemplateArgs = nullptr |
| alib::ListMA<Index::Node>* dxl::XLink::TypeDefinitionTargets = nullptr |
| bool dxl::XLink::WasPrinted = false |
|
inline |
| void dxl::XLink::AssembleDisplay | ( | ) |
|
inline |
|
inline |
| void dxl::XLink::findInherited | ( | const decltype(TGTRecord::BaseTypes)& | bases | ) |
| XLink * dxl::XLink::GetLinkToParent | ( | ) |
Creates (once) and returns an XLink targeting the parent-scope of this XLink. The returned XLink is already resolved and its Targets can be iterated.
This function is used to find inherited- and type-definition-members. It furthermore creates and fills the field BaseTypes.
This function will be called by Search only in the case that this XLink contains a parent specification.
| std::pair< XLink *, bool > dxl::XLink::GetLocalCopy | ( | const alib::files::File & | htmlFile | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| ignoreIndirects | Passed to internally used method HasWarnings. |
true, if exactly one match was found, false otherwise.
|
inline |
|
inline |
|
inline |
| void dxl::XLink::Parse | ( | ) |
| void dxl::XLink::PrintError | ( | alib::Paragraphs & | out, |
| const alib::String & | linkString, | ||
| bool | suppressHints = false ) |
|
static |
Helper that searches the target of a type definition. Supports:
| startCursor | A reference to the cursor that points to the type definition. |
| origSearchString | The original search string. This is used for log-output only. |
|
inline |
true. Otherwise, this is undefined behavior. In debug-builds, an ALib assertion is raised, if IsResolved is false.
|
inline |
true. Otherwise, this is undefined behavior. In debug-builds, an ALib assertion is raised, if IsResolved is false.
|
inline |
|
inline |