From 55bd25054b789cec99e45ee512380cc44931d9b5 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 30 Jun 2024 17:50:44 +0300 Subject: [PATCH] Add a workaround for duplicate ids if Doxygen inlines inherited class members. When Doxygen option INLINE_INHERITED_MEMB=YES is used, Doxygen generates duplicate class member definitions with the same ids, when the member is inherited from a base class. This results in duplicate ids in BoostBook output and the corresponding errors. Work around this by checking if the member id starts with the id of the enclosing class. If it does then the member is assumed to be a genuine member of the class and we generate a Doxygen id for it. Doxygen refs will point to this definition of the member. If the member id is different then it must be an inherited member, and we don't generate a Doxygen id for it. BoostBook stylesheets will generate a unique id for it, which will be used to link synopsis to reference of the member in the derived class' documentation. --- xsl/doxygen/doxygen2boostbook.xsl | 93 ++++++++++++++++++++++++------- 1 file changed, 73 insertions(+), 20 deletions(-) diff --git a/xsl/doxygen/doxygen2boostbook.xsl b/xsl/doxygen/doxygen2boostbook.xsl index eaedd3f..27dee2e 100644 --- a/xsl/doxygen/doxygen2boostbook.xsl +++ b/xsl/doxygen/doxygen2boostbook.xsl @@ -304,6 +304,7 @@ + @@ -313,7 +314,7 @@ - + @@ -323,7 +324,9 @@ - + + + @@ -334,6 +337,8 @@ + + + + + + + + + + + - + @@ -1341,6 +1381,7 @@ + @@ -1366,7 +1407,7 @@ - + @@ -1384,7 +1425,7 @@ - + @@ -1438,8 +1479,10 @@ + + - + @@ -1455,8 +1498,10 @@ + + - + @@ -1469,8 +1514,10 @@ + + - + @@ -1488,8 +1535,10 @@ + + - + @@ -1512,8 +1561,10 @@ + + - + @@ -1537,9 +1588,11 @@ + + - +