Doxygen
DocIndexEntry类 参考

Node representing an entry in the index. 更多...

#include <docparser.h>

+ 类 DocIndexEntry 继承关系图:
+ DocIndexEntry 的协作图:

Public 成员函数

 DocIndexEntry (DocParser &parser, DocNode *parent, const Definition *scope, const MemberDef *md)
 
Kind kind () const override
 
int parse ()
 
const Definitionscope () const
 
const MemberDefmember () const
 
QCString entry () const
 
void accept (DocVisitor *v) override
 
- Public 成员函数 继承自 DocNode
 DocNode (DocParser &parser)
 
virtual ~DocNode ()
 
DocNodeparent () const
 
void setParent (DocNode *parent)
 
bool isPreformatted () const
 

Private 属性

QCString m_entry
 
const Definitionm_scope = 0
 
const MemberDefm_member = 0
 

额外继承的成员函数

- Public 类型 继承自 DocNode
enum  Kind {
  Kind_Root = 0, Kind_Word = 1, Kind_WhiteSpace = 2, Kind_Para = 3,
  Kind_AutoList = 4, Kind_AutoListItem = 5, Kind_Symbol = 6, Kind_URL = 7,
  Kind_StyleChange = 8, Kind_SimpleSect = 9, Kind_Title = 10, Kind_SimpleList = 11,
  Kind_SimpleListItem = 12, Kind_Section = 13, Kind_Verbatim = 14, Kind_XRefItem = 15,
  Kind_HtmlList = 16, Kind_HtmlListItem = 17, Kind_HtmlDescList = 18, Kind_HtmlDescData = 19,
  Kind_HtmlDescTitle = 20, Kind_HtmlTable = 21, Kind_HtmlRow = 22, Kind_HtmlCell = 23,
  Kind_HtmlCaption = 24, Kind_LineBreak = 25, Kind_HorRuler = 26, Kind_Anchor = 27,
  Kind_IndexEntry = 28, Kind_Internal = 29, Kind_HRef = 30, Kind_Include = 31,
  Kind_IncOperator = 32, Kind_HtmlHeader = 33, Kind_Image = 34, Kind_DotFile = 35,
  Kind_Link = 36, Kind_Ref = 37, Kind_Formula = 38, Kind_SecRefItem = 39,
  Kind_SecRefList = 40, Kind_SimpleSectSep = 41, Kind_LinkedWord = 42, Kind_ParamSect = 43,
  Kind_ParamList = 44, Kind_InternalRef = 45, Kind_Copy = 46, Kind_Text = 47,
  Kind_MscFile = 48, Kind_HtmlBlockQuote = 49, Kind_VhdlFlow = 50, Kind_ParBlock = 51,
  Kind_DiaFile = 52, Kind_Emoji = 53, Kind_Sep = 54
}
 
- Protected 类型 继承自 DocNode
enum  RefType { Unknown, Anchor, Section, Table }
 
- Protected 成员函数 继承自 DocNode
void setInsidePreformatted (bool p)
 
- Protected 属性 继承自 DocNode
DocNodem_parent = 0
 
DocParserm_parser
 

详细描述

Node representing an entry in the index.

在文件 docparser.h682 行定义.

构造及析构函数说明

◆ DocIndexEntry()

DocIndexEntry::DocIndexEntry ( DocParser parser,
DocNode parent,
const Definition scope,
const MemberDef md 
)
inline

在文件 docparser.h685 行定义.

686  : DocNode(parser), m_scope(scope), m_member(md){ m_parent = parent; }

引用了 DocNode::m_parent , 以及 DocNode::parent().

成员函数说明

◆ accept()

void DocIndexEntry::accept ( DocVisitor v)
inlineoverridevirtual

Acceptor function for node visitors. Part of the visitor pattern.

参数
vAbstract visitor.

实现了 DocNode.

在文件 docparser.h692 行定义.

692 { v->visit(this); }

引用了 DocVisitor::visit().

◆ entry()

QCString DocIndexEntry::entry ( ) const
inline

在文件 docparser.h691 行定义.

691 { return m_entry; }

引用了 m_entry.

被这些函数引用 HtmlDocVisitor::visit(), DocbookDocVisitor::visit(), LatexDocVisitor::visit(), RTFDocVisitor::visit() , 以及 XmlDocVisitor::visit().

◆ kind()

Kind DocIndexEntry::kind ( ) const
inlineoverridevirtual

Returns the kind of node. Provides runtime type information

实现了 DocNode.

在文件 docparser.h687 行定义.

687 { return Kind_IndexEntry; }

引用了 DocNode::Kind_IndexEntry.

◆ member()

const MemberDef* DocIndexEntry::member ( ) const
inline

在文件 docparser.h690 行定义.

690 { return m_member; }

引用了 m_member.

被这些函数引用 HtmlDocVisitor::visit().

◆ parse()

int DocIndexEntry::parse ( )

在文件 docparser.cpp3103 行定义.

3104 {
3105  int retval=RetVal_OK;
3106  auto ns = AutoNodeStack(m_parser,this);
3107  DBG(("DocIndexEntry::parse() start\n"));
3108  int tok=m_parser.tokenizer.lex();
3109  if (tok!=TK_WHITESPACE)
3110  {
3111  warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"expected whitespace after \\addindex command");
3112  goto endindexentry;
3113  }
3115  m_entry="";
3116  while ((tok=m_parser.tokenizer.lex()))
3117  {
3118  switch (tok)
3119  {
3120  case TK_WHITESPACE:
3121  m_entry+=" ";
3122  break;
3123  case TK_WORD:
3124  case TK_LNKWORD:
3126  break;
3127  case TK_SYMBOL:
3128  {
3130  switch (s)
3131  {
3132  case DocSymbol::Sym_BSlash: m_entry+='\\'; break;
3133  case DocSymbol::Sym_At: m_entry+='@'; break;
3134  case DocSymbol::Sym_Less: m_entry+='<'; break;
3135  case DocSymbol::Sym_Greater: m_entry+='>'; break;
3136  case DocSymbol::Sym_Amp: m_entry+='&'; break;
3137  case DocSymbol::Sym_Dollar: m_entry+='$'; break;
3138  case DocSymbol::Sym_Hash: m_entry+='#'; break;
3139  case DocSymbol::Sym_Percent: m_entry+='%'; break;
3140  case DocSymbol::Sym_apos: m_entry+='\''; break;
3141  case DocSymbol::Sym_Quot: m_entry+='"'; break;
3142  case DocSymbol::Sym_lsquo: m_entry+='`'; break;
3143  case DocSymbol::Sym_rsquo: m_entry+='\''; break;
3144  case DocSymbol::Sym_ldquo: m_entry+="``"; break;
3145  case DocSymbol::Sym_rdquo: m_entry+="''"; break;
3146  case DocSymbol::Sym_ndash: m_entry+="--"; break;
3147  case DocSymbol::Sym_mdash: m_entry+="---"; break;
3148  default:
3149  warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected symbol found as argument of \\addindex");
3150  break;
3151  }
3152  }
3153  break;
3154  case TK_COMMAND_AT:
3155  // fall through
3156  case TK_COMMAND_BS:
3157  switch (Mappers::cmdMapper->map(m_parser.context.token->name))
3158  {
3159  case CMD_BSLASH: m_entry+='\\'; break;
3160  case CMD_AT: m_entry+='@'; break;
3161  case CMD_LESS: m_entry+='<'; break;
3162  case CMD_GREATER: m_entry+='>'; break;
3163  case CMD_AMP: m_entry+='&'; break;
3164  case CMD_DOLLAR: m_entry+='$'; break;
3165  case CMD_HASH: m_entry+='#'; break;
3166  case CMD_DCOLON: m_entry+="::"; break;
3167  case CMD_PERCENT: m_entry+='%'; break;
3168  case CMD_NDASH: m_entry+="--"; break;
3169  case CMD_MDASH: m_entry+="---"; break;
3170  case CMD_QUOTE: m_entry+='"'; break;
3171  case CMD_PUNT: m_entry+='.'; break;
3172  case CMD_PLUS: m_entry+='+'; break;
3173  case CMD_MINUS: m_entry+='-'; break;
3174  case CMD_EQUAL: m_entry+='='; break;
3175  default:
3176  warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Unexpected command %s found as argument of \\addindex",
3178  break;
3179  }
3180  break;
3181  default:
3184  break;
3185  }
3186  }
3189 endindexentry:
3190  DBG(("DocIndexEntry::parse() end retval=%s\n",DocTokenizer::retvalToString(retval)));
3191  return retval;
3192 }

引用了 CMD_AMP, CMD_AT, CMD_BSLASH, CMD_DCOLON, CMD_DOLLAR, CMD_EQUAL, CMD_GREATER, CMD_HASH, CMD_LESS, CMD_MDASH, CMD_MINUS, CMD_NDASH, CMD_PERCENT, CMD_PLUS, CMD_PUNT, CMD_QUOTE, Mappers::cmdMapper, DocParser::context, DBG, DocSymbol::decodeSymbol(), DocParserContext::fileName, DocTokenizer::getLineNr(), DocTokenizer::lex(), m_entry, DocNode::m_parser, TokenInfo::name, qPrint(), RetVal_OK, DocTokenizer::retvalToString(), DocTokenizer::setStatePara(), DocTokenizer::setStateTitle(), QCString::stripWhiteSpace(), DocSymbol::Sym_Amp, DocSymbol::Sym_apos, DocSymbol::Sym_At, DocSymbol::Sym_BSlash, DocSymbol::Sym_Dollar, DocSymbol::Sym_Greater, DocSymbol::Sym_Hash, DocSymbol::Sym_ldquo, DocSymbol::Sym_Less, DocSymbol::Sym_lsquo, DocSymbol::Sym_mdash, DocSymbol::Sym_ndash, DocSymbol::Sym_Percent, DocSymbol::Sym_Quot, DocSymbol::Sym_rdquo, DocSymbol::Sym_rsquo, TK_COMMAND_AT, TK_COMMAND_BS, TK_LNKWORD, TK_SYMBOL, TK_WHITESPACE, TK_WORD, DocParserContext::token, DocParser::tokenizer, DocTokenizer::tokToString() , 以及 warn_doc_error().

被这些函数引用 DocPara::handleCommand().

◆ scope()

const Definition* DocIndexEntry::scope ( ) const
inline

在文件 docparser.h689 行定义.

689 { return m_scope; }

引用了 m_scope.

被这些函数引用 HtmlDocVisitor::visit().

类成员变量说明

◆ m_entry

QCString DocIndexEntry::m_entry
private

在文件 docparser.h695 行定义.

被这些函数引用 entry() , 以及 parse().

◆ m_member

const MemberDef* DocIndexEntry::m_member = 0
private

在文件 docparser.h697 行定义.

被这些函数引用 member().

◆ m_scope

const Definition* DocIndexEntry::m_scope = 0
private

在文件 docparser.h696 行定义.

被这些函数引用 scope().


该类的文档由以下文件生成:
CMD_DOLLAR
@ CMD_DOLLAR
Definition: cmdmapper.h:42
DocIndexEntry::m_entry
QCString m_entry
Definition: docparser.h:695
DocSymbol::Sym_Amp
@ Sym_Amp
Definition: docparser.h:445
CMD_BSLASH
@ CMD_BSLASH
Definition: cmdmapper.h:38
DocSymbol::SymType
SymType
Definition: docparser.h:388
DocSymbol::Sym_rdquo
@ Sym_rdquo
Definition: docparser.h:437
DocParserContext::token
TokenInfo * token
Definition: docparser.cpp:129
DocParser::context
DocParserContext context
Definition: docparser.cpp:175
DocTokenizer::tokToString
static const char * tokToString(int token)
CMD_LESS
@ CMD_LESS
Definition: cmdmapper.h:65
TK_WORD
@ TK_WORD
Definition: doctokenizer.h:46
CMD_AT
@ CMD_AT
Definition: cmdmapper.h:33
DocVisitor::visit
virtual void visit(DocWord *)=0
TokenInfo::name
QCString name
Definition: doctokenizer.h:74
RetVal_OK
@ RetVal_OK
Command starting with \
Definition: doctokenizer.h:59
DocSymbol::Sym_Percent
@ Sym_Percent
Definition: docparser.h:446
DocSymbol::Sym_Dollar
@ Sym_Dollar
Definition: docparser.h:446
DocSymbol::Sym_Hash
@ Sym_Hash
Definition: docparser.h:446
DocIndexEntry::m_scope
const Definition * m_scope
Definition: docparser.h:696
DocParser::tokenizer
DocTokenizer tokenizer
Definition: docparser.cpp:176
DocSymbol::Sym_rsquo
@ Sym_rsquo
Definition: docparser.h:437
DocSymbol::decodeSymbol
static SymType decodeSymbol(const QCString &symName)
Definition: docparser.cpp:1713
warn_doc_error
void warn_doc_error(const QCString &file, int line, const char *fmt,...)
Definition: message.cpp:186
TK_WHITESPACE
@ TK_WHITESPACE
Definition: doctokenizer.h:48
DocSymbol::Sym_ldquo
@ Sym_ldquo
Definition: docparser.h:437
TK_SYMBOL
@ TK_SYMBOL
Definition: doctokenizer.h:53
DocIndexEntry::m_member
const MemberDef * m_member
Definition: docparser.h:697
TK_COMMAND_AT
@ TK_COMMAND_AT
Definition: doctokenizer.h:51
DocSymbol::Sym_Less
@ Sym_Less
Definition: docparser.h:445
DocParserContext::fileName
QCString fileName
Definition: docparser.cpp:110
CMD_HASH
@ CMD_HASH
Definition: cmdmapper.h:56
QCString::stripWhiteSpace
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition: qcstring.h:243
DocIndexEntry::scope
const Definition * scope() const
Definition: docparser.h:689
DocSymbol::Sym_At
@ Sym_At
Definition: docparser.h:445
CMD_GREATER
@ CMD_GREATER
Definition: cmdmapper.h:55
DocTokenizer::retvalToString
static const char * retvalToString(int retval)
DocNode::m_parser
DocParser & m_parser
Definition: docparser.h:184
DocTokenizer::getLineNr
int getLineNr(void)
CMD_MDASH
@ CMD_MDASH
Definition: cmdmapper.h:129
DocSymbol::Sym_Greater
@ Sym_Greater
Definition: docparser.h:445
TK_LNKWORD
@ TK_LNKWORD
Definition: doctokenizer.h:47
DocSymbol::Sym_lsquo
@ Sym_lsquo
Definition: docparser.h:437
CMD_PERCENT
@ CMD_PERCENT
Definition: cmdmapper.h:73
CMD_PUNT
@ CMD_PUNT
Definition: cmdmapper.h:133
DocSymbol::Sym_mdash
@ Sym_mdash
Definition: docparser.h:436
CMD_QUOTE
@ CMD_QUOTE
Definition: cmdmapper.h:111
CMD_PLUS
@ CMD_PLUS
Definition: cmdmapper.h:134
DocSymbol::Sym_Quot
@ Sym_Quot
Definition: docparser.h:447
CMD_AMP
@ CMD_AMP
Definition: cmdmapper.h:31
DocSymbol::Sym_BSlash
@ Sym_BSlash
Definition: docparser.h:445
CMD_DCOLON
@ CMD_DCOLON
Definition: cmdmapper.h:113
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
CMD_MINUS
@ CMD_MINUS
Definition: cmdmapper.h:135
Mappers::cmdMapper
static Mapper * cmdMapper
Definition: cmdmapper.h:234
DocTokenizer::setStateTitle
void setStateTitle()
AutoNodeStack
Definition: docparser.cpp:186
DocTokenizer::lex
int lex()
DocNode::DocNode
DocNode(DocParser &parser)
Definition: docparser.h:157
DocNode::parent
DocNode * parent() const
Definition: docparser.h:166
CMD_NDASH
@ CMD_NDASH
Definition: cmdmapper.h:128
DocTokenizer::setStatePara
void setStatePara()
DBG
#define DBG(x)
Definition: docparser.cpp:58
TK_COMMAND_BS
@ TK_COMMAND_BS
Definition: doctokenizer.h:57
DocSymbol::Sym_apos
@ Sym_apos
Definition: docparser.h:442
DocNode::m_parent
DocNode * m_parent
Definition: docparser.h:182
DocSymbol::Sym_ndash
@ Sym_ndash
Definition: docparser.h:436
CMD_EQUAL
@ CMD_EQUAL
Definition: cmdmapper.h:140
DocNode::Kind_IndexEntry
@ Kind_IndexEntry
Definition: docparser.h:128