Doxygen
Loading...
Searching...
No Matches
docbookgen.cpp File Reference
#include <stdlib.h>
#include "docbookgen.h"
#include "doxygen.h"
#include "message.h"
#include "config.h"
#include "classlist.h"
#include "classdef.h"
#include "diagram.h"
#include "util.h"
#include "defargs.h"
#include "outputgen.h"
#include "dot.h"
#include "dotcallgraph.h"
#include "dotclassgraph.h"
#include "dotdirdeps.h"
#include "dotgroupcollaboration.h"
#include "dotincldepgraph.h"
#include "pagedef.h"
#include "filename.h"
#include "version.h"
#include "docbookvisitor.h"
#include "docparser.h"
#include "language.h"
#include "parserintf.h"
#include "arguments.h"
#include "memberlist.h"
#include "groupdef.h"
#include "memberdef.h"
#include "namespacedef.h"
#include "membername.h"
#include "membergroup.h"
#include "dirdef.h"
#include "section.h"
#include "dir.h"
#include "outputlist.h"
#include "moduledef.h"
Include dependency graph for docbookgen.cpp:

Go to the source code of this file.

Macros

#define Docbook_DB(x)
#define DB_GEN_C
#define DB_GEN_C1(x)
#define DB_GEN_C2(y)
#define DB_GEN_C2a(x, y)

Functions

void writeDocbookString (TextStream &t, const QCString &s)
void writeDocbookCodeString (bool hide, TextStream &t, const QCString &str, size_t &col, size_t stripIndentAmount)
static void addIndexTerm (TextStream &t, QCString prim, QCString sec="")
void writeDocbookLink (TextStream &t, const QCString &, const QCString &compoundId, const QCString &anchorId, const QCString &text, const QCString &)
static QCString objectLinkToString (const QCString &, const QCString &f, const QCString &anchor, const QCString &text)

Variables

static constexpr auto hex ="0123456789ABCDEF"

Macro Definition Documentation

◆ DB_GEN_C

#define DB_GEN_C

Definition at line 69 of file docbookgen.cpp.

Referenced by DocbookGenerator::addIndexItem(), DocbookGenerator::addLabel(), DocbookGenerator::DocbookGenerator(), DocbookGenerator::docify(), DocbookGenerator::endBold(), DocbookGenerator::endCallGraph(), DocbookGenerator::endClassDiagram(), DocbookGenerator::endCompoundTemplateParams(), DocbookGenerator::endConstraintDocs(), DocbookGenerator::endConstraintList(), DocbookGenerator::endConstraintParam(), DocbookGenerator::endConstraintType(), DocbookGenerator::endDescTable(), DocbookGenerator::endDescTableData(), DocbookGenerator::endDescTableInit(), DocbookGenerator::endDescTableRow(), DocbookGenerator::endDescTableTitle(), DocbookGenerator::endDirDepGraph(), DocbookGenerator::endDotGraph(), DocbookGenerator::endDoxyAnchor(), DocbookGenerator::endExamples(), DocbookGenerator::endFile(), DocbookGenerator::endGroupCollaboration(), DocbookGenerator::endGroupHeader(), DocbookGenerator::endInclDepGraph(), DocbookGenerator::endInlineMemberDoc(), DocbookGenerator::endInlineMemberName(), DocbookGenerator::endInlineMemberType(), DocbookGenerator::endLabels(), DocbookGenerator::endMemberDoc(), DocbookGenerator::endMemberDocList(), DocbookGenerator::endMemberDocName(), DocbookGenerator::endMemberDocPrefixItem(), DocbookGenerator::endMemberDocSimple(), DocbookGenerator::endMemberGroup(), DocbookGenerator::endMemberGroupHeader(), DocbookGenerator::endMemberHeader(), DocbookGenerator::endMemberItem(), DocbookGenerator::endMemberList(), DocbookGenerator::endMemberTemplateParams(), DocbookGenerator::endParagraph(), DocbookGenerator::endParameterDefVal(), DocbookGenerator::endParameterExtra(), DocbookGenerator::endParameterList(), DocbookGenerator::endParameterName(), DocbookGenerator::endSection(), DocbookGenerator::endTextBlock(), DocbookGenerator::endTitleHead(), DocbookGenerator::endTypewriter(), DocbookGenerator::exceptionEntry(), DocbookGenerator::lineBreak(), objectLinkToString(), DocbookGenerator::startBold(), DocbookGenerator::startCallGraph(), DocbookGenerator::startClassDiagram(), DocbookGenerator::startCompoundTemplateParams(), DocbookGenerator::startConstraintDocs(), DocbookGenerator::startConstraintList(), DocbookGenerator::startConstraintParam(), DocbookGenerator::startConstraintType(), DocbookGenerator::startDescTable(), DocbookGenerator::startDescTableData(), DocbookGenerator::startDescTableInit(), DocbookGenerator::startDescTableRow(), DocbookGenerator::startDescTableTitle(), DocbookGenerator::startDirDepGraph(), DocbookGenerator::startDotGraph(), DocbookGenerator::startDoxyAnchor(), DocbookGenerator::startExamples(), DocbookGenerator::startFile(), DocbookGenerator::startGroupCollaboration(), DocbookGenerator::startInclDepGraph(), DocbookGenerator::startInlineMemberDoc(), DocbookGenerator::startInlineMemberName(), DocbookGenerator::startInlineMemberType(), DocbookGenerator::startLabels(), DocbookGenerator::startMemberDocList(), DocbookGenerator::startMemberDocName(), DocbookGenerator::startMemberDocPrefixItem(), DocbookGenerator::startMemberDocSimple(), DocbookGenerator::startMemberGroup(), DocbookGenerator::startMemberGroupHeader(), DocbookGenerator::startMemberHeader(), DocbookGenerator::startMemberItem(), DocbookGenerator::startMemberList(), DocbookGenerator::startMemberTemplateParams(), DocbookGenerator::startParagraph(), DocbookGenerator::startParameterDefVal(), DocbookGenerator::startParameterExtra(), DocbookGenerator::startParameterList(), DocbookGenerator::startParameterName(), DocbookGenerator::startSection(), DocbookGenerator::startTextBlock(), DocbookGenerator::startTitleHead(), DocbookGenerator::startTypewriter(), DocbookGenerator::writeChar(), DocbookGenerator::writeDoc(), DocbookGenerator::writeInheritedSectionTitle(), DocbookGenerator::writeLabel(), DocbookGenerator::writeNonBreakableSpace(), DocbookGenerator::writeObjectLink(), DocbookGenerator::writePageLink(), and DocbookGenerator::writeString().

◆ DB_GEN_C1

#define DB_GEN_C1 ( x)

◆ DB_GEN_C2

◆ DB_GEN_C2a

#define DB_GEN_C2a ( x,
y )

Definition at line 72 of file docbookgen.cpp.

◆ Docbook_DB

Function Documentation

◆ addIndexTerm()

void addIndexTerm ( TextStream & t,
QCString prim,
QCString sec = "" )
static

Definition at line 137 of file docbookgen.cpp.

138{
139 t << "<indexterm><primary>";
141 t << "</primary>";
142 if (!sec.isEmpty())
143 {
144 t << "<secondary>";
146 t << "</secondary>";
147 }
148 t << "</indexterm>\n";
149}
static QCString convertToDocbook(const QCString &s, bool retainNewline=false, bool citeEntry=false)
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:167

References DocbookGenerator::convertToDocbook().

Referenced by DocbookGenerator::addIndexItem(), DocbookGenerator::endTitleHead(), and DocbookGenerator::startMemberDoc().

◆ objectLinkToString()

QCString objectLinkToString ( const QCString & ,
const QCString & f,
const QCString & anchor,
const QCString & text )
static

Definition at line 773 of file docbookgen.cpp.

775{
777 QCString result;
778 if (!anchor.isEmpty())
779 {
780 if (!f.isEmpty()) result += "<link linkend=\"_" + stripPath(f) + "_1" + anchor + "\">";
781 else result += "<link linkend=\"_" + anchor + "\">";
782 }
783 else
784 {
785 result += "<link linkend=\"_" + stripPath(f) + "\">";
786 }
788 result += "</link>";
789 return result;
790}
This is an alternative implementation of QCString.
Definition qcstring.h:103
#define DB_GEN_C
QCString stripPath(const QCString &s)
Definition util.cpp:4973

References DocbookGenerator::convertToDocbook(), DB_GEN_C, QCString::isEmpty(), and stripPath().

Referenced by DocbookGenerator::writeInheritedSectionTitle(), LatexGenerator::writeInheritedSectionTitle(), ManGenerator::writeInheritedSectionTitle(), RTFGenerator::writeInheritedSectionTitle(), DocbookGenerator::writeObjectLink(), LatexGenerator::writeObjectLink(), and RTFGenerator::writeObjectLink().

◆ writeDocbookCodeString()

void writeDocbookCodeString ( bool hide,
TextStream & t,
const QCString & str,
size_t & col,
size_t stripIndentAmount )
inline

Definition at line 82 of file docbookgen.cpp.

83{
84 if (str.isEmpty()) return;
85 const int tabSize = Config_getInt(TAB_SIZE);
86 const char *s = str.data();
87 char c=0;
88 if (hide)
89 {
90 col = updateColumnCount(s,col);
91 }
92 else
93 {
94 while ((c=*s++))
95 {
96 switch(c)
97 {
98 case '\t':
99 {
100 int spacesToNextTabStop = tabSize - (col%tabSize);
101 while (spacesToNextTabStop--)
102 {
103 if (col>=stripIndentAmount) t << "&#32;";
104 col++;
105 }
106 break;
107 }
108 case ' ':
109 if (col>=stripIndentAmount) t << "&#32;";
110 col++;
111 break;
112 case '<': t << "&lt;"; col++; break;
113 case '>': t << "&gt;"; col++; break;
114 case '&': t << "&amp;"; col++; break;
115 case '\'': t << "&apos;"; col++; break;
116 case '"': t << "&quot;"; col++; break;
117 default:
118 {
119 uint8_t uc = static_cast<uint8_t>(c);
120 static const char *hex="0123456789ABCDEF";
121 if (uc<32)
122 {
123 t << "&#x24" << hex[uc>>4] << hex[uc&0xF] << ";";
124 }
125 else
126 {
127 t << c;
128 }
129 col++;
130 }
131 break;
132 }
133 }
134 }
135}
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:176
#define Config_getInt(name)
Definition config.h:34
static constexpr auto hex
size_t updateColumnCount(const char *s, size_t col)
Definition util.cpp:6902

References Config_getInt, QCString::data(), hex, QCString::isEmpty(), and updateColumnCount().

Referenced by DocbookCodeGenerator::codify().

◆ writeDocbookLink()

void writeDocbookLink ( TextStream & t,
const QCString & ,
const QCString & compoundId,
const QCString & anchorId,
const QCString & text,
const QCString &  )

Definition at line 150 of file docbookgen.cpp.

152{
153 t << "<link linkend=\"_" << stripPath(compoundId);
154 if (!anchorId.isEmpty()) t << "_1" << anchorId;
155 t << "\"";
156 t << ">";
157 writeDocbookString(t,text);
158 t << "</link>";
159}
void writeDocbookString(TextStream &t, const QCString &s)

References QCString::isEmpty(), stripPath(), and writeDocbookString().

Referenced by DocbookCodeGenerator::writeCodeLink().

◆ writeDocbookString()

void writeDocbookString ( TextStream & t,
const QCString & s )
inline

Variable Documentation

◆ hex