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 969 of file docnode.h.

Constructor & Destructor Documentation

◆ DocSimpleList()

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

Definition at line 972 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 2747 of file docnode.cpp.

2748{
2749 auto ns = AutoNodeStack(parser(),thisVariant());
2750 Token rv = Token::make_TK_NONE();
2751 do
2752 {
2753 children().append<DocSimpleListItem>(parser(),thisVariant());
2754 DocSimpleListItem *li = children().get_last<DocSimpleListItem>();
2755 rv=li->parse();
2756 } while (rv.is(TokenRetval::RetVal_ListItem));
2757 return (!rv.is(TokenRetval::TK_NEWPARA)) ? rv : Token::make_RetVal_OK();
2758}
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:1379
T * get_last()
Returns a pointer to the last element in the list if that element exists and holds a T,...
Definition docnode.h:1390

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: