Public Member Functions | Private Attributes | List of all members
DocCite Class Reference

#include <docparser.h>

Inheritance diagram for DocCite:
DocNode

Public Member Functions

 DocCite (DocNode *parent, const QCString &target, const QCString &context)
 
Kind kind () const
 
QCString file () const
 
QCString relPath () const
 
QCString ref () const
 
QCString anchor () const
 
QCString text () const
 
void accept (DocVisitor *v)
 
- Public Member Functions inherited from DocNode
 DocNode ()
 
virtual ~DocNode ()
 
DocNodeparent () const
 
void setParent (DocNode *parent)
 
bool isPreformatted () const
 

Private Attributes

QCString m_file
 
QCString m_relPath
 
QCString m_ref
 
QCString m_anchor
 
QCString m_text
 

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 a citation of some bibliographic reference

Definition at line 287 of file docparser.h.

Constructor & Destructor Documentation

DocCite::DocCite ( DocNode parent,
const QCString target,
const QCString context 
)

Definition at line 2600 of file docparser.cpp.

2601 {
2602  static uint numBibFiles = Config_getList("CITE_BIB_FILES").count();
2603  m_parent = parent;
2604  //printf("DocCite::DocCite(target=%s)\n",target.data());
2605  ASSERT(!target.isEmpty());
2606  m_relPath = g_relPath;
2607  CiteInfo *cite = Doxygen::citeDict->find(target);
2608  //printf("cite=%p text='%s' numBibFiles=%d\n",cite,cite?cite->text.data():"<null>",numBibFiles);
2609  if (numBibFiles>0 && cite && !cite->text.isEmpty()) // ref to citation
2610  {
2611  m_text = cite->text;
2612  m_ref = cite->ref;
2615  //printf("CITE ==> m_text=%s,m_ref=%s,m_file=%s,m_anchor=%s\n",
2616  // m_text.data(),m_ref.data(),m_file.data(),m_anchor.data());
2617  return;
2618  }
2619  m_text = target;
2620  if (numBibFiles==0)
2621  {
2622  warn_doc_error(g_fileName,doctokenizerYYlineno,"\\cite command found but no bib files specified via CITE_BIB_FILES!");
2623  }
2624  else if (cite==0)
2625  {
2626  warn_doc_error(g_fileName,doctokenizerYYlineno,"unable to resolve reference to `%s' for \\cite command",
2627  qPrint(target));
2628  }
2629  else
2630  {
2631  warn_doc_error(g_fileName,doctokenizerYYlineno,"\\cite command to '%s' does not have an associated number",
2632  qPrint(target));
2633  }
2634 }
DocNode * parent() const
Definition: docparser.h:147
static QCString g_fileName
Definition: docparser.cpp:95
static CiteDict * citeDict
Definition: doxygen.h:146
bool isEmpty() const
Definition: qcstring.h:189
QCString m_relPath
Definition: docparser.h:301
QCString label
Definition: cite.h:44
int doctokenizerYYlineno
const bool FALSE
Definition: qglobal.h:370
static QCString g_relPath
Definition: docparser.cpp:96
void warn_doc_error(const char *file, int line, const char *fmt,...)
Definition: message.cpp:210
#define Config_getList(val)
Definition: config.cpp:662
QCString m_anchor
Definition: docparser.h:303
DocNode * m_parent
Definition: docparser.h:163
Citation-related data.
Definition: cite.h:34
QCString m_text
Definition: docparser.h:304
QCString ref
Definition: cite.h:47
static const QCString anchorPrefix
Definition: cite.h:30
CiteInfo * find(const char *label) const
Definition: cite.cpp:98
QCString m_ref
Definition: docparser.h:302
QCString convertNameToFile(const char *name, bool allowDots, bool allowUnderscore)
Definition: util.cpp:5354
QCString m_file
Definition: docparser.h:300
static const QCString fileName
Definition: cite.h:29
QCString text
Definition: cite.h:45
unsigned uint
Definition: qglobal.h:351
const char * qPrint(const char *s)
Definition: qcstring.h:797
const bool TRUE
Definition: qglobal.h:371
#define ASSERT(x)
Definition: qglobal.h:590

Member Function Documentation

void DocCite::accept ( DocVisitor v)
inlinevirtual

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

Parameters
vAbstract visitor.

Implements DocNode.

Definition at line 297 of file docparser.h.

297 { v->visit(this); }
virtual void visit(DocWord *)=0
QCString DocCite::anchor ( ) const
inline

Definition at line 295 of file docparser.h.

295 { return m_anchor; }
QCString m_anchor
Definition: docparser.h:303
QCString DocCite::file ( ) const
inline

Definition at line 292 of file docparser.h.

292 { return m_file; }
QCString m_file
Definition: docparser.h:300
Kind DocCite::kind ( ) const
inlinevirtual

Returns the kind of node. Provides runtime type information

Implements DocNode.

Definition at line 291 of file docparser.h.

291 { return Kind_Ref; }
QCString DocCite::ref ( ) const
inline

Definition at line 294 of file docparser.h.

294 { return m_ref; }
QCString m_ref
Definition: docparser.h:302
QCString DocCite::relPath ( ) const
inline

Definition at line 293 of file docparser.h.

293 { return m_relPath; }
QCString m_relPath
Definition: docparser.h:301
QCString DocCite::text ( ) const
inline

Definition at line 296 of file docparser.h.

296 { return m_text; }
QCString m_text
Definition: docparser.h:304

Member Data Documentation

QCString DocCite::m_anchor
private

Definition at line 303 of file docparser.h.

QCString DocCite::m_file
private

Definition at line 300 of file docparser.h.

QCString DocCite::m_ref
private

Definition at line 302 of file docparser.h.

QCString DocCite::m_relPath
private

Definition at line 301 of file docparser.h.

QCString DocCite::m_text
private

Definition at line 304 of file docparser.h.


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