Skip to main content

The DocFormula Class Reference

Node representing an item of a cross-referenced list. More...

Declaration

class DocFormula { ... }

Included Headers

#include <src/docnode.h>

Base class

classDocNode

Abstract node interface with type information. More...

Public Constructors Index

DocFormula (DocParser *parser, DocNodeVariant *parent, int id)

Public Member Functions Index

QCStringname () const
QCStringtext () const
QCStringrelPath () const
intid () const
boolisInline () const

Private Member Attributes Index

QCStringm_name
QCStringm_text
QCStringm_relPath
intm_id = 0

Description

Node representing an item of a cross-referenced list.

Definition at line 528 of file docnode.h.

Public Constructors

DocFormula()

DocFormula::DocFormula (DocParser * parser, DocNodeVariant * parent, int id)

Declaration at line 531 of file docnode.h, definition at line 515 of file docnode.cpp.

516 m_relPath(parser->context.relPath)
517{
518 const Formula *formula = FormulaManager::instance().findFormula(id);
519 if (formula && !formula->text().isEmpty())
520 {
521 m_id = id;
522 m_name.sprintf("form_%d",m_id);
523 m_text = formula->text();
524 }
525 else // wrong \_form#<n> command
526 {
527 warn_doc_error(parser->context.fileName,parser->tokenizer.getLineNr(),"Wrong formula id {:d}",id);
528 m_id = -1;
529 }
530}

References DocNode::DocNode, FormulaManager::findFormula, id, FormulaManager::instance, QCString::isEmpty, m_id, m_name, m_relPath, m_text, DocNode::parent, DocNode::parser, relPath, Formula::text and warn_doc_error.

Public Member Functions

id()

int DocFormula::id ()
inline

Definition at line 535 of file docnode.h.

535 int id() const { return m_id; }

Reference m_id.

Referenced by DocFormula, HtmlDocVisitor::operator(), PerlModDocVisitor::operator() and XmlDocVisitor::operator().

isInline()

bool DocFormula::isInline ()
inline

Definition at line 536 of file docnode.h.

536 bool isInline() const
537 {
538 if (m_text.length()>1 && m_text.at(0)=='\\' && m_text.at(1)=='[') return false;
539 if (m_text.startsWith("\\begin{")) return false;
540 return true;
541 }

Reference m_text.

Referenced by mustBeOutsideParagraph, DocbookDocVisitor::operator(), HtmlDocVisitor::operator() and RTFDocVisitor::operator().

name()

QCString DocFormula::name ()
inline

relPath()

QCString DocFormula::relPath ()
inline

Definition at line 534 of file docnode.h.

534 QCString relPath() const { return m_relPath; }

Reference m_relPath.

Referenced by DocFormula, DocbookDocVisitor::operator(), HtmlDocVisitor::operator() and RTFDocVisitor::operator().

text()

QCString DocFormula::text ()
inline

Private Member Attributes

m_id

int DocFormula::m_id = 0

Definition at line 547 of file docnode.h.

547 int m_id = 0;

Referenced by DocFormula and id.

m_name

QCString DocFormula::m_name

Definition at line 544 of file docnode.h.

Referenced by DocFormula and name.

m_relPath

QCString DocFormula::m_relPath

Definition at line 546 of file docnode.h.

Referenced by DocFormula and relPath.

m_text

QCString DocFormula::m_text

Definition at line 545 of file docnode.h.

Referenced by DocFormula, isInline and text.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.