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

#include <docparser.h>

Inheritance diagram for DocIndexEntry:
DocNode

Public Member Functions

 DocIndexEntry (DocNode *parent, Definition *scope, MemberDef *md)
 
Kind kind () const
 
int parse ()
 
Definitionscope () const
 
MemberDefmember () const
 
QCString entry () 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_entry
 
Definitionm_scope
 
MemberDefm_member
 

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 entry in the index.

Definition at line 577 of file docparser.h.

Constructor & Destructor Documentation

DocIndexEntry::DocIndexEntry ( DocNode parent,
Definition scope,
MemberDef md 
)
inline

Definition at line 580 of file docparser.h.

References DocNode::m_parent, and DocNode::parent().

: m_scope(scope), m_member(md){ m_parent = parent; }

Member Function Documentation

void DocIndexEntry::accept ( DocVisitor v)
inlinevirtual

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

Parameters
vAbstract visitor.

Implements DocNode.

Definition at line 587 of file docparser.h.

References DocVisitor::visit().

{ v->visit(this); }
QCString DocIndexEntry::entry ( ) const
inline
Kind DocIndexEntry::kind ( ) const
inlinevirtual

Returns the kind of node. Provides runtime type information

Implements DocNode.

Definition at line 582 of file docparser.h.

References DocNode::Kind_IndexEntry.

{ return Kind_IndexEntry; }
MemberDef* DocIndexEntry::member ( ) const
inline

Definition at line 585 of file docparser.h.

References m_member.

Referenced by HtmlDocVisitor::visit().

{ return m_member; }
int DocIndexEntry::parse ( )

Definition at line 3190 of file docparser.cpp.

References CMD_AMP, CMD_AT, CMD_BSLASH, CMD_DCOLON, CMD_DOLLAR, CMD_GREATER, CMD_HASH, CMD_LESS, CMD_MDASH, CMD_MINUS, CMD_NDASH, CMD_PERCENT, CMD_PLUS, CMD_PUNT, CMD_QUOTE, Mappers::cmdMapper, DBG, DocSymbol::decodeSymbol(), doctokenizerYYlex(), doctokenizerYYlineno, doctokenizerYYsetStatePara(), doctokenizerYYsetStateTitle(), g_fileName, g_nodeStack, g_token, m_entry, TokenInfo::name, RetVal_OK, DocSymbol::Sym_Amp, DocSymbol::Sym_apos, DocSymbol::Sym_At, DocSymbol::Sym_BSlash, DocSymbol::Sym_Dollar, DocSymbol::Sym_Greater, DocSymbol::Sym_Hash, DocSymbol::Sym_ldquo, DocSymbol::Sym_Less, DocSymbol::Sym_lsquo, DocSymbol::Sym_mdash, DocSymbol::Sym_ndash, DocSymbol::Sym_Percent, DocSymbol::Sym_Quot, DocSymbol::Sym_rdquo, DocSymbol::Sym_rsquo, TK_COMMAND, TK_LNKWORD, TK_SYMBOL, TK_WHITESPACE, TK_WORD, tokToString(), and warn_doc_error().

Referenced by DocPara::handleCommand().

{
int retval=RetVal_OK;
g_nodeStack.push(this);
DBG(("DocIndexEntry::parse() start\n"));
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\addindex command");
goto endindexentry;
}
m_entry="";
while ((tok=doctokenizerYYlex()))
{
switch (tok)
{
m_entry+=" ";
break;
case TK_WORD:
case TK_LNKWORD:
break;
case TK_SYMBOL:
{
switch (s)
{
case DocSymbol::Sym_BSlash: m_entry+='\\'; break;
case DocSymbol::Sym_At: m_entry+='@'; break;
case DocSymbol::Sym_Less: m_entry+='<'; break;
case DocSymbol::Sym_Greater: m_entry+='>'; break;
case DocSymbol::Sym_Amp: m_entry+='&'; break;
case DocSymbol::Sym_Dollar: m_entry+='$'; break;
case DocSymbol::Sym_Hash: m_entry+='#'; break;
case DocSymbol::Sym_Percent: m_entry+='%'; break;
case DocSymbol::Sym_apos: m_entry+='\''; break;
case DocSymbol::Sym_Quot: m_entry+='"'; break;
case DocSymbol::Sym_lsquo: m_entry+='`'; break;
case DocSymbol::Sym_rsquo: m_entry+='\''; break;
case DocSymbol::Sym_ldquo: m_entry+="``"; break;
case DocSymbol::Sym_rdquo: m_entry+="''"; break;
case DocSymbol::Sym_ndash: m_entry+="--"; break;
case DocSymbol::Sym_mdash: m_entry+="---"; break;
default:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected symbol found as argument of \\addindex");
break;
}
}
break;
case TK_COMMAND:
{
case CMD_BSLASH: m_entry+='\\'; break;
case CMD_AT: m_entry+='@'; break;
case CMD_LESS: m_entry+='<'; break;
case CMD_GREATER: m_entry+='>'; break;
case CMD_AMP: m_entry+='&'; break;
case CMD_DOLLAR: m_entry+='$'; break;
case CMD_HASH: m_entry+='#'; break;
case CMD_DCOLON: m_entry+="::"; break;
case CMD_PERCENT: m_entry+='%'; break;
case CMD_NDASH: m_entry+="--"; break;
case CMD_MDASH: m_entry+="---"; break;
case CMD_QUOTE: m_entry+='"'; break;
case CMD_PUNT: m_entry+='.'; break;
case CMD_PLUS: m_entry+='+'; break;
case CMD_MINUS: m_entry+='-'; break;
default:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected command %s found as argument of \\addindex",
qPrint(g_token->name));
break;
}
break;
default:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s",
tokToString(tok));
break;
}
}
m_entry = m_entry.stripWhiteSpace();
endindexentry:
DBG(("DocIndexEntry::parse() end retval=%x\n",retval));
DocNode *n=g_nodeStack.pop();
ASSERT(n==this);
return retval;
}
Definition* DocIndexEntry::scope ( ) const
inline

Definition at line 584 of file docparser.h.

References m_scope.

Referenced by HtmlDocVisitor::visit().

{ return m_scope; }

Member Data Documentation

QCString DocIndexEntry::m_entry
private

Definition at line 590 of file docparser.h.

Referenced by entry(), and parse().

MemberDef* DocIndexEntry::m_member
private

Definition at line 592 of file docparser.h.

Referenced by member().

Definition* DocIndexEntry::m_scope
private

Definition at line 591 of file docparser.h.

Referenced by scope().


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