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

Member Enumeration Documentation

◆ Direction

Enumerator
In 
Out 
InOut 
Unspecified 

Definition at line 1040 of file docnode.h.

1041 {
1042 In=1, Out=2, InOut=3, Unspecified=0
1043 };

◆ Type

Enumerator
Unknown 
Param 
RetVal 
Exception 
TemplateParam 

Definition at line 1036 of file docnode.h.

Constructor & Destructor Documentation

◆ DocParamSect()

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

Definition at line 1044 of file docnode.h.

1046 {}
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:1055
bool m_hasInOutSpecifier
Definition docnode.h:1054
#define FALSE
Definition qcstring.h:34

References DocCompoundNode::DocCompoundNode(), 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 3182 of file docnode.cpp.

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

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

◆ m_hasTypeSpecifier

bool DocParamSect::m_hasTypeSpecifier = false
private

Definition at line 1055 of file docnode.h.

Referenced by DocParamSect(), and hasTypeSpecifier().

◆ m_type

Type DocParamSect::m_type = Unknown
private

Definition at line 1053 of file docnode.h.

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


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