Skip to main content

DocAutoList Class

Node representing an auto List. More...

Declaration​

class DocAutoList { ... }

Included Headers​

#include <src/docnode.h>

Base class​

classDocCompoundNode

Base class for nodes with children. More...

Enumerations Index​

enumListType { ... }

Public Constructors Index​

DocAutoList (DocParser *parser, DocNodeVariant *parent, int indent, bool isEnumList, int depth, bool isCheckedList)

Public Member Functions Index​

boolisEnumList () const
intindent () const
boolisCheckedList () const
intdepth () const
Tokenparse ()

Private Member Attributes Index​

intm_indent = 0
boolm_isEnumList = false
boolm_isCheckedList = false
intm_depth = 0

Description​

Node representing an auto List.

Definition at line 570 of file docnode.h.

Enumerations​

ListType​

enum DocAutoList::ListType
Enumeration values
Unnumbered (=1)
Unchecked (=-2)
Checked_x (=-3)
Checked_X (=-4)

Definition at line 573 of file docnode.h.

574 {
575 Unnumbered=1, Unchecked=-2, Checked_x=-3, Checked_X=-4 // positive numbers give the label
576 };

Public Constructors​

DocAutoList()​

DocAutoList::DocAutoList (DocParser * parser, DocNodeVariant * parent, int indent, bool isEnumList, int depth, bool isCheckedList)

Public Member Functions​

depth()​

int DocAutoList::depth ()
inline

Definition at line 583 of file docnode.h.

583 int depth() const { return m_depth; }

Reference m_depth.

Referenced by DocAutoList and HtmlDocVisitor::operator().

indent()​

int DocAutoList::indent ()
inline

Definition at line 581 of file docnode.h.

581 int indent() const { return m_indent; }

Reference m_indent.

Referenced by DocAutoList and DocPara::parse.

isCheckedList()​

bool DocAutoList::isCheckedList ()
inline

Definition at line 582 of file docnode.h.

582 bool isCheckedList() const { return m_isCheckedList; }

Reference m_isCheckedList.

Referenced by DocAutoList, HtmlDocVisitor::operator(), PerlModDocVisitor::operator() and RTFDocVisitor::operator().

isEnumList()​

parse()​

Token DocAutoList::parse ()

Declaration at line 584 of file docnode.h, definition at line 2922 of file docnode.cpp.

2923{
2924 AUTO_TRACE();
2925 Token retval = Token::make_RetVal_OK();
2926 int num=1;
2927 auto ns = AutoNodeStack(parser(),thisVariant());
2929 // first item or sub list => create new list
2930 do
2931 {
2932 switch (parser()->context.token->id)
2933 {
2934 case -1:
2935 break;
2936 case DocAutoList::Unchecked: // unchecked
2937 case DocAutoList::Checked_x: // checked with x
2938 case DocAutoList::Checked_X: // checked with X
2939 num = parser()->context.token->id;
2940 break;
2941 default: // explicitly numbered list
2942 num=parser()->context.token->id; // override num with real number given
2943 break;
2944 }
2945
2947 retval = children().get_last<DocAutoListItem>()->parse();
2948 //printf("DocAutoList::parse(): retval=0x%x parser()->context.token->indent=%d m_indent=%d "
2949 // "m_isEnumList=%d parser()->context.token->isEnumList=%d parser()->context.token->name=%s\n",
2950 // retval,parser()->context.token->indent,m_indent,m_isEnumList,parser()->context.token->isEnumList,
2951 // qPrint(parser()->context.token->name));
2952 //printf("num=%d parser()->context.token->id=%d\n",num,parser()->context.token->id);
2953 }
2954 while (retval.is(TokenRetval::TK_LISTITEM) && // new list item
2955 m_indent==parser()->context.token->indent && // at same indent level
2956 m_isEnumList==parser()->context.token->isEnumList && // of the same kind
2957 m_isCheckedList==parser()->context.token->isCheckedList && // of the same kind
2958 (parser()->context.token->id==-1 || parser()->context.token->id>=num) // increasing number (or no number or checked list)
2959 );
2960
2962 AUTO_TRACE_EXIT("retval={}",retval.to_string());
2963 return retval;
2964}

References DocNodeList::append, AUTO_TRACE, AUTO_TRACE_EXIT, Checked_X, Checked_x, DocCompoundNode::children, DocParser::context, DocTokenizer::endAutoList, DocNodeList::get_last, TokenInfo::id, Token::is, m_indent, m_isCheckedList, m_isEnumList, parse, DocNode::parser, DocTokenizer::startAutoList, DocNode::thisVariant, Token::to_string, DocParserContext::token, DocParser::tokenizer and Unchecked.

Referenced by parse.

Private Member Attributes​

m_depth​

int DocAutoList::m_depth = 0

Definition at line 590 of file docnode.h.

590 int m_depth = 0;

Referenced by depth and DocAutoList.

m_indent​

int DocAutoList::m_indent = 0

Definition at line 587 of file docnode.h.

587 int m_indent = 0;

Referenced by DocAutoList, indent and parse.

m_isCheckedList​

bool DocAutoList::m_isCheckedList = false

Definition at line 589 of file docnode.h.

589 bool m_isCheckedList = false;

Referenced by DocAutoList, isCheckedList and parse.

m_isEnumList​

bool DocAutoList::m_isEnumList = false

Definition at line 588 of file docnode.h.

588 bool m_isEnumList = false;

Referenced by DocAutoList, isEnumList and parse.


The documentation for this class was generated from the following files:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.14.0.