Doxygen
DocAutoList类 参考

Node representing an auto List 更多...

#include <docparser.h>

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

Public 成员函数

 DocAutoList (DocParser &parser, DocNode *parent, int indent, bool isEnumList, int depth)
 
Kind kind () const override
 
bool isEnumList () const
 
int indent () const
 
int depth () const
 
int parse ()
 
- Public 成员函数 继承自 CompAccept< DocAutoList >
 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
 

Private 属性

int m_indent = 0
 
bool m_isEnumList = false
 
int m_depth = 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 属性 继承自 CompAccept< DocAutoList >
DocNodeList m_children
 
- Protected 属性 继承自 DocNode
DocNodem_parent = 0
 
DocParserm_parser
 

详细描述

Node representing an auto List

在文件 docparser.h703 行定义.

构造及析构函数说明

◆ DocAutoList()

DocAutoList::DocAutoList ( DocParser parser,
DocNode parent,
int  indent,
bool  isEnumList,
int  depth 
)

在文件 docparser.cpp4304 行定义.

4305  :
4307  m_depth(depth)
4308 {
4309  m_parent = parent;
4310 }

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

成员函数说明

◆ depth()

int DocAutoList::depth ( ) const
inline

在文件 docparser.h710 行定义.

710 { return m_depth; }

引用了 m_depth.

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

◆ indent()

int DocAutoList::indent ( ) const
inline

在文件 docparser.h709 行定义.

709 { return m_indent; }

引用了 m_indent.

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

◆ isEnumList()

◆ kind()

Kind DocAutoList::kind ( ) const
inlineoverridevirtual

Returns the kind of node. Provides runtime type information

实现了 DocNode.

在文件 docparser.h707 行定义.

707 { return Kind_AutoList; }

引用了 DocNode::Kind_AutoList.

◆ parse()

int DocAutoList::parse ( )

在文件 docparser.cpp4312 行定义.

4313 {
4314  int retval = RetVal_OK;
4315  int num=1;
4316  auto ns = AutoNodeStack(m_parser,this);
4318  // first item or sub list => create new list
4319  do
4320  {
4321  if (m_parser.context.token->id!=-1) // explicitly numbered list
4322  {
4323  num=m_parser.context.token->id; // override num with real number given
4324  }
4325  DocAutoListItem *li = new DocAutoListItem(m_parser,this,m_indent,num++);
4326  m_children.push_back(std::unique_ptr<DocAutoListItem>(li));
4327  retval=li->parse();
4328  //printf("DocAutoList::parse(): retval=0x%x m_parser.context.token->indent=%d m_indent=%d "
4329  // "m_isEnumList=%d m_parser.context.token->isEnumList=%d m_parser.context.token->name=%s\n",
4330  // retval,m_parser.context.token->indent,m_indent,m_isEnumList,m_parser.context.token->isEnumList,
4331  // qPrint(m_parser.context.token->name));
4332  //printf("num=%d m_parser.context.token->id=%d\n",num,m_parser.context.token->id);
4333  }
4334  while (retval==TK_LISTITEM && // new list item
4335  m_indent==m_parser.context.token->indent && // at same indent level
4336  m_isEnumList==m_parser.context.token->isEnumList && // of the same kind
4337  (m_parser.context.token->id==-1 || m_parser.context.token->id>=num) // increasing number (or no number)
4338  );
4339 
4341  return retval;
4342 }

引用了 DocParser::context, DocTokenizer::endAutoList(), TokenInfo::id, TokenInfo::indent, TokenInfo::isEnumList, CompAccept< DocAutoList >::m_children, m_indent, m_isEnumList, DocNode::m_parser, DocAutoListItem::parse(), RetVal_OK, DocTokenizer::startAutoList(), TK_LISTITEM, DocParserContext::token , 以及 DocParser::tokenizer.

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

类成员变量说明

◆ m_depth

int DocAutoList::m_depth = 0
private

在文件 docparser.h716 行定义.

被这些函数引用 depth().

◆ m_indent

int DocAutoList::m_indent = 0
private

在文件 docparser.h714 行定义.

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

◆ m_isEnumList

bool DocAutoList::m_isEnumList = false
private

在文件 docparser.h715 行定义.

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


该类的文档由以下文件生成:
DocAutoListItem
Node representing an item of a auto list
Definition: docparser.h:720
DocParserContext::token
TokenInfo * token
Definition: docparser.cpp:129
DocParser::context
DocParserContext context
Definition: docparser.cpp:175
CompAccept< DocAutoList >
TokenInfo::isEnumList
bool isEnumList
Definition: doctokenizer.h:82
RetVal_OK
@ RetVal_OK
Command starting with \
Definition: doctokenizer.h:59
DocAutoList::m_depth
int m_depth
Definition: docparser.h:716
DocParser::tokenizer
DocTokenizer tokenizer
Definition: docparser.cpp:176
TokenInfo::indent
int indent
Definition: doctokenizer.h:83
TK_LISTITEM
@ TK_LISTITEM
Definition: doctokenizer.h:49
DocAutoList::m_isEnumList
bool m_isEnumList
Definition: docparser.h:715
DocTokenizer::endAutoList
void endAutoList()
DocAutoList::indent
int indent() const
Definition: docparser.h:709
DocNode::m_parser
DocParser & m_parser
Definition: docparser.h:184
DocTokenizer::startAutoList
void startAutoList()
TokenInfo::id
int id
Definition: doctokenizer.h:96
DocNode::Kind_AutoList
@ Kind_AutoList
Definition: docparser.h:104
DocAutoList::isEnumList
bool isEnumList() const
Definition: docparser.h:708
DocAutoListItem::parse
int parse()
Definition: docparser.cpp:4270
DocAutoList::m_indent
int m_indent
Definition: docparser.h:714
AutoNodeStack
Definition: docparser.cpp:186
DocNode::parent
DocNode * parent() const
Definition: docparser.h:166
CompAccept< DocAutoList >::m_children
DocNodeList m_children
Definition: docparser.h:211
DocAutoList::depth
int depth() const
Definition: docparser.h:710
DocNode::m_parent
DocNode * m_parent
Definition: docparser.h:182