Doxygen
Loading...
Searching...
No Matches
DocSimpleList Class Reference

Node representing a simple list. More...

#include <src/docnode.h>

+ Inheritance diagram for DocSimpleList:
+ Collaboration diagram for DocSimpleList:

Public Member Functions

 DocSimpleList (DocParser *parser, DocNodeVariant *parent)
 
Token parse ()
 
- Public Member Functions inherited from DocCompoundNode
 DocCompoundNode (DocParser *parser, DocNodeVariant *parent)
 
DocNodeListchildren ()
 
const DocNodeListchildren () const
 
- Public Member Functions inherited from DocNode
 DocNode (DocParser *parser, DocNodeVariant *parent)
 
 ~DocNode ()=default
 
DocNodeVariantparent ()
 
const DocNodeVariantparent () const
 
DocNodeVariantthisVariant ()
 
const DocNodeVariantthisVariant () const
 
void setThisVariant (DocNodeVariant *thisVariant)
 
DocParserparser ()
 
const DocParserparser () const
 
void setParent (DocNodeVariant *parent)
 
bool isPreformatted () const
 

Additional Inherited Members

- Protected Types inherited from DocNode
enum  RefType { Unknown , Anchor , Section , Table }
 
- Protected Member Functions inherited from DocNode
void setInsidePreformatted (bool p)
 

Detailed Description

Node representing a simple list.

Definition at line 983 of file docnode.h.

Constructor & Destructor Documentation

◆ DocSimpleList()

DocSimpleList::DocSimpleList ( DocParser * parser,
DocNodeVariant * parent )
inline

Definition at line 986 of file docnode.h.

DocCompoundNode(DocParser *parser, DocNodeVariant *parent)
Definition docnode.h:140
DocParser * parser()
Definition docnode.h:97
DocNodeVariant * parent()
Definition docnode.h:89

References DocCompoundNode::DocCompoundNode(), DocNode::parent(), and DocNode::parser().

Member Function Documentation

◆ parse()

Token DocSimpleList::parse ( )

Definition at line 2749 of file docnode.cpp.

2750{
2751 auto ns = AutoNodeStack(parser(),thisVariant());
2752 Token rv = Token::make_TK_NONE();
2753 do
2754 {
2755 children().append<DocSimpleListItem>(parser(),thisVariant());
2756 DocSimpleListItem *li = children().get_last<DocSimpleListItem>();
2757 rv=li->parse();
2758 } while (rv.is(TokenRetval::RetVal_ListItem));
2759 return (!rv.is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
2760}
DocNodeList & children()
Definition docnode.h:142
DocNodeVariant * thisVariant()
Definition docnode.h:92
void append(Args &&... args)
Append a new DocNodeVariant to the list by constructing it with type T and parameters Args.
Definition docnode.h:1393
T * get_last()
Returns a pointer to the last element in the list if that element exists and holds a T,...
Definition docnode.h:1404

References DocNodeList::append(), DocCompoundNode::children(), DocNodeList::get_last(), Token::is(), DocNode::parser(), and DocNode::thisVariant().


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