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 ,
  Requirement
}
Protected Member Functions inherited from DocNode
void setInsidePreformatted (bool p)

Detailed Description

Node representing a parameter section.

Definition at line 1061 of file docnode.h.

Member Enumeration Documentation

◆ Direction

Enumerator
In 
Out 
InOut 
Unspecified 

Definition at line 1069 of file docnode.h.

1070 {
1071 In=1, Out=2, InOut=3, Unspecified=0
1072 };

◆ Type

Enumerator
Unknown 
Param 
RetVal 
Exception 
TemplateParam 

Definition at line 1065 of file docnode.h.

Constructor & Destructor Documentation

◆ DocParamSect()

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

Definition at line 1073 of file docnode.h.

1075 {}
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:1084
bool m_hasInOutSpecifier
Definition docnode.h:1083
#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 3437 of file docnode.cpp.

3438{
3439 AUTO_TRACE();
3440 Token retval = Token::make_RetVal_OK();
3441 auto ns = AutoNodeStack(parser(),thisVariant());
3442
3443 if (d!=Unspecified)
3444 {
3446 }
3447
3448 if (!children().empty() && std::holds_alternative<DocParamList>(children().back()))
3449 {
3450 DocParamList &lastPl = std::get<DocParamList>(children().back());
3451 lastPl.markLast(false);
3452 }
3453 bool markFirst = children().empty();
3456 if (markFirst)
3457 {
3458 pl->markFirst();
3459 }
3460 pl->markLast();
3461 if (xmlContext)
3462 {
3463 retval = pl->parseXml(cmdName);
3464 }
3465 else
3466 {
3467 retval = pl->parse(cmdName);
3468 }
3469 if (retval.is(TokenRetval::RetVal_EndParBlock))
3470 {
3471 retval = Token::make_RetVal_OK();
3472 }
3473
3474 AUTO_TRACE_EXIT("retval={}",retval.to_string());
3475 return retval;
3476}
DocNodeList & children()
Definition docnode.h:143
DocNodeVariant * thisVariant()
Definition docnode.h:93
void markLast(bool b=TRUE)
Definition docnode.h:1140
friend class DocParamList
Definition docnode.h:1063
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:48
#define AUTO_TRACE_EXIT(...)
Definition docnode.cpp:50
#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:1404
T * get_last()
Returns a pointer to the last element in the list if that element exists and holds a T,...
Definition docnode.h:1415

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

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

◆ m_hasTypeSpecifier

bool DocParamSect::m_hasTypeSpecifier = false
private

Definition at line 1084 of file docnode.h.

Referenced by DocParamSect(), and hasTypeSpecifier().

◆ m_type

Type DocParamSect::m_type = Unknown
private

Definition at line 1082 of file docnode.h.

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


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