Doxygen
Loading...
Searching...
No Matches
xmldocvisitor.cpp File Reference
#include "xmldocvisitor.h"
#include "docparser.h"
#include "language.h"
#include "doxygen.h"
#include "outputgen.h"
#include "xmlgen.h"
#include "dot.h"
#include "message.h"
#include "util.h"
#include "parserintf.h"
#include "filename.h"
#include "config.h"
#include "htmlentity.h"
#include "emoji.h"
#include "filedef.h"
#include "fileinfo.h"
#include "codefragment.h"
+ Include dependency graph for xmldocvisitor.cpp:

Go to the source code of this file.

Functions

static void startSimpleSect (TextStream &t, const DocSimpleSect &s)
 
static void endSimpleSect (TextStream &t, const DocSimpleSect &)
 
static void visitCaption (XmlDocVisitor &visitor, const DocNodeList &children)
 
static void visitPreStart (TextStream &t, const char *cmd, bool doCaption, XmlDocVisitor &visitor, const DocNodeList &children, const QCString &name, bool writeType, DocImage::Type type, const QCString &width, const QCString &height, const QCString engine=QCString(), const QCString &alt=QCString(), bool inlineImage=FALSE)
 
static void visitPostEnd (TextStream &t, const char *cmd)
 

Function Documentation

◆ endSimpleSect()

static void endSimpleSect ( TextStream & t,
const DocSimpleSect &  )
static

Definition at line 80 of file xmldocvisitor.cpp.

81{
82 t << "</simplesect>\n";
83}

Referenced by XmlDocVisitor::operator()(), and XmlDocVisitor::operator()().

◆ startSimpleSect()

static void startSimpleSect ( TextStream & t,
const DocSimpleSect & s )
static

Definition at line 34 of file xmldocvisitor.cpp.

35{
36 t << "<simplesect kind=\"";
37 switch(s.type())
38 {
40 t << "see"; break;
42 t << "return"; break;
44 t << "author"; break;
46 t << "authors"; break;
48 t << "version"; break;
50 t << "since"; break;
52 t << "date"; break;
54 t << "note"; break;
56 t << "warning"; break;
58 t << "pre"; break;
60 t << "post"; break;
62 t << "copyright"; break;
64 t << "invariant"; break;
66 t << "remark"; break;
68 t << "attention"; break;
70 t << "important"; break;
72 t << "par"; break;
74 t << "rcs"; break;
75 case DocSimpleSect::Unknown: break;
76 }
77 t << "\">";
78}
Type type() const
Definition docnode.h:1020

References DocSimpleSect::Attention, DocSimpleSect::Author, DocSimpleSect::Authors, DocSimpleSect::Copyright, DocSimpleSect::Date, DocSimpleSect::Important, DocSimpleSect::Invar, DocSimpleSect::Note, DocSimpleSect::Post, DocSimpleSect::Pre, DocSimpleSect::Rcs, DocSimpleSect::Remark, DocSimpleSect::Return, DocSimpleSect::See, DocSimpleSect::Since, DocSimpleSect::type(), DocSimpleSect::Unknown, DocSimpleSect::User, DocSimpleSect::Version, and DocSimpleSect::Warning.

Referenced by XmlDocVisitor::operator()(), and XmlDocVisitor::operator()().

◆ visitCaption()

static void visitCaption ( XmlDocVisitor & visitor,
const DocNodeList & children )
static

Definition at line 85 of file xmldocvisitor.cpp.

86{
87 for (const auto &n : children)
88 {
89 std::visit(visitor,n);
90 }
91}

Referenced by visitPreStart().

◆ visitPostEnd()

static void visitPostEnd ( TextStream & t,
const char * cmd )
static

Definition at line 145 of file xmldocvisitor.cpp.

146{
147 t << "</" << cmd << ">\n";
148}

◆ visitPreStart()

static void visitPreStart ( TextStream & t,
const char * cmd,
bool doCaption,
XmlDocVisitor & visitor,
const DocNodeList & children,
const QCString & name,
bool writeType,
DocImage::Type type,
const QCString & width,
const QCString & height,
const QCString engine = QCString(),
const QCString & alt = QCString(),
bool inlineImage = FALSE )
static

Definition at line 93 of file xmldocvisitor.cpp.

97{
98 t << "<" << cmd;
99 if (writeType)
100 {
101 t << " type=\"";
102 switch(type)
103 {
104 case DocImage::Html: t << "html"; break;
105 case DocImage::Latex: t << "latex"; break;
106 case DocImage::Rtf: t << "rtf"; break;
107 case DocImage::DocBook: t << "docbook"; break;
108 case DocImage::Xml: t << "xml"; break;
109 }
110 t << "\"";
111 }
112 if (!name.isEmpty())
113 {
114 t << " name=\"" << convertToXML(name, TRUE) << "\"";
115 }
116 if (!width.isEmpty())
117 {
118 t << " width=\"" << convertToXML(width) << "\"";
119 }
120 if (!height.isEmpty())
121 {
122 t << " height=\"" << convertToXML(height) << "\"";
123 }
124 if (!engine.isEmpty())
125 {
126 t << " engine=\"" << convertToXML(engine) << "\"";
127 }
128 if (!alt.isEmpty())
129 {
130 t << " alt=\"" << convertToXML(alt) << "\"";
131 }
132 if (inlineImage)
133 {
134 t << " inline=\"yes\"";
135 }
136 if (doCaption)
137 {
138 t << " caption=\"";
139 visitCaption(visitor, children);
140 t << "\"";
141 }
142 t << ">";
143}
@ DocBook
Definition docnode.h:638
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
#define TRUE
Definition qcstring.h:37
QCString convertToXML(const QCString &s, bool keepEntities)
Definition util.cpp:4266
static void visitCaption(XmlDocVisitor &visitor, const DocNodeList &children)

References convertToXML(), DocImage::DocBook, FALSE, DocImage::Html, QCString::isEmpty(), DocImage::Latex, DocImage::Rtf, TRUE, visitCaption(), and DocImage::Xml.