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

Constructor & Destructor Documentation

◆ DocInternalRef()

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

Definition at line 675 of file docnode.cpp.

676 : DocCompoundNode(parser,parent), m_relPath(parser->context.relPath)
677{
678 int i=ref.find('#');
679 if (i!=-1)
680 {
681 m_anchor = ref.right(static_cast<int>(ref.length())-i-1);
682 m_file = ref.left(i);
683 }
684 else
685 {
686 m_file = ref;
687 }
688}
DocCompoundNode(DocParser *parser, DocNodeVariant *parent)
Definition docnode.h:141
QCString m_file
Definition docnode.h:825
QCString m_anchor
Definition docnode.h:827
QCString m_relPath
Definition docnode.h:826
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 690 of file docnode.cpp.

691{
692 AUTO_TRACE();
693 auto ns = AutoNodeStack(parser(),thisVariant());
694
695 Token tok = parser()->tokenizer.lex();
696 while (!tok.is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF))
697 {
698 if (!parser()->defaultHandleToken(thisVariant(),tok,children()))
699 {
701 }
702 tok=parser()->tokenizer.lex();
703 }
704
706}
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:48

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

821{ 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 827 of file docnode.h.

Referenced by anchor(), and DocInternalRef().

◆ m_file

QCString DocInternalRef::m_file
private

Definition at line 825 of file docnode.h.

Referenced by DocInternalRef(), and file().

◆ m_relPath

QCString DocInternalRef::m_relPath
private

Definition at line 826 of file docnode.h.

Referenced by DocInternalRef(), and relPath().


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