Doxygen
首页
模块
命名空间
命名空间列表
命名空间成员
全部
_
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
v
w
x
函数
a
c
d
f
g
i
m
p
r
s
u
w
变量
_
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
v
w
x
枚举
枚举值
类
类列表
类索引
类继承关系
类成员
全部
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
函数
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
变量
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
类型定义
a
c
d
e
f
h
i
k
m
n
p
r
s
t
u
v
枚举
a
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
枚举值
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
相关函数
文件
文件列表
文件成员
全部
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
函数
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
变量
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
y
类型定义
a
b
c
d
e
f
i
j
l
m
n
o
p
r
s
t
u
v
y
枚举
a
c
d
e
f
g
h
i
m
n
p
r
s
t
枚举值
a
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
x
宏定义
a
b
c
d
e
f
g
h
i
j
l
m
n
p
q
r
s
t
w
x
y
condparser.h
浏览该文件的文档.
1
#ifndef CONDPARSER_H
2
#define CONDPARSER_H
3
4
/**
5
* Copyright (C) 1997-2015 by Dimitri van Heesch.
6
*
7
* Permission to use, copy, modify, and distribute this software and its
8
* documentation under the terms of the GNU General Public License is hereby
9
* granted. No representations are made about the suitability of this software
10
* for any purpose. It is provided "as is" without express or implied warranty.
11
* See the GNU General Public License for more details.
12
*
13
* Documents produced by Doxygen are derivative works derived from the
14
* input used in their production; they are not affected by this license.
15
*
16
* C++ Expression parser for ENABLED_SECTIONS in Doxygen
17
*
18
* Features used:
19
* Operators:
20
* && AND operator
21
* || OR operator
22
* ! NOT operator
23
*/
24
25
#include "
qcstring.h
"
26
27
class
CondParser
28
{
29
// public functions
30
public
:
31
CondParser
() :
m_e
(0),
m_tokenType
(
NOTHING
) {}
32
bool
parse
(
const
QCString
&fileName,
int
lineNr,
const
QCString
&expr);
33
34
// enumerations
35
private
:
36
enum
TOKENTYPE
37
{
38
NOTHING
= -1,
39
DELIMITER
,
40
VARIABLE
,
41
UNKNOWN
42
};
43
enum
OPERATOR_ID
44
{
45
UNKNOWN_OP
= -1,
46
AND
= 1,
47
OR
,
48
NOT
49
};
50
51
// data
52
private
:
53
54
QCString
m_err
;
//!< error state
55
QCString
m_expr
;
//!< holds the expression
56
const
char
*
m_e
;
//!< points to a character in expr
57
58
QCString
m_token
;
//!< holds the token
59
TOKENTYPE
m_tokenType
;
//!< type of the token
60
61
// private functions
62
private
:
63
void
getToken
();
64
65
bool
parseLevel1
();
66
bool
parseLevel2
();
67
bool
parseLevel3
();
68
bool
parseVar
();
69
70
bool
evalOperator
(
const
int
opId,
bool
lhs,
bool
rhs);
71
bool
evalVariable
(
const
QCString
&varName);
72
int
getOperatorId
(
const
QCString
&opName);
73
};
74
75
#endif
76
CondParser::DELIMITER
@ DELIMITER
Definition:
condparser.h:39
CondParser::UNKNOWN
@ UNKNOWN
Definition:
condparser.h:41
CondParser::CondParser
CondParser()
Definition:
condparser.h:31
CondParser
Copyright (C) 1997-2015 by Dimitri van Heesch.
Definition:
condparser.h:27
CondParser::OPERATOR_ID
OPERATOR_ID
Definition:
condparser.h:43
CondParser::VARIABLE
@ VARIABLE
Definition:
condparser.h:40
CondParser::parseVar
bool parseVar()
Definition:
condparser.cpp:236
qcstring.h
CondParser::UNKNOWN_OP
@ UNKNOWN_OP
Definition:
condparser.h:45
CondParser::parseLevel1
bool parseLevel1()
conditional operators AND and OR
Definition:
condparser.cpp:173
CondParser::parseLevel2
bool parseLevel2()
NOT
Definition:
condparser.cpp:191
CondParser::m_tokenType
TOKENTYPE m_tokenType
type of the token
Definition:
condparser.h:59
CondParser::getToken
void getToken()
Get next token in the current string expr.
Definition:
condparser.cpp:108
CondParser::m_token
QCString m_token
holds the token
Definition:
condparser.h:58
CondParser::evalOperator
bool evalOperator(const int opId, bool lhs, bool rhs)
evaluate an operator for given values
Definition:
condparser.cpp:267
CondParser::m_err
QCString m_err
error state
Definition:
condparser.h:54
CondParser::evalVariable
bool evalVariable(const QCString &varName)
evaluate a variable
Definition:
condparser.cpp:283
CondParser::m_expr
QCString m_expr
holds the expression
Definition:
condparser.h:55
CondParser::m_e
const char * m_e
points to a character in expr
Definition:
condparser.h:56
CondParser::parseLevel3
bool parseLevel3()
parenthesized expression or variable
Definition:
condparser.cpp:212
CondParser::parse
bool parse(const QCString &fileName, int lineNr, const QCString &expr)
Copyright (C) 1997-2015 by Dimitri van Heesch.
Definition:
condparser.cpp:36
CondParser::getOperatorId
int getOperatorId(const QCString &opName)
returns the id of the given operator returns -1 if the operator is not recognized
Definition:
condparser.cpp:91
CondParser::NOTHING
@ NOTHING
Definition:
condparser.h:38
CondParser::OR
@ OR
Definition:
condparser.h:47
CondParser::NOT
@ NOT
Definition:
condparser.h:48
CondParser::TOKENTYPE
TOKENTYPE
Definition:
condparser.h:36
CondParser::AND
@ AND
Definition:
condparser.h:46
QCString
This is an alternative implementation of QCString.
Definition:
qcstring.h:108
src
condparser.h
生成于 2021年 十一月 27日 星期六 08:40:51 , 为 Doxygen使用
1.8.17