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

#include <docparser.h>

Inheritance diagram for DocSecRefItem:
CompAccept< DocSecRefItem > DocNode

Public Member Functions

 DocSecRefItem (DocNode *parent, const QCString &target)
 
Kind kind () const
 
QCString target () const
 
QCString file () const
 
QCString anchor () const
 
void accept (DocVisitor *v)
 
void parse ()
 
- Public Member Functions inherited from CompAccept< DocSecRefItem >
 CompAccept ()
 
virtual ~CompAccept ()
 
void accept (DocSecRefItem *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

QCString m_target
 
QCString m_file
 
QCString m_anchor
 

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

Detailed Description

Node representing a reference to a section

Definition at line 959 of file docparser.h.

Constructor & Destructor Documentation

DocSecRefItem::DocSecRefItem ( DocNode parent,
const QCString target 
)
inline

Definition at line 962 of file docparser.h.

962  :
963  m_target(target) { m_parent = parent; }
DocNode * parent() const
Definition: docparser.h:147
DocNode * m_parent
Definition: docparser.h:163
QCString m_target
Definition: docparser.h:972

Member Function Documentation

void DocSecRefItem::accept ( DocVisitor v)
inlinevirtual

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

Parameters
vAbstract visitor.

Implements DocNode.

Definition at line 968 of file docparser.h.

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

Definition at line 967 of file docparser.h.

967 { return m_anchor; }
QCString m_anchor
Definition: docparser.h:974
QCString DocSecRefItem::file ( ) const
inline

Definition at line 966 of file docparser.h.

966 { return m_file; }
QCString m_file
Definition: docparser.h:973
Kind DocSecRefItem::kind ( ) const
inlinevirtual

Returns the kind of node. Provides runtime type information

Implements DocNode.

Definition at line 964 of file docparser.h.

void DocSecRefItem::parse ( )

Definition at line 2253 of file docparser.cpp.

2254 {
2255  DBG(("DocSecRefItem::parse() start\n"));
2256  g_nodeStack.push(this);
2257 
2259  int tok;
2260  while ((tok=doctokenizerYYlex()))
2261  {
2262  if (!defaultHandleToken(this,tok,m_children))
2263  {
2264  switch (tok)
2265  {
2266  case TK_COMMAND:
2267  warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a \\refitem",
2268  qPrint(g_token->name));
2269  break;
2270  case TK_SYMBOL:
2271  warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found",
2272  qPrint(g_token->name));
2273  break;
2274  default:
2275  warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s",
2276  tokToString(tok));
2277  break;
2278  }
2279  }
2280  }
2283 
2284  SectionInfo *sec=0;
2285  if (!m_target.isEmpty())
2286  {
2288  if (sec)
2289  {
2290  m_file = sec->fileName;
2291  m_anchor = sec->label;
2293  {
2295  }
2296  }
2297  else
2298  {
2299  warn_doc_error(g_fileName,doctokenizerYYlineno,"reference to unknown section %s",
2300  qPrint(m_target));
2301  }
2302  }
2303  else
2304  {
2305  warn_doc_error(g_fileName,doctokenizerYYlineno,"reference to empty target");
2306  }
2307 
2308  DBG(("DocSecRefItem::parse() end\n"));
2309  DocNode *n = g_nodeStack.pop();
2310  ASSERT(n==this);
2311 }
static QCString g_fileName
Definition: docparser.cpp:95
QList< DocNode > m_children
Definition: docparser.h:189
static SectionDict * g_sectionDict
Definition: docparser.cpp:104
void doctokenizerYYsetStatePara()
bool isEmpty() const
Definition: qcstring.h:189
#define DBG(x)
Definition: docparser.cpp:59
int doctokenizerYYlineno
QCString label
Definition: section.h:56
void warn_doc_error(const char *file, int line, const char *fmt,...)
Definition: message.cpp:210
static QStack< DocNode > g_nodeStack
Definition: docparser.cpp:91
void append(const char *key, const T *d)
Definition: sortdict.h:135
TokenInfo * g_token
int doctokenizerYYlex(void)
void push(const type *d)
Definition: qstack.h:58
void doctokenizerYYsetStateTitle()
static void handlePendingStyleCommands(DocNode *parent, QList< DocNode > &children)
Definition: docparser.cpp:957
std::void_t< T > n
QCString fileName
Definition: section.h:61
static SectionDict * sectionDict
Definition: doxygen.h:117
QCString m_target
Definition: docparser.h:972
type * pop()
Definition: qstack.h:59
QCString m_file
Definition: docparser.h:973
static bool defaultHandleToken(DocNode *parent, int tok, QList< DocNode > &children, bool handleWord=TRUE)
Definition: docparser.cpp:1331
QCString name
Definition: doctokenizer.h:77
const char * tokToString(int token)
QCString m_anchor
Definition: docparser.h:974
T * find(const char *key)
Definition: sortdict.h:232
const char * qPrint(const char *s)
Definition: qcstring.h:797
#define ASSERT(x)
Definition: qglobal.h:590
QCString DocSecRefItem::target ( ) const
inline

Definition at line 965 of file docparser.h.

965 { return m_target; }
QCString m_target
Definition: docparser.h:972

Member Data Documentation

QCString DocSecRefItem::m_anchor
private

Definition at line 974 of file docparser.h.

QCString DocSecRefItem::m_file
private

Definition at line 973 of file docparser.h.

QCString DocSecRefItem::m_target
private

Definition at line 972 of file docparser.h.


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