Doxygen
Loading...
Searching...
No Matches
DocInternalRef Class Reference

Node representing an internal reference to some item. More...

#include <src/docnode.h>

Inheritance diagram for DocInternalRef:
Collaboration diagram for DocInternalRef:

Public Member Functions

 DocInternalRef (DocParser *parser, DocNodeVariant *parent, const QCString &target)
void parse ()
QCString file () const
QCString relPath () const
QCString anchor () 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

QCString m_file
QCString m_relPath
QCString m_anchor

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 an internal reference to some item.

Definition at line 806 of file docnode.h.

Constructor & Destructor Documentation

◆ DocInternalRef()

DocInternalRef::DocInternalRef ( DocParser * parser,
DocNodeVariant * parent,
const QCString & target )

Definition at line 673 of file docnode.cpp.

674 : DocCompoundNode(parser,parent), m_relPath(parser->context.relPath)
675{
676 int i=ref.find('#');
677 if (i!=-1)
678 {
679 m_anchor = ref.right(static_cast<int>(ref.length())-i-1);
680 m_file = ref.left(i);
681 }
682 else
683 {
684 m_file = ref;
685 }
686}
DocCompoundNode(DocParser *parser, DocNodeVariant *parent)
Definition docnode.h:141
QCString m_file
Definition docnode.h:816
QCString m_anchor
Definition docnode.h:818
QCString m_relPath
Definition docnode.h:817
DocParser * parser()
Definition docnode.h:98
DocNodeVariant * parent()
Definition docnode.h:90
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43

References DocCompoundNode::DocCompoundNode(), QCString::find(), QCString::left(), QCString::length(), m_anchor, m_file, m_relPath, DocNode::parent(), DocNode::parser(), relPath(), and QCString::right().

Member Function Documentation

◆ anchor()

◆ file()

◆ parse()

void DocInternalRef::parse ( )

Definition at line 688 of file docnode.cpp.

689{
690 AUTO_TRACE();
691 auto ns = AutoNodeStack(parser(),thisVariant());
692
693 Token tok = parser()->tokenizer.lex();
694 while (!tok.is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
695 {
696 if (!parser()->defaultHandleToken(thisVariant(),tok,children()))
697 {
699 }
700 tok=parser()->tokenizer.lex();
701 }
702
704}
DocNodeList & children()
Definition docnode.h:143
DocNodeVariant * thisVariant()
Definition docnode.h:93
DocTokenizer tokenizer
void handlePendingStyleCommands(DocNodeVariant *parent, DocNodeList &children)
void errorHandleDefaultToken(DocNodeVariant *parent, Token tok, DocNodeList &children, const QCString &txt)
bool is_any_of(ARGS... args) const
#define AUTO_TRACE(...)
Definition docnode.cpp:47

References AUTO_TRACE, DocCompoundNode::children(), DocParser::errorHandleDefaultToken(), DocParser::handlePendingStyleCommands(), Token::is_any_of(), DocTokenizer::lex(), DocNode::parser(), DocNode::thisVariant(), and DocParser::tokenizer.

◆ relPath()

QCString DocInternalRef::relPath ( ) const
inline

Definition at line 812 of file docnode.h.

812{ return m_relPath; }

References m_relPath.

Referenced by DocInternalRef(), and HtmlDocVisitor::operator()().

Member Data Documentation

◆ m_anchor

QCString DocInternalRef::m_anchor
private

Definition at line 818 of file docnode.h.

Referenced by anchor(), and DocInternalRef().

◆ m_file

QCString DocInternalRef::m_file
private

Definition at line 816 of file docnode.h.

Referenced by DocInternalRef(), and file().

◆ m_relPath

QCString DocInternalRef::m_relPath
private

Definition at line 817 of file docnode.h.

Referenced by DocInternalRef(), and relPath().


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