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

Node representing a parameter section. More...

#include <src/docnode.h>

Inheritance diagram for DocParamSect:
Collaboration diagram for DocParamSect:

Public Types

enum  Type {
  Unknown , Param , RetVal , Exception ,
  TemplateParam
}
enum  Direction { In =1 , Out =2 , InOut =3 , Unspecified =0 }

Public Member Functions

 DocParamSect (DocParser *parser, DocNodeVariant *parent, Type t)
Token parse (const QCString &cmdName, bool xmlContext, Direction d)
Type type () const
bool hasInOutSpecifier () const
bool hasTypeSpecifier () const
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

Private Attributes

Type m_type = Unknown
bool m_hasInOutSpecifier = false
bool m_hasTypeSpecifier = false

Friends

class DocParamList

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 parameter section.

Definition at line 1052 of file docnode.h.

Member Enumeration Documentation

◆ Direction

Enumerator
In 
Out 
InOut 
Unspecified 

Definition at line 1060 of file docnode.h.

1061 {
1062 In=1, Out=2, InOut=3, Unspecified=0
1063 };

◆ Type

Enumerator
Unknown 
Param 
RetVal 
Exception 
TemplateParam 

Definition at line 1056 of file docnode.h.

Constructor & Destructor Documentation

◆ DocParamSect()

DocParamSect::DocParamSect ( DocParser * parser,
DocNodeVariant * parent,
Type t )
inline

Definition at line 1064 of file docnode.h.

1066 {}
DocCompoundNode(DocParser *parser, DocNodeVariant *parent)
Definition docnode.h:141
DocParser * parser()
Definition docnode.h:98
DocNodeVariant * parent()
Definition docnode.h:90
bool m_hasTypeSpecifier
Definition docnode.h:1075
bool m_hasInOutSpecifier
Definition docnode.h:1074
#define FALSE
Definition qcstring.h:34

References DocCompoundNode::DocCompoundNode(), FALSE, m_hasInOutSpecifier, m_hasTypeSpecifier, m_type, DocNode::parent(), and DocNode::parser().

Member Function Documentation

◆ hasInOutSpecifier()

◆ hasTypeSpecifier()

◆ parse()

Token DocParamSect::parse ( const QCString & cmdName,
bool xmlContext,
Direction d )

Definition at line 3347 of file docnode.cpp.

3348{
3349 AUTO_TRACE();
3350 Token retval = Token::make_RetVal_OK();
3351 auto ns = AutoNodeStack(parser(),thisVariant());
3352
3353 if (d!=Unspecified)
3354 {
3356 }
3357
3358 if (!children().empty() && std::holds_alternative<DocParamList>(children().back()))
3359 {
3360 DocParamList &lastPl = std::get<DocParamList>(children().back());
3361 lastPl.markLast(false);
3362 }
3363 bool markFirst = children().empty();
3366 if (markFirst)
3367 {
3368 pl->markFirst();
3369 }
3370 pl->markLast();
3371 if (xmlContext)
3372 {
3373 retval = pl->parseXml(cmdName);
3374 }
3375 else
3376 {
3377 retval = pl->parse(cmdName);
3378 }
3379 if (retval.is(TokenRetval::RetVal_EndParBlock))
3380 {
3381 retval = Token::make_RetVal_OK();
3382 }
3383
3384 AUTO_TRACE_EXIT("retval={}",retval.to_string());
3385 return retval;
3386}
DocNodeList & children()
Definition docnode.h:143
DocNodeVariant * thisVariant()
Definition docnode.h:93
void markLast(bool b=TRUE)
Definition docnode.h:1135
friend class DocParamList
Definition docnode.h:1054
bool empty() const
checks whether the container is empty
Definition growvector.h:140
bool is(TokenRetval rv) const
TOKEN_SPECIFICATIONS RETVAL_SPECIFICATIONS const char * to_string() const
#define AUTO_TRACE(...)
Definition docnode.cpp:46
#define AUTO_TRACE_EXIT(...)
Definition docnode.cpp:48
#define TRUE
Definition qcstring.h:37
void append(Args &&... args)
Append a new DocNodeVariant to the list by constructing it with type T and parameters Args.
Definition docnode.h:1399
T * get_last()
Returns a pointer to the last element in the list if that element exists and holds a T,...
Definition docnode.h:1410

References DocNodeList::append(), AUTO_TRACE, AUTO_TRACE_EXIT, DocCompoundNode::children(), DocParamList, GrowVector< T >::empty(), DocNodeList::get_last(), Token::is(), m_hasInOutSpecifier, m_type, DocParamList::markLast(), DocNode::parser(), DocNode::thisVariant(), Token::to_string(), TRUE, and Unspecified.

Referenced by DocPara::handleParamSection().

◆ type()

◆ DocParamList

friend class DocParamList
friend

Definition at line 1054 of file docnode.h.

References DocParamList.

Referenced by DocParamList, and parse().

Member Data Documentation

◆ m_hasInOutSpecifier

bool DocParamSect::m_hasInOutSpecifier = false
private

Definition at line 1074 of file docnode.h.

Referenced by DocParamSect(), hasInOutSpecifier(), and parse().

◆ m_hasTypeSpecifier

bool DocParamSect::m_hasTypeSpecifier = false
private

Definition at line 1075 of file docnode.h.

Referenced by DocParamSect(), and hasTypeSpecifier().

◆ m_type

Type DocParamSect::m_type = Unknown
private

Definition at line 1073 of file docnode.h.

Referenced by DocParamSect(), parse(), and type().


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