Doxygen
Loading...
Searching...
No Matches
xmlcode.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2020 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 * Documents produced by Doxygen are derivative works derived from the
12 * input used in their production; they are not affected by this license.
13 *
14 */
15
16
17#ifndef XMLCODE_H
18#define XMLCODE_H
19
20#include "parserintf.h"
21
22class OutputCodeList;
23class FileDef;
24class MemberDef;
25class QCString;
26class Definition;
27
28/** XML scanner. Only support syntax highlighting of code at the moment.
29 */
31{
32 public:
34 ~XMLCodeParser() override;
36
37 void parseCode(OutputCodeList &codeOutIntf,
38 const QCString &scopeName,
39 const QCString &input,
41 bool stripCodeComments,
42 bool isExampleBlock,
43 const QCString &exampleName=QCString(),
44 const FileDef *fileDef=nullptr,
45 int startLine=-1,
46 int endLine=-1,
47 bool inlineFragment=FALSE,
48 const MemberDef *memberDef=nullptr,
49 bool showLineNumbers=TRUE,
50 const Definition *searchCtx=nullptr,
51 bool collectXRefs=TRUE
52 ) override;
53 void resetCodeParserState() override;
54
55 private:
56 struct Private;
57 std::unique_ptr<Private> p;
58};
59
60
61#endif
Abstract interface for code parsers.
Definition parserintf.h:83
The common base class of all entity definitions found in the sources.
Definition definition.h:76
A model of a file symbol.
Definition filedef.h:99
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
Class representing a list of different code generators.
Definition outputlist.h:164
This is an alternative implementation of QCString.
Definition qcstring.h:101
std::unique_ptr< Private > p
Definition xmlcode.h:57
void parseCode(OutputCodeList &codeOutIntf, const QCString &scopeName, const QCString &input, SrcLangExt, bool stripCodeComments, bool isExampleBlock, const QCString &exampleName=QCString(), const FileDef *fileDef=nullptr, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, const MemberDef *memberDef=nullptr, bool showLineNumbers=TRUE, const Definition *searchCtx=nullptr, bool collectXRefs=TRUE) override
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
Definition xmlcode.l:416
~XMLCodeParser() override
Definition xmlcode.l:404
void resetCodeParserState() override
Resets the state of the code parser.
Definition xmlcode.l:409
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
SrcLangExt
Language as given by extension.
Definition types.h:42