blob: 7402290c9b4028cf4bd84997fce7d6d564fd5ac8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef DOCPRIVATE_H
#define DOCPRIVATE_H
#include "atom.h"
#include "config.h"
#include "codemarker.h"
#include "doc.h"
#include "editdistance.h"
#include "generator.h"
#include "utilities.h"
#include "openedlist.h"
#include "quoter.h"
#include "text.h"
#include "tokenizer.h"
#include <QtCore/qdatetime.h>
#include <QtCore/qfile.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qhash.h>
#include <QtCore/qmap.h>
#include <QtCore/qtextstream.h>
#include <cctype>
#include <climits>
#include <utility>
QT_BEGIN_NAMESPACE
typedef QMap<QString, ArgList> CommandMap;
struct DocPrivateExtra
{
QList<Atom *> m_tableOfContents {};
QList<int> m_tableOfContentsLevels {};
QList<Atom *> m_keywords {};
QList<Atom *> m_targets {};
QStringMultiMap m_metaMap {};
QMultiMap<ComparisonCategory, Text> m_comparesWithMap {};
};
class DocPrivate
{
public:
explicit DocPrivate(const Location &start = Location(), const Location &end = Location(),
QString source = QString())
: m_start_loc(start), m_end_loc(end), m_src(std::move(source)), m_hasLegalese(false) {};
~DocPrivate();
void addAlso(const Text &also);
void constructExtra();
void ref() { ++count; }
bool deref() { return (--count == 0); }
int count { 1 };
// ### move some of this in DocPrivateExtra
Location m_start_loc {};
Location m_end_loc {};
QString m_src {};
Text m_text {};
QSet<QString> m_params {};
QList<Text> m_alsoList {};
QStringList m_enumItemList {};
QStringList m_omitEnumItemList {};
QSet<QString> m_metacommandsUsed {};
CommandMap m_metaCommandMap {};
DocPrivateExtra *extra { nullptr };
TopicList m_topics {};
bool m_hasLegalese : 1;
};
QT_END_NAMESPACE
#endif // DOCPRIVATE_H
|