Doxygen
Loading...
Searching...
No Matches
markdown.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* Copyright (C) 1997-2015 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 MARKDOWN_H
17
#define MARKDOWN_H
18
19
#include <memory>
20
21
#include "
qcstring.h
"
22
#include "
parserintf.h
"
23
24
class
Entry
;
25
26
/** processes string \a s and converts markdown into doxygen/html commands. */
27
//QCString processMarkdown(const QCString &fileName,const int lineNr,Entry *e,const QCString &s);
28
QCString
markdownFileNameToId
(
const
QCString
&
fileName
);
29
30
/// Helper class to process markdown formatted text
31
class
Markdown
32
{
33
public
:
34
Markdown
(
const
QCString
&fileName,
int
lineNr,
int
indentLevel=0);
35
~Markdown
();
36
NON_COPYABLE
(
Markdown
)
37
QCString
process
(
const
QCString
&input,
int
&startNewlines,
bool
fromParseInput =
false
);
38
QCString
extractPageTitle
(
QCString
&docs,
QCString
&
id
,
int
&prepend,
bool
&isIdGenerated);
39
void
setIndentLevel
(
int
level);
40
41
private
:
42
struct
Private
;
43
std::unique_ptr<Private>
prv
;
44
using
Action_t
= std::function<int(
Private
&,std::string_view,
size_t
)>;
45
using
ActionTable_t
= std::array<Action_t,256>;
46
static
ActionTable_t
fill_table
();
47
static
ActionTable_t
actions
;
48
};
49
50
class
MarkdownOutlineParser
:
public
OutlineParserInterface
51
{
52
public
:
53
MarkdownOutlineParser
();
54
~MarkdownOutlineParser
()
override
;
55
NON_COPYABLE
(
MarkdownOutlineParser
)
56
void
parseInput
(
const
QCString
&fileName,
57
const
char
*fileBuf,
58
const
std::shared_ptr<Entry> &root,
59
ClangTUParser
*clangParser)
override
;
60
bool
needsPreprocessing
(
const
QCString
&)
const override
{
return
FALSE
; }
61
void
parsePrototype
(
const
QCString
&text)
override
;
62
private
:
63
struct
Private;
64
std::unique_ptr<Private>
p
;
65
};
66
67
68
#endif
ClangTUParser
Clang parser object for a single translation unit, which consists of a source file and the directly o...
Definition
clangparser.h:25
Entry
Represents an unstructured piece of information, about an entity found in the sources.
Definition
entry.h:116
Entry::fileName
QCString fileName
file this entry was extracted from
Definition
entry.h:223
Markdown::fill_table
static ActionTable_t fill_table()
Definition
markdown.cpp:182
Markdown::~Markdown
~Markdown()
Markdown::ActionTable_t
std::array< Action_t, 256 > ActionTable_t
Definition
markdown.h:45
Markdown::prv
std::unique_ptr< Private > prv
Definition
markdown.h:43
Markdown::actions
static ActionTable_t actions
Definition
markdown.h:47
Markdown::setIndentLevel
void setIndentLevel(int level)
Definition
markdown.cpp:210
Markdown::extractPageTitle
QCString extractPageTitle(QCString &docs, QCString &id, int &prepend, bool &isIdGenerated)
Definition
markdown.cpp:3645
Markdown::Markdown
Markdown(const QCString &fileName, int lineNr, int indentLevel=0)
Definition
markdown.cpp:201
Markdown::process
QCString process(const QCString &input, int &startNewlines, bool fromParseInput=false)
Definition
markdown.cpp:3698
Markdown::Action_t
std::function< int(Private &, std::string_view, size_t)> Action_t
Definition
markdown.h:44
MarkdownOutlineParser::needsPreprocessing
bool needsPreprocessing(const QCString &) const override
Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed t...
Definition
markdown.h:60
MarkdownOutlineParser::~MarkdownOutlineParser
~MarkdownOutlineParser() override
Definition
markdown.cpp:3774
MarkdownOutlineParser::MarkdownOutlineParser
MarkdownOutlineParser()
Definition
markdown.cpp:3770
MarkdownOutlineParser::parsePrototype
void parsePrototype(const QCString &text) override
Callback function called by the comment block scanner.
Definition
markdown.cpp:3926
MarkdownOutlineParser::p
std::unique_ptr< Private > p
Definition
markdown.h:64
OutlineParserInterface
Abstract interface for outline parsers.
Definition
parserintf.h:42
QCString
This is an alternative implementation of QCString.
Definition
qcstring.h:101
NON_COPYABLE
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition
construct.h:37
parseInput
void parseInput()
Definition
doxygen.cpp:12388
markdownFileNameToId
QCString markdownFileNameToId(const QCString &fileName)
processes string s and converts markdown into doxygen/html commands.
Definition
markdown.cpp:3749
parserintf.h
qcstring.h
FALSE
#define FALSE
Definition
qcstring.h:34
Markdown::Private
Definition
markdown.cpp:131
src
markdown.h
Generated by
1.16.0