Doxygen
DocInternal类 参考

Node representing an internal section of documentation 更多...

#include <docparser.h>

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

Public 成员函数

 DocInternal (DocParser &parser, DocNode *parent)
 
int parse (int)
 
Kind kind () const override
 
- Public 成员函数 继承自 CompAccept< DocInternal >
 CompAccept (DocParser &parser)
 
void accept (DocVisitor *v) override
 
const DocNodeListchildren () const
 
DocNodeListchildren ()
 
- Public 成员函数 继承自 DocNode
 DocNode (DocParser &parser)
 
virtual ~DocNode ()
 
DocNodeparent () const
 
void setParent (DocNode *parent)
 
bool isPreformatted () const
 

额外继承的成员函数

- 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 属性 继承自 CompAccept< DocInternal >
DocNodeList m_children
 
- Protected 属性 继承自 DocNode
DocNodem_parent = 0
 
DocParserm_parser
 

详细描述

Node representing an internal section of documentation

在文件 docparser.h1059 行定义.

构造及析构函数说明

◆ DocInternal()

DocInternal::DocInternal ( DocParser parser,
DocNode parent 
)
inline

在文件 docparser.h1062 行定义.

1062 : CompAccept<DocInternal>(parser) { m_parent = parent; }

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

成员函数说明

◆ kind()

Kind DocInternal::kind ( ) const
inlineoverridevirtual

Returns the kind of node. Provides runtime type information

实现了 DocNode.

在文件 docparser.h1064 行定义.

1064 { return Kind_Internal; }

引用了 DocNode::Kind_Internal.

◆ parse()

int DocInternal::parse ( int  level)

在文件 docparser.cpp3043 行定义.

3044 {
3045  int retval=RetVal_OK;
3046  auto ns = AutoNodeStack(m_parser,this);
3047  DBG(("DocInternal::parse() start\n"));
3048 
3049  // first parse any number of paragraphs
3050  bool isFirst=TRUE;
3051  DocPara *lastPar=0;
3052  do
3053  {
3054  DocPara *par = new DocPara(m_parser,this);
3055  if (isFirst) { par->markFirst(); isFirst=FALSE; }
3056  retval=par->parse();
3057  if (!par->isEmpty())
3058  {
3059  m_children.push_back(std::unique_ptr<DocPara>(par));
3060  lastPar=par;
3061  }
3062  else
3063  {
3064  delete par;
3065  }
3066  if (retval==TK_LISTITEM)
3067  {
3068  warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"Invalid list item found");
3069  }
3070  } while (retval!=0 &&
3071  retval!=RetVal_Section &&
3072  retval!=RetVal_Subsection &&
3073  retval!=RetVal_Subsubsection &&
3074  retval!=RetVal_Paragraph &&
3075  retval!=RetVal_EndInternal
3076  );
3077  if (lastPar) lastPar->markLast();
3078 
3079  // then parse any number of level-n sections
3080  while ((level==1 && retval==RetVal_Section) ||
3081  (level==2 && retval==RetVal_Subsection) ||
3082  (level==3 && retval==RetVal_Subsubsection) ||
3083  (level==4 && retval==RetVal_Paragraph)
3084  )
3085  {
3086  DocSection *s=new DocSection(m_parser,this,
3088  m_children.push_back(std::unique_ptr<DocSection>(s));
3089  retval = s->parse();
3090  }
3091 
3092  if (retval==RetVal_Internal)
3093  {
3094  warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"\\internal command found inside internal section");
3095  }
3096 
3097  DBG(("DocInternal::parse() end: retval=%s\n",DocTokenizer::retvalToString(retval)));
3098  return retval;
3099 }

引用了 DocParser::context, DBG, FALSE, DocParserContext::fileName, DocTokenizer::getLineNr(), DocPara::isEmpty(), CompAccept< DocInternal >::m_children, DocNode::m_parser, DocPara::markFirst(), DocPara::markLast(), DocSection::parse(), DocPara::parse(), RetVal_EndInternal, RetVal_Internal, RetVal_OK, RetVal_Paragraph, RetVal_Section, RetVal_Subsection, RetVal_Subsubsection, DocTokenizer::retvalToString(), TokenInfo::sectionId, Doxygen::subpageNestingLevel, TK_LISTITEM, DocParserContext::token, DocParser::tokenizer, TRUE , 以及 warn_doc_error().

被这些函数引用 DocSection::parse() , 以及 DocRoot::parse().


该类的文档由以下文件生成:
RetVal_Subsubsection
@ RetVal_Subsubsection
Definition: doctokenizer.h:64
DocPara
Node representing a paragraph in the documentation tree
Definition: docparser.h:1178
DocParserContext::token
TokenInfo * token
Definition: docparser.cpp:129
DocParser::context
DocParserContext context
Definition: docparser.cpp:175
CompAccept< DocInternal >
RetVal_OK
@ RetVal_OK
Command starting with \
Definition: doctokenizer.h:59
DocPara::markFirst
void markFirst(bool v=TRUE)
Definition: docparser.h:1186
RetVal_Subsection
@ RetVal_Subsection
Definition: doctokenizer.h:63
DocParser::tokenizer
DocTokenizer tokenizer
Definition: docparser.cpp:176
warn_doc_error
void warn_doc_error(const QCString &file, int line, const char *fmt,...)
Definition: message.cpp:186
TK_LISTITEM
@ TK_LISTITEM
Definition: doctokenizer.h:49
DocParserContext::fileName
QCString fileName
Definition: docparser.cpp:110
Doxygen::subpageNestingLevel
static int subpageNestingLevel
Definition: doxygen.h:115
DocPara::isEmpty
bool isEmpty() const
Definition: docparser.h:1185
DocTokenizer::retvalToString
static const char * retvalToString(int retval)
DocNode::m_parser
DocParser & m_parser
Definition: docparser.h:184
RetVal_Internal
@ RetVal_Internal
Definition: doctokenizer.h:76
DocTokenizer::getLineNr
int getLineNr(void)
TRUE
#define TRUE
Definition: qcstring.h:36
RetVal_EndInternal
@ RetVal_EndInternal
Definition: doctokenizer.h:81
DocNode::Kind_Internal
@ Kind_Internal
Definition: docparser.h:129
DocSection
Node representing a normal section
Definition: docparser.h:1001
DocPara::markLast
void markLast(bool v=TRUE)
Definition: docparser.h:1187
DocPara::parse
int parse()
Definition: docparser.cpp:6579
RetVal_Section
@ RetVal_Section
Definition: doctokenizer.h:62
RetVal_Paragraph
@ RetVal_Paragraph
Definition: doctokenizer.h:65
TokenInfo::sectionId
QCString sectionId
Definition: doctokenizer.h:86
AutoNodeStack
Definition: docparser.cpp:186
DocNode::parent
DocNode * parent() const
Definition: docparser.h:166
DBG
#define DBG(x)
Definition: docparser.cpp:58
CompAccept< DocInternal >::m_children
DocNodeList m_children
Definition: docparser.h:211
DocNode::m_parent
DocNode * m_parent
Definition: docparser.h:182
DocSection::parse
int parse()
Definition: docparser.cpp:6904
FALSE
#define FALSE
Definition: qcstring.h:33