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

Member Enumeration Documentation

◆ Direction

Enumerator
In 
Out 
InOut 
Unspecified 

Definition at line 1055 of file docnode.h.

1056 {
1057 In=1, Out=2, InOut=3, Unspecified=0
1058 };

◆ Type

Enumerator
Unknown 
Param 
RetVal 
Exception 
TemplateParam 

Definition at line 1051 of file docnode.h.

Constructor & Destructor Documentation

◆ DocParamSect()

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

Definition at line 1059 of file docnode.h.

1061 {}
DocCompoundNode(DocParser *parser, DocNodeVariant *parent)
Definition docnode.h:140
DocParser * parser()
Definition docnode.h:97
DocNodeVariant * parent()
Definition docnode.h:89
bool m_hasTypeSpecifier
Definition docnode.h:1070
bool m_hasInOutSpecifier
Definition docnode.h:1069
#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 3199 of file docnode.cpp.

3200{
3201 AUTO_TRACE();
3202 Token retval = Token::make_RetVal_OK();
3203 auto ns = AutoNodeStack(parser(),thisVariant());
3204
3205 if (d!=Unspecified)
3206 {
3208 }
3209
3210 if (!children().empty() && std::holds_alternative<DocParamList>(children().back()))
3211 {
3212 DocParamList &lastPl = std::get<DocParamList>(children().back());
3213 lastPl.markLast(false);
3214 }
3215 bool markFirst = children().empty();
3218 if (markFirst)
3219 {
3220 pl->markFirst();
3221 }
3222 pl->markLast();
3223 if (xmlContext)
3224 {
3225 retval = pl->parseXml(cmdName);
3226 }
3227 else
3228 {
3229 retval = pl->parse(cmdName);
3230 }
3231 if (retval.is(TokenRetval::RetVal_EndParBlock))
3232 {
3233 retval = Token::make_RetVal_OK();
3234 }
3235
3236 AUTO_TRACE_EXIT("retval={}",retval.to_string());
3237 return retval;
3238}
DocNodeList & children()
Definition docnode.h:142
DocNodeVariant * thisVariant()
Definition docnode.h:92
void markLast(bool b=TRUE)
Definition docnode.h:1130
friend class DocParamList
Definition docnode.h:1049
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:1394
T * get_last()
Returns a pointer to the last element in the list if that element exists and holds a T,...
Definition docnode.h:1405

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

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

◆ m_hasTypeSpecifier

bool DocParamSect::m_hasTypeSpecifier = false
private

Definition at line 1070 of file docnode.h.

Referenced by DocParamSect(), and hasTypeSpecifier().

◆ m_type

Type DocParamSect::m_type = Unknown
private

Definition at line 1068 of file docnode.h.

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


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