Skip to main content

The DocHRef Class Reference

Node representing a Hypertext reference. More...

Declaration

class DocHRef { ... }

Included Headers

#include <src/docnode.h>

Base class

classDocCompoundNode

Base class for nodes with children. More...

Public Constructors Index

DocHRef (DocParser *parser, DocNodeVariant *parent, const HtmlAttribList &attribs, const QCString &url, const QCString &relPath, const QCString &file)

Public Member Functions Index

Tokenparse ()
QCStringurl () const
QCStringfile () const
QCStringrelPath () const
const HtmlAttribList &attribs () const

Private Member Attributes Index

HtmlAttribListm_attribs
QCStringm_url
QCStringm_relPath
QCStringm_file

Description

Node representing a Hypertext reference.

Definition at line 822 of file docnode.h.

Public Constructors

DocHRef()

DocHRef::DocHRef (DocParser * parser, DocNodeVariant * parent, const HtmlAttribList & attribs, const QCString & url, const QCString & relPath, const QCString & file)
inline

Public Member Functions

attribs()

const HtmlAttribList & DocHRef::attribs ()
inline

Definition at line 833 of file docnode.h.

833 const HtmlAttribList &attribs() const { return m_attribs; }

Reference m_attribs.

Referenced by DocHRef and HtmlDocVisitor::operator().

file()

QCString DocHRef::file ()
inline

Definition at line 831 of file docnode.h.

831 QCString file() const { return m_file; }

Reference m_file.

Referenced by DocHRef, DocbookDocVisitor::operator() and RTFDocVisitor::operator().

parse()

Token DocHRef::parse ()

Declaration at line 829 of file docnode.h, definition at line 1489 of file docnode.cpp.

1490{
1491 AUTO_TRACE();
1492 Token retval(TokenRetval::RetVal_OK);
1493 auto ns = AutoNodeStack(parser(),thisVariant());
1494
1495 Token tok = parser()->tokenizer.lex();
1496 while (!tok.is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
1497 {
1498 if (!parser()->defaultHandleToken(thisVariant(),tok,children()))
1499 {
1500 switch (tok.value())
1501 {
1502 case TokenRetval::TK_HTMLTAG:
1503 {
1504 HtmlTagType tagId=Mappers::htmlTagMapper->map(parser()->context.token->name);
1505 if (tagId==HtmlTagType::HTML_A && parser()->context.token->endTag) // found </a> tag
1506 {
1507 goto endhref;
1508 }
1509 else if (tagId==HtmlTagType::HTML_BR)
1510 {
1512 }
1513 else
1514 {
1515 warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected html tag <{}{}> found within <a href=...> context",
1516 parser()->context.token->endTag?"/":"",parser()->context.token->name);
1517 }
1518 }
1519 break;
1520 default:
1521 parser()->errorHandleDefaultToken(thisVariant(),tok,children(),"<a>..</a> block");
1522 break;
1523 }
1524 }
1525 tok = parser()->tokenizer.lex();
1526 }
1527 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1528 {
1529 warn_doc_error(parser()->context.fileName,parser()->tokenizer.getLineNr(),"Unexpected end of comment while inside"
1530 " <a href=...> tag");
1531 }
1532endhref:
1534 return retval;
1535}

References DocNodeList::append, TokenInfo::attribs, AUTO_TRACE, DocCompoundNode::children, DocParser::context, DocParser::errorHandleDefaultToken, DocParser::handlePendingStyleCommands, HTML_A, HTML_BR, Mappers::htmlTagMapper, Token::is_any_of, DocTokenizer::lex, DocNode::parser, DocNode::thisVariant, DocParserContext::token, DocParser::tokenizer, Token::value and warn_doc_error.

relPath()

QCString DocHRef::relPath ()
inline

Definition at line 832 of file docnode.h.

832 QCString relPath() const { return m_relPath; }

Reference m_relPath.

Referenced by DocHRef and HtmlDocVisitor::operator().

url()

Private Member Attributes

m_attribs

HtmlAttribList DocHRef::m_attribs

Definition at line 836 of file docnode.h.

Referenced by attribs and DocHRef.

m_file

QCString DocHRef::m_file

Definition at line 839 of file docnode.h.

Referenced by DocHRef and file.

m_relPath

QCString DocHRef::m_relPath

Definition at line 838 of file docnode.h.

Referenced by DocHRef and relPath.

m_url

QCString DocHRef::m_url

Definition at line 837 of file docnode.h.

Referenced by DocHRef and url.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.