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 }
 
- Protected Member Functions inherited from DocNode
void setInsidePreformatted (bool p)
 

Detailed Description

Node representing an internal reference to some item.

Definition at line 800 of file docnode.h.

Constructor & Destructor Documentation

◆ DocInternalRef()

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

Definition at line 670 of file docnode.cpp.

671 : DocCompoundNode(parser,parent), m_relPath(parser->context.relPath)
672{
673 int i=ref.find('#');
674 if (i!=-1)
675 {
676 m_anchor = ref.right(static_cast<int>(ref.length())-i-1);
677 m_file = ref.left(i);
678 }
679 else
680 {
681 m_file = ref;
682 }
683}
DocCompoundNode(DocParser *parser, DocNodeVariant *parent)
Definition docnode.h:140
QCString m_file
Definition docnode.h:810
QCString m_anchor
Definition docnode.h:812
QCString m_relPath
Definition docnode.h:811
DocParser * parser()
Definition docnode.h:97
DocNodeVariant * parent()
Definition docnode.h:89
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 685 of file docnode.cpp.

686{
687 AUTO_TRACE();
688 auto ns = AutoNodeStack(parser(),thisVariant());
689
690 Token tok = parser()->tokenizer.lex();
691 while (!tok.is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
692 {
693 if (!parser()->defaultHandleToken(thisVariant(),tok,children()))
694 {
696 }
697 tok=parser()->tokenizer.lex();
698 }
699
701}
DocNodeList & children()
Definition docnode.h:142
DocNodeVariant * thisVariant()
Definition docnode.h:92
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:46

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

806{ 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 812 of file docnode.h.

Referenced by anchor(), and DocInternalRef().

◆ m_file

QCString DocInternalRef::m_file
private

Definition at line 810 of file docnode.h.

Referenced by DocInternalRef(), and file().

◆ m_relPath

QCString DocInternalRef::m_relPath
private

Definition at line 811 of file docnode.h.

Referenced by DocInternalRef(), and relPath().


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