Doxygen
Toggle main menu visibility
Loading...
Searching...
No Matches
docparser.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* Copyright (C) 1997-2022 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
#ifndef DOCPARSER_H
17
#define DOCPARSER_H
18
19
#include <stdio.h>
20
#include <memory>
21
22
#include "
qcstring.h
"
23
#include "
growvector.h
"
24
#include "
construct.h
"
25
#include "
types.h
"
26
#include "
docoptions.h
"
27
28
class
MemberDef
;
29
class
Definition
;
30
31
//---------------------------------------------------------------------------
32
33
//! @brief opaque parser interface
34
class
IDocParser
35
{
36
public
:
37
ABSTRACT_BASE_CLASS
(
IDocParser
)
38
};
39
40
//! @brief pointer to parser interface
41
using
IDocParserPtr
= std::unique_ptr<IDocParser>;
42
43
//! @brief factory function to create a parser
44
IDocParserPtr
createDocParser
();
45
46
//---------------------------------------------------------------------------
47
48
//! @brief opaque representation of the abstract syntax tree (AST)
49
class
IDocNodeAST
50
{
51
public
:
52
ABSTRACT_BASE_CLASS
(
IDocNodeAST
)
53
54
virtual
bool
isEmpty
() const = 0;
55
};
56
57
using
IDocNodeASTPtr
= std::unique_ptr<
IDocNodeAST
>;
58
59
60
/*! Main entry point for the comment block parser.
61
* @param parserIntf The parser object created via createDocParser()
62
* @param fileName File in which the documentation block is found (or the
63
* name of the example file in case isExample is TRUE).
64
* @param startLine Line at which the documentation block is found.
65
* @param ctx Class or namespace to which this block belongs.
66
* @param md Member definition to which the documentation belongs.
67
* Can be 0.
68
* @param input String representation of the documentation block.
69
* @param options Optional parameters.
70
* @returns An object representing the abstract syntax tree. Ownership of the
71
* pointer is handed over to the caller.
72
*/
73
IDocNodeASTPtr
validatingParseDoc
(
74
IDocParser
&parserIntf,
75
const
QCString
&fileName,
76
int
startLine,
77
const
Definition
*ctx,
78
const
MemberDef
*md,
79
const
QCString
&input,
80
const
DocOptions
&options);
81
82
/*! Main entry point for parsing simple text fragments. These
83
* fragments are limited to words, whitespace and symbols.
84
*/
85
IDocNodeASTPtr
validatingParseText
(
IDocParser
&parser,const
QCString
&input);
86
87
88
/*! Main entry point for parsing titles. These allow limited markup commands */
89
IDocNodeASTPtr
validatingParseTitle
(
IDocParser
&parserIntf,const
QCString
&fileName,
int
lineNr,
90
const
QCString
&input);
91
92
93
IDocNodeASTPtr
createRef
(
IDocParser
&parser,const
QCString
&target,const
QCString
&context, const
QCString
&srcFile =
""
,
int
srcLine = -1);
94
95
//--------------------------------------------------------------------------------
96
97
/*! Searches for section and anchor commands in the input
98
* Sections found will be added to the SectionManager.
99
*/
100
void
docFindSections
(const
QCString
&input,
101
const
Definition
*d,
102
const
QCString
&fileName);
103
104
#endif
Definition
The common base class of all entity definitions found in the sources.
Definition
definition.h:77
IDocNodeAST
opaque representation of the abstract syntax tree (AST)
Definition
docparser.h:50
IDocNodeAST::isEmpty
virtual bool isEmpty() const =0
IDocParser
opaque parser interface
Definition
docparser.h:35
MemberDef
A model of a class/file/namespace member symbol.
Definition
memberdef.h:48
QCString
This is an alternative implementation of QCString.
Definition
qcstring.h:101
construct.h
ABSTRACT_BASE_CLASS
#define ABSTRACT_BASE_CLASS(cls)
Macro to implement rule of 5 for an abstract base class.
Definition
construct.h:20
docoptions.h
docFindSections
void docFindSections(const QCString &input, const Definition *d, const QCString &fileName)
Definition
docparser.cpp:2263
validatingParseDoc
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, const DocOptions &options)
Definition
docparser.cpp:2005
validatingParseText
IDocNodeASTPtr validatingParseText(IDocParser &parserIntf, const QCString &input)
Definition
docparser.cpp:2190
createRef
IDocNodeASTPtr createRef(IDocParser &parserIntf, const QCString &target, const QCString &context, const QCString &srcFile, int srcLine)
Definition
docparser.cpp:2249
validatingParseTitle
IDocNodeASTPtr validatingParseTitle(IDocParser &parserIntf, const QCString &fileName, int lineNr, const QCString &input)
Definition
docparser.cpp:2137
IDocNodeASTPtr
std::unique_ptr< IDocNodeAST > IDocNodeASTPtr
Definition
docparser.h:57
IDocParserPtr
std::unique_ptr< IDocParser > IDocParserPtr
pointer to parser interface
Definition
docparser.h:41
createDocParser
IDocParserPtr createDocParser()
factory function to create a parser
Definition
docparser.cpp:55
growvector.h
qcstring.h
DocOptions
Definition
docoptions.h:23
types.h
This file contains a number of basic enums and types.
src
docparser.h
Generated by
1.17.0