summaryrefslogtreecommitdiffstats
path: root/src/definition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/definition.cpp')
-rw-r--r--src/definition.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/definition.cpp b/src/definition.cpp
index 457c6ea..a210295 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -1943,4 +1943,27 @@ bool Definition::hasBriefDescription() const
return !briefDescription().isEmpty() && briefMemberDesc;
}
+QCString Definition::externalReference(const QCString &relPath) const
+{
+ QCString ref = getReference();
+ if (!ref.isEmpty())
+ {
+ QCString *dest = Doxygen::tagDestinationDict[ref];
+ if (dest)
+ {
+ QCString result = *dest;
+ int l = result.length();
+ if (!relPath.isEmpty() && l>0 && result.at(0)=='.')
+ { // relative path -> prepend relPath.
+ result.prepend(relPath);
+ l+=relPath.length();
+ }
+ if (l>0 && result.at(l-1)!='/') result+='/';
+ return result;
+ }
+ }
+ return relPath;
+}
+
+