My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
DocFormula Class Reference

#include <docparser.h>

Inheritance diagram for DocFormula:
DocNode

Public Member Functions

 DocFormula (DocNode *parent, int id)
 
Kind kind () const
 
QCString name () const
 
QCString text () const
 
QCString relPath () const
 
int id () const
 
void accept (DocVisitor *v)
 
bool isInline ()
 
- Public Member Functions inherited from DocNode
 DocNode ()
 
virtual ~DocNode ()
 
DocNodeparent () const
 
void setParent (DocNode *parent)
 
bool isPreformatted () const
 

Private Attributes

QCString m_name
 
QCString m_text
 
QCString m_relPath
 
int m_id
 

Additional Inherited Members

- Public Types inherited from DocNode
enum  Kind {
  Kind_Root = 0, Kind_Word = 1, Kind_WhiteSpace = 2, Kind_Para = 3,
  Kind_AutoList = 4, Kind_AutoListItem = 5, Kind_Symbol = 6, Kind_URL = 7,
  Kind_StyleChange = 8, Kind_SimpleSect = 9, Kind_Title = 10, Kind_SimpleList = 11,
  Kind_SimpleListItem = 12, Kind_Section = 13, Kind_Verbatim = 14, Kind_XRefItem = 15,
  Kind_HtmlList = 16, Kind_HtmlListItem = 17, Kind_HtmlDescList = 18, Kind_HtmlDescData = 19,
  Kind_HtmlDescTitle = 20, Kind_HtmlTable = 21, Kind_HtmlRow = 22, Kind_HtmlCell = 23,
  Kind_HtmlCaption = 24, Kind_LineBreak = 25, Kind_HorRuler = 26, Kind_Anchor = 27,
  Kind_IndexEntry = 28, Kind_Internal = 29, Kind_HRef = 30, Kind_Include = 31,
  Kind_IncOperator = 32, Kind_HtmlHeader = 33, Kind_Image = 34, Kind_DotFile = 35,
  Kind_Link = 36, Kind_Ref = 37, Kind_Formula = 38, Kind_SecRefItem = 39,
  Kind_SecRefList = 40, Kind_SimpleSectSep = 41, Kind_LinkedWord = 42, Kind_ParamSect = 43,
  Kind_ParamList = 44, Kind_InternalRef = 45, Kind_Copy = 46, Kind_Text = 47,
  Kind_MscFile = 48, Kind_HtmlBlockQuote = 49, Kind_VhdlFlow = 50, Kind_ParBlock = 51,
  Kind_DiaFile = 52
}
 
- Protected Member Functions inherited from DocNode
void setInsidePreformatted (bool p)
 
- Protected Attributes inherited from DocNode
DocNodem_parent
 

Detailed Description

Node representing an item of a cross-referenced list

Definition at line 557 of file docparser.h.

Constructor & Destructor Documentation

DocFormula::DocFormula ( DocNode parent,
int  id 
)

Definition at line 2219 of file docparser.cpp.

References doctokenizerYYlineno, Doxygen::formulaNameDict, g_fileName, Formula::getFormulaText(), Formula::getId(), m_id, m_name, DocNode::m_parent, m_text, DocNode::parent(), and warn_doc_error().

:
{
QCString formCmd;
formCmd.sprintf("\\form#%d",id);
Formula *formula=Doxygen::formulaNameDict->find(formCmd);
if (formula)
{
m_id = formula->getId();
m_name.sprintf("form_%d",m_id);
m_text = formula->getFormulaText();
}
else // wrong \form#<n> command
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"Wrong formula id %d",id);
m_id = -1;
}
}

Member Function Documentation

void DocFormula::accept ( DocVisitor v)
inlinevirtual

Acceptor function for node visitors. Part of the visitor pattern.

Parameters
vAbstract visitor.

Implements DocNode.

Definition at line 566 of file docparser.h.

References DocVisitor::visit().

{ v->visit(this); }
int DocFormula::id ( ) const
inline

Definition at line 565 of file docparser.h.

References m_id.

Referenced by XmlDocVisitor::visit(), and PerlModDocVisitor::visit().

{ return m_id; }
bool DocFormula::isInline ( )
inline

Definition at line 567 of file docparser.h.

References m_text.

Referenced by HtmlDocVisitor::visit().

{ return m_text.length()>0 ? m_text.at(0)!='\\' : TRUE; }
Kind DocFormula::kind ( ) const
inlinevirtual

Returns the kind of node. Provides runtime type information

Implements DocNode.

Definition at line 561 of file docparser.h.

References DocNode::Kind_Formula.

{ return Kind_Formula; }
QCString DocFormula::name ( ) const
inline

Definition at line 562 of file docparser.h.

References m_name.

Referenced by DocbookDocVisitor::visit(), HtmlDocVisitor::visit(), and PrintDocVisitor::visit().

{ return m_name; }
QCString DocFormula::relPath ( ) const
inline

Definition at line 564 of file docparser.h.

References m_relPath.

Referenced by HtmlDocVisitor::visit().

{ return m_relPath; }
QCString DocFormula::text ( ) const
inline

Definition at line 563 of file docparser.h.

References m_text.

Referenced by DocbookDocVisitor::visit(), ManDocVisitor::visit(), RTFDocVisitor::visit(), XmlDocVisitor::visit(), HtmlDocVisitor::visit(), LatexDocVisitor::visit(), PrintDocVisitor::visit(), and PerlModDocVisitor::visit().

{ return m_text; }

Member Data Documentation

int DocFormula::m_id
private

Definition at line 573 of file docparser.h.

Referenced by DocFormula(), and id().

QCString DocFormula::m_name
private

Definition at line 570 of file docparser.h.

Referenced by DocFormula(), and name().

QCString DocFormula::m_relPath
private

Definition at line 572 of file docparser.h.

Referenced by relPath().

QCString DocFormula::m_text
private

Definition at line 571 of file docparser.h.

Referenced by DocFormula(), isInline(), and text().


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