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

Member Enumeration Documentation

◆ Direction

Enumerator
In 
Out 
InOut 
Unspecified 

Definition at line 1054 of file docnode.h.

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

◆ Type

Enumerator
Unknown 
Param 
RetVal 
Exception 
TemplateParam 

Definition at line 1050 of file docnode.h.

Constructor & Destructor Documentation

◆ DocParamSect()

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

Definition at line 1058 of file docnode.h.

1060 {}
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:1069
bool m_hasInOutSpecifier
Definition docnode.h:1068
#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 3184 of file docnode.cpp.

3185{
3186 AUTO_TRACE();
3187 Token retval = Token::make_RetVal_OK();
3188 auto ns = AutoNodeStack(parser(),thisVariant());
3189
3190 if (d!=Unspecified)
3191 {
3193 }
3194
3195 if (!children().empty() && std::holds_alternative<DocParamList>(children().back()))
3196 {
3197 DocParamList &lastPl = std::get<DocParamList>(children().back());
3198 lastPl.markLast(false);
3199 }
3200 bool markFirst = children().empty();
3203 if (markFirst)
3204 {
3205 pl->markFirst();
3206 }
3207 pl->markLast();
3208 if (xmlContext)
3209 {
3210 retval = pl->parseXml(cmdName);
3211 }
3212 else
3213 {
3214 retval = pl->parse(cmdName);
3215 }
3216 if (retval.is(TokenRetval::RetVal_EndParBlock))
3217 {
3218 retval = Token::make_RetVal_OK();
3219 }
3220
3221 AUTO_TRACE_EXIT("retval={}",retval.to_string());
3222 return retval;
3223}
DocNodeList & children()
Definition docnode.h:142
DocNodeVariant * thisVariant()
Definition docnode.h:92
void markLast(bool b=TRUE)
Definition docnode.h:1129
friend class DocParamList
Definition docnode.h:1048
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: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(), 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()

Friends And Related Symbol Documentation

◆ DocParamList

friend class DocParamList
friend

Definition at line 1048 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 1068 of file docnode.h.

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

◆ m_hasTypeSpecifier

bool DocParamSect::m_hasTypeSpecifier = false
private

Definition at line 1069 of file docnode.h.

Referenced by DocParamSect(), and hasTypeSpecifier().

◆ m_type

Type DocParamSect::m_type = Unknown
private

Definition at line 1067 of file docnode.h.

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


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