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

#include <docparser.h>

Inheritance diagram for DocXRefItem:
CompAccept< DocXRefItem > DocNode

Public Member Functions

 DocXRefItem (DocNode *parent, int id, const char *key)
 
Kind kind () const
 
QCString file () const
 
QCString anchor () const
 
QCString title () const
 
QCString relPath () const
 
QCString key () const
 
void accept (DocVisitor *v)
 
bool parse ()
 
- Public Member Functions inherited from CompAccept< DocXRefItem >
 CompAccept ()
 
virtual ~CompAccept ()
 
void accept (DocXRefItem *obj, DocVisitor *v)
 
const QList< DocNode > & children () const
 
QList< DocNode > & children ()
 
- Public Member Functions inherited from DocNode
 DocNode ()
 
virtual ~DocNode ()
 
DocNodeparent () const
 
void setParent (DocNode *parent)
 
bool isPreformatted () const
 

Private Attributes

int m_id
 
QCString m_key
 
QCString m_file
 
QCString m_anchor
 
QCString m_title
 
QCString m_relPath
 

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 CompAccept< DocXRefItem >
QList< DocNodem_children
 
- Protected Attributes inherited from DocNode
DocNodem_parent
 

Detailed Description

Node representing an item of a cross-referenced list

Definition at line 664 of file docparser.h.

Constructor & Destructor Documentation

DocXRefItem::DocXRefItem ( DocNode parent,
int  id,
const char *  key 
)

Definition at line 2153 of file docparser.cpp.

2153  :
2154  m_id(id), m_key(key), m_relPath(g_relPath)
2155 {
2156  m_parent = parent;
2157 }
DocNode * parent() const
Definition: docparser.h:147
static QCString g_relPath
Definition: docparser.cpp:96
DocNode * m_parent
Definition: docparser.h:163
QCString key() const
Definition: docparser.h:673
QCString m_relPath
Definition: docparser.h:683
QCString m_key
Definition: docparser.h:679

Member Function Documentation

void DocXRefItem::accept ( DocVisitor v)
inlinevirtual

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

Parameters
vAbstract visitor.

Implements DocNode.

Definition at line 674 of file docparser.h.

void accept(T *obj, DocVisitor *v)
Definition: docparser.h:177
QCString DocXRefItem::anchor ( ) const
inline

Definition at line 670 of file docparser.h.

670 { return m_anchor; }
QCString m_anchor
Definition: docparser.h:681
QCString DocXRefItem::file ( ) const
inline

Definition at line 669 of file docparser.h.

669 { return m_file; }
QCString m_file
Definition: docparser.h:680
QCString DocXRefItem::key ( ) const
inline

Definition at line 673 of file docparser.h.

673 { return m_key; }
QCString m_key
Definition: docparser.h:679
Kind DocXRefItem::kind ( ) const
inlinevirtual

Returns the kind of node. Provides runtime type information

Implements DocNode.

Definition at line 668 of file docparser.h.

bool DocXRefItem::parse ( )

Definition at line 2159 of file docparser.cpp.

2160 {
2161  RefList *refList = Doxygen::xrefLists->find(m_key);
2162  if (refList &&
2163  (
2164  // either not a built-in list or the list is enabled
2165  (m_key!="todo" || Config_getBool("GENERATE_TODOLIST")) &&
2166  (m_key!="test" || Config_getBool("GENERATE_TESTLIST")) &&
2167  (m_key!="bug" || Config_getBool("GENERATE_BUGLIST")) &&
2168  (m_key!="deprecated" || Config_getBool("GENERATE_DEPRECATEDLIST"))
2169  )
2170  )
2171  {
2172  RefItem *item = refList->getRefItem(m_id);
2173  ASSERT(item!=0);
2174  if (item)
2175  {
2176  if (g_memberDef && g_memberDef->name().at(0)=='@')
2177  {
2178  m_file = "@"; // can't cross reference anonymous enum
2179  m_anchor = "@";
2180  }
2181  else
2182  {
2183  m_file = refList->fileName();
2184  m_anchor = item->listAnchor;
2185  }
2186  m_title = refList->sectionTitle();
2187  //printf("DocXRefItem: file=%s anchor=%s title=%s\n",
2188  // m_file.data(),m_anchor.data(),m_title.data());
2189 
2190  if (!item->text.isEmpty())
2191  {
2195  }
2196  }
2197  return TRUE;
2198  }
2199  return FALSE;
2200 }
static QDict< RefList > * xrefLists
Definition: doxygen.h:129
QCString listAnchor
anchor in the list
Definition: reflist.h:33
QList< DocNode > m_children
Definition: docparser.h:189
bool isEmpty() const
Definition: qcstring.h:189
QCString text
text of the item.
Definition: reflist.h:32
QCString m_anchor
Definition: docparser.h:681
QCString sectionTitle() const
Definition: reflist.cpp:113
char & at(uint i) const
Definition: qcstring.h:326
const bool FALSE
Definition: qglobal.h:370
RefItem * getRefItem(int todoItemId)
Definition: reflist.cpp:74
QCString m_file
Definition: docparser.h:680
const QCString & name() const
Definition: definition.h:114
QCString fileName() const
Definition: reflist.cpp:103
static MemberDef * g_memberDef
Definition: docparser.cpp:101
#define Config_getBool(val)
Definition: config.cpp:664
static void docParserPopContext(bool keepParamInfo=FALSE)
Definition: docparser.cpp:191
static void docParserPushContext(bool saveParamInfo=TRUE)
Definition: docparser.cpp:148
QCString m_title
Definition: docparser.h:682
QCString m_key
Definition: docparser.h:679
static int internalValidatingParseDoc(DocNode *parent, QList< DocNode > &children, const QCString &doc)
Definition: docparser.cpp:1713
const bool TRUE
Definition: qglobal.h:371
#define ASSERT(x)
Definition: qglobal.h:590
QCString DocXRefItem::relPath ( ) const
inline

Definition at line 672 of file docparser.h.

672 { return m_relPath; }
QCString m_relPath
Definition: docparser.h:683
QCString DocXRefItem::title ( ) const
inline

Definition at line 671 of file docparser.h.

671 { return m_title; }
QCString m_title
Definition: docparser.h:682

Member Data Documentation

QCString DocXRefItem::m_anchor
private

Definition at line 681 of file docparser.h.

QCString DocXRefItem::m_file
private

Definition at line 680 of file docparser.h.

int DocXRefItem::m_id
private

Definition at line 678 of file docparser.h.

QCString DocXRefItem::m_key
private

Definition at line 679 of file docparser.h.

QCString DocXRefItem::m_relPath
private

Definition at line 683 of file docparser.h.

QCString DocXRefItem::m_title
private

Definition at line 682 of file docparser.h.


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