Commit 5ed55684 authored by dimitri's avatar dimitri

Release-1.2.18-20020927

parent 482b6bd4
DOXYGEN Version 1.2.18 DOXYGEN Version 1.2.18-20020927
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (18 September 2002) Dimitri van Heesch (27 September 2002)
DOXYGEN Version 1.2.18 DOXYGEN Version 1.2.18_20020927
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (18 September 2002) Dimitri van Heesch (dimitri@stack.nl) (27 September 2002)
1.2.18 1.2.18-20020927
...@@ -266,11 +266,18 @@ void Wizard::saveAsFile() ...@@ -266,11 +266,18 @@ void Wizard::saveAsFile()
void Wizard::runDoxygen() void Wizard::runDoxygen()
{ {
saveFile(); saveFile();
QString s = "doxygen " + configFileName; QString orgDir = QDir::currentDirPath();
QFileInfo fi(configFileName);
// cd to the config dir
QDir::setCurrent(fi.dirPath());
// run doxygen on the config file
QString s = "doxygen \"" + fi.fileName() + "\"";
// actually run the exe
system((const char*)s); system((const char*)s);
statusBar()->message("doxygen completed: "+ configFileName, messageTimeout ); statusBar()->message("doxygen completed: "+ configFileName, messageTimeout );
hasChanged = FALSE; hasChanged = FALSE;
refreshCaption(); refreshCaption();
QDir::setCurrent(orgDir);
} }
......
...@@ -103,6 +103,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -103,6 +103,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_full_path_names FULL_PATH_NAMES \refitem cfg_full_path_names FULL_PATH_NAMES
\refitem cfg_generate_buglist GENERATE_BUGLIST \refitem cfg_generate_buglist GENERATE_BUGLIST
\refitem cfg_generate_chi GENERATE_CHI \refitem cfg_generate_chi GENERATE_CHI
\refitem cfg_generate_todolist GENERATE_DEPRECIATELIST
\refitem cfg_generate_html GENERATE_HTML \refitem cfg_generate_html GENERATE_HTML
\refitem cfg_generate_htmlhelp GENERATE_HTMLHELP \refitem cfg_generate_htmlhelp GENERATE_HTMLHELP
\refitem cfg_generate_latex GENERATE_LATEX \refitem cfg_generate_latex GENERATE_LATEX
...@@ -459,6 +460,14 @@ followed by the descriptions of the tags grouped by category. ...@@ -459,6 +460,14 @@ followed by the descriptions of the tags grouped by category.
documentation sections, marked by \ref cmdif "\\if" \<section-label\> ... documentation sections, marked by \ref cmdif "\\if" \<section-label\> ...
\ref cmdendif "\\endif" blocks. \ref cmdendif "\\endif" blocks.
\anchor cfg_generate_deprecatedlist
<dt>\c GENERATE_DEPRECATEDLIST <dd>
\addindex GENERATE_DEPRECATEDLIST
The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
disable (NO) the deprecated list. This list is created by
putting \ref cmddeprecated "\\deprecated"
commands in the documentation.
\anchor cfg_generate_todolist \anchor cfg_generate_todolist
<dt>\c GENERATE_TODOLIST <dd> <dt>\c GENERATE_TODOLIST <dd>
\addindex GENERATE_TODOLIST \addindex GENERATE_TODOLIST
......
...@@ -180,7 +180,8 @@ Thanks go to: ...@@ -180,7 +180,8 @@ Thanks go to:
All language maintainers for providing translations into many languages. All language maintainers for providing translations into many languages.
<li>Erik Jan Lingen of <a href="http://www.habanera.nl/">Habanera</a>, Mark <li>Erik Jan Lingen of <a href="http://www.habanera.nl/">Habanera</a>, Mark
Roddy, Paul Schwartz, Charles Duffy, Vadym Voznyuk, Philip Walton, Roddy, Paul Schwartz, Charles Duffy, Vadym Voznyuk, Philip Walton,
Dwight Browne, Andreas Fredriksson, and Karel Lindveld for donating money. Dwight Browne, Andreas Fredriksson, Karel Lindveld, and Ivan Lee
for donating money.
<li>The Comms group of <a href="http://www.symbian.com">Symbian</a> for donating <li>The Comms group of <a href="http://www.symbian.com">Symbian</a> for donating
an ultra cool <a href="http://www.psion.com/revoplus">Revo plus</a> an ultra cool <a href="http://www.psion.com/revoplus">Revo plus</a>
organizer! organizer!
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.2.18 Version: 1.2.18_20020927
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
# Doxyfile 1.2.5-20010304 # Doxyfile 1.2.18
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# General configuration options # General configuration options
...@@ -10,35 +10,40 @@ OUTPUT_LANGUAGE = English ...@@ -10,35 +10,40 @@ OUTPUT_LANGUAGE = English
EXTRACT_ALL = YES EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = NO
BRIEF_MEMBER_DESC = YES BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES FULL_PATH_NAMES = YES
STRIP_FROM_PATH = $(PWD)/ STRIP_FROM_PATH = $(PWD)/
INTERNAL_DOCS = NO INTERNAL_DOCS = NO
CLASS_DIAGRAMS = YES
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = NO CASE_SENSE_NAMES = NO
SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = YES JAVADOC_AUTOBRIEF = YES
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES INHERIT_DOCS = YES
INLINE_INFO = YES INLINE_INFO = YES
SORT_MEMBER_DOCS = YES SORT_MEMBER_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8 TAB_SIZE = 8
ENABLED_SECTIONS =
GENERATE_TODOLIST = YES GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ALIASES = ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30 MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
SHOW_USED_FILES = YES SHOW_USED_FILES = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to warning and progress messages # configuration options related to warning and progress messages
...@@ -56,13 +61,23 @@ FILE_PATTERNS = *.h \ ...@@ -56,13 +61,23 @@ FILE_PATTERNS = *.h \
*.cpp \ *.cpp \
*.doc *.doc
RECURSIVE = NO RECURSIVE = NO
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = EXCLUDE_PATTERNS =
EXAMPLE_PATH = EXAMPLE_PATH =
EXAMPLE_PATTERNS = EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH = IMAGE_PATH =
INPUT_FILTER = INPUT_FILTER =
FILTER_SOURCE_FILES = NO FILTER_SOURCE_FILES = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index # configuration options related to the alphabetical class index
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES ALPHABETICAL_INDEX = YES
...@@ -73,11 +88,14 @@ IGNORE_PREFIX = Q ...@@ -73,11 +88,14 @@ IGNORE_PREFIX = Q
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_HTML = YES GENERATE_HTML = YES
HTML_OUTPUT = HTML_OUTPUT =
HTML_FILE_EXTENSION = .html
HTML_HEADER = HTML_HEADER =
HTML_FOOTER = HTML_FOOTER =
HTML_STYLESHEET = HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO GENERATE_CHI = NO
BINARY_TOC = NO BINARY_TOC = NO
TOC_EXPAND = NO TOC_EXPAND = NO
...@@ -90,6 +108,8 @@ TREEVIEW_WIDTH = 250 ...@@ -90,6 +108,8 @@ TREEVIEW_WIDTH = 250
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_LATEX = NO GENERATE_LATEX = NO
LATEX_OUTPUT = LATEX_OUTPUT =
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO COMPACT_LATEX = NO
PAPER_TYPE = a4wide PAPER_TYPE = a4wide
EXTRA_PACKAGES = EXTRA_PACKAGES =
...@@ -105,12 +125,24 @@ RTF_OUTPUT = ...@@ -105,12 +125,24 @@ RTF_OUTPUT =
COMPACT_RTF = NO COMPACT_RTF = NO
RTF_HYPERLINKS = NO RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE = RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the man page output # configuration options related to the man page output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_MAN = NO GENERATE_MAN = NO
MAN_OUTPUT = MAN_OUTPUT =
MAN_EXTENSION = .3 MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = YES
XML_SCHEMA =
XML_DTD =
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the preprocessor # Configuration options related to the preprocessor
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
...@@ -122,23 +154,30 @@ INCLUDE_PATH = ...@@ -122,23 +154,30 @@ INCLUDE_PATH =
INCLUDE_FILE_PATTERNS = INCLUDE_FILE_PATTERNS =
PREDEFINED = PREDEFINED =
EXPAND_AS_DEFINED = EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration::addtions related to external references # Configuration::addtions related to external references
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
TAGFILES = TAGFILES =
GENERATE_TAGFILE = ../qtools_docs/qtools.tag GENERATE_TAGFILE = ../qtools_docs/qtools.tag
ALLEXTERNALS = NO ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl PERL_PATH = /usr/bin/perl
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Configuration options related to the dot tool # Configuration options related to the dot tool
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES HAVE_DOT = YES
CLASS_GRAPH = YES CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES
INCLUDE_GRAPH = YES INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = NO INCLUDED_BY_GRAPH = NO
GRAPHICAL_HIERARCHY = YES GRAPHICAL_HIERARCHY = YES
DOT_IMAGE_FORMAT = png
DOT_PATH = DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 2048 MAX_DOT_GRAPH_WIDTH = 2048
MAX_DOT_GRAPH_HEIGHT = 2048 MAX_DOT_GRAPH_HEIGHT = 2048
GENERATE_LEGEND = YES GENERATE_LEGEND = YES
......
...@@ -790,9 +790,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -790,9 +790,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
} }
ol.endTextLink(); ol.endTextLink();
ol.popGeneratorState(); ol.popGeneratorState();
ol.disable(OutputGenerator::Man);
ol.newParagraph(); ol.newParagraph();
ol.enable(OutputGenerator::Man);
} }
} }
ol.writeSynopsis(); ol.writeSynopsis();
......
...@@ -175,6 +175,7 @@ CommandMap htmlTagMap[] = ...@@ -175,6 +175,7 @@ CommandMap htmlTagMap[] =
{ "h1", HTML_H1 }, { "h1", HTML_H1 },
{ "h2", HTML_H2 }, { "h2", HTML_H2 },
{ "h3", HTML_H3 }, { "h3", HTML_H3 },
{ 0, 0 }
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
...@@ -1458,13 +1458,6 @@ void Config::create() ...@@ -1458,13 +1458,6 @@ void Config::create()
"Set it to YES to include the internal documentation. \n", "Set it to YES to include the internal documentation. \n",
FALSE FALSE
); );
cb = addBool(
"STRIP_CODE_COMMENTS",
"Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct \n"
"doxygen to hide any special comment blocks from generated source code \n"
"fragments. Normal C and C++ comments will always remain visible. \n",
TRUE
);
cb = addBool( cb = addBool(
"CASE_SENSE_NAMES", "CASE_SENSE_NAMES",
"If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate \n" "If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate \n"
...@@ -1784,6 +1777,13 @@ void Config::create() ...@@ -1784,6 +1777,13 @@ void Config::create()
"of functions and classes directly in the documentation. \n", "of functions and classes directly in the documentation. \n",
FALSE FALSE
); );
cb = addBool(
"STRIP_CODE_COMMENTS",
"Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct \n"
"doxygen to hide any special comment blocks from generated source code \n"
"fragments. Normal C and C++ comments will always remain visible. \n",
TRUE
);
cb = addBool( "REFERENCED_BY_RELATION", cb = addBool( "REFERENCED_BY_RELATION",
"If the REFERENCED_BY_RELATION tag is set to YES (the default) \n" "If the REFERENCED_BY_RELATION tag is set to YES (the default) \n"
"then for each documented function all documented \n" "then for each documented function all documented \n"
......
...@@ -48,29 +48,29 @@ static MemberDef * g_memberDef; ...@@ -48,29 +48,29 @@ static MemberDef * g_memberDef;
static QDict<void> g_paramsFound; static QDict<void> g_paramsFound;
// include file state // include file state
static QCString g_includeFileText; static QString g_includeFileText;
static uint g_includeFileOffset; static uint g_includeFileOffset;
static uint g_includeFileLength; static uint g_includeFileLength;
// parser state // parser state
static QCString g_context; static QString g_context;
static bool g_inSeeBlock; static bool g_inSeeBlock;
static bool g_insideHtmlLink; static bool g_insideHtmlLink;
static QStack<DocNode> g_nodeStack; static QStack<DocNode> g_nodeStack;
static QStack<DocStyleChange> g_styleStack; static QStack<DocStyleChange> g_styleStack;
static QList<Definition> g_copyStack; static QList<Definition> g_copyStack;
static QCString g_fileName; static QString g_fileName;
struct DocParserContext struct DocParserContext
{ {
QCString context; QString context;
bool inSeeBlock; bool inSeeBlock;
bool insideHtmlLink; bool insideHtmlLink;
QStack<DocNode> nodeStack; QStack<DocNode> nodeStack;
QStack<DocStyleChange> styleStack; QStack<DocStyleChange> styleStack;
QList<Definition> copyStack; QList<Definition> copyStack;
MemberDef *memberDef; MemberDef *memberDef;
QCString fileName; QString fileName;
}; };
static QStack<DocParserContext> g_parserStack; static QStack<DocParserContext> g_parserStack;
...@@ -107,7 +107,7 @@ static void docParserPopContext() ...@@ -107,7 +107,7 @@ static void docParserPopContext()
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static void checkArgumentName(const QCString &name,bool isParam) static void checkArgumentName(const QString &name,bool isParam)
{ {
if (g_memberDef==0) return; // not a member if (g_memberDef==0) return; // not a member
ArgumentList *al=g_memberDef->isDocsForDefinition() ? ArgumentList *al=g_memberDef->isDocsForDefinition() ?
...@@ -120,14 +120,14 @@ static void checkArgumentName(const QCString &name,bool isParam) ...@@ -120,14 +120,14 @@ static void checkArgumentName(const QCString &name,bool isParam)
int p=0,i=0,l; int p=0,i=0,l;
while ((i=re.match(name,p,&l))!=-1) while ((i=re.match(name,p,&l))!=-1)
{ {
QCString aName=name.mid(i,l); QString aName=name.mid(i,l);
//printf("aName=%s\n",aName.data()); //printf("aName=%s\n",aName.data());
ArgumentListIterator ali(*al); ArgumentListIterator ali(*al);
Argument *a; Argument *a;
bool found=FALSE; bool found=FALSE;
for (ali.toFirst();(a=ali.current());++ali) for (ali.toFirst();(a=ali.current());++ali)
{ {
QCString argName = g_memberDef->isDefine() ? a->type : a->name; QString argName = g_memberDef->isDefine() ? a->type : a->name;
if (argName.right(3)=="...") argName=argName.left(argName.length()-3); if (argName.right(3)=="...") argName=argName.left(argName.length()-3);
if (aName==argName) if (aName==argName)
{ {
...@@ -140,7 +140,7 @@ static void checkArgumentName(const QCString &name,bool isParam) ...@@ -140,7 +140,7 @@ static void checkArgumentName(const QCString &name,bool isParam)
if (!found && isParam) if (!found && isParam)
{ {
//printf("member type=%d\n",memberDef->memberType()); //printf("member type=%d\n",memberDef->memberType());
QCString scope=g_memberDef->getScopeString(); QString scope=g_memberDef->getScopeString();
if (!scope.isEmpty()) scope+="::"; else scope=""; if (!scope.isEmpty()) scope+="::"; else scope="";
warn(g_memberDef->docFile(),g_memberDef->docLine(), warn(g_memberDef->docFile(),g_memberDef->docLine(),
"Warning: argument `%s' of command @param " "Warning: argument `%s' of command @param "
...@@ -167,7 +167,7 @@ static void checkUndocumentedParams() ...@@ -167,7 +167,7 @@ static void checkUndocumentedParams()
bool found=FALSE; bool found=FALSE;
for (ali.toFirst();(a=ali.current());++ali) for (ali.toFirst();(a=ali.current());++ali)
{ {
QCString argName = g_memberDef->isDefine() ? a->type : a->name; QString argName = g_memberDef->isDefine() ? a->type : a->name;
if (argName.right(3)=="...") argName=argName.left(argName.length()-3); if (argName.right(3)=="...") argName=argName.left(argName.length()-3);
if (!argName.isEmpty() && g_paramsFound.find(argName)==0) if (!argName.isEmpty() && g_paramsFound.find(argName)==0)
{ {
...@@ -177,7 +177,7 @@ static void checkUndocumentedParams() ...@@ -177,7 +177,7 @@ static void checkUndocumentedParams()
} }
if (found) if (found)
{ {
QCString scope=g_memberDef->getScopeString(); QString scope=g_memberDef->getScopeString();
if (!scope.isEmpty()) scope+="::"; else scope=""; if (!scope.isEmpty()) scope+="::"; else scope="";
warn(g_memberDef->docFile(),g_memberDef->docLine(), warn(g_memberDef->docFile(),g_memberDef->docLine(),
"Warning: The following parameters of " "Warning: The following parameters of "
...@@ -186,7 +186,7 @@ static void checkUndocumentedParams() ...@@ -186,7 +186,7 @@ static void checkUndocumentedParams()
argListToString(al).data()); argListToString(al).data());
for (ali.toFirst();(a=ali.current());++ali) for (ali.toFirst();(a=ali.current());++ali)
{ {
QCString argName = g_memberDef->isDefine() ? a->type : a->name; QString argName = g_memberDef->isDefine() ? a->type : a->name;
if (!argName.isEmpty() && g_paramsFound.find(argName)==0) if (!argName.isEmpty() && g_paramsFound.find(argName)==0)
{ {
warn_cont( " parameter %s\n",argName.data()); warn_cont( " parameter %s\n",argName.data());
...@@ -199,15 +199,15 @@ static void checkUndocumentedParams() ...@@ -199,15 +199,15 @@ static void checkUndocumentedParams()
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static QCString stripKnownExtensions(const char *text) static QString stripKnownExtensions(const char *text)
{ {
QCString result=text; QString result=text;
if (result.right(4)==".tex") if (result.right(4)==".tex")
{ {
result=result.left(result.length()-4); result=result.left(result.length()-4);
} }
else if (result.right(Doxygen::htmlFileExtension.length())== else if (result.right(Doxygen::htmlFileExtension.length())==
Doxygen::htmlFileExtension) QString(Doxygen::htmlFileExtension))
{ {
result=result.left(result.length()-Doxygen::htmlFileExtension.length()); result=result.left(result.length()-Doxygen::htmlFileExtension.length());
} }
...@@ -293,12 +293,12 @@ static bool insideLang(DocNode *n) ...@@ -293,12 +293,12 @@ static bool insideLang(DocNode *n)
* @retval FALSE if name was not found. * @retval FALSE if name was not found.
*/ */
static bool findDocsForMemberOrCompound(const char *commandName, static bool findDocsForMemberOrCompound(const char *commandName,
QCString *pDoc, QString *pDoc,
Definition **pDef) Definition **pDef)
{ {
pDoc->resize(0); *pDoc="";
*pDef=0; *pDef=0;
QCString cmdArg=commandName; QString cmdArg=commandName;
int l=cmdArg.length(); int l=cmdArg.length();
if (l==0) return FALSE; if (l==0) return FALSE;
...@@ -306,10 +306,10 @@ static bool findDocsForMemberOrCompound(const char *commandName, ...@@ -306,10 +306,10 @@ static bool findDocsForMemberOrCompound(const char *commandName,
if (funcStart==-1) funcStart=l; if (funcStart==-1) funcStart=l;
//int lastScopeStart=cmdArg.findRev("::",funcStart); //int lastScopeStart=cmdArg.findRev("::",funcStart);
//int lastScopeEnd = lastScopeStart==-1 ? 0 : lastScopeStart+2; //int lastScopeEnd = lastScopeStart==-1 ? 0 : lastScopeStart+2;
//QCString scope=cmdArg.left(QMAX(lastScopeStart,0)); //QString scope=cmdArg.left(QMAX(lastScopeStart,0));
//QCString name=cmdArg.mid(lastScopeEnd,funcStart-lastScopeEnd); //QString name=cmdArg.mid(lastScopeEnd,funcStart-lastScopeEnd);
QCString name=cmdArg.left(funcStart); QString name=cmdArg.left(funcStart);
QCString args=cmdArg.right(l-funcStart); QString args=cmdArg.right(l-funcStart);
// try if the link is to a member // try if the link is to a member
MemberDef *md=0; MemberDef *md=0;
...@@ -318,7 +318,7 @@ static bool findDocsForMemberOrCompound(const char *commandName, ...@@ -318,7 +318,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
NamespaceDef *nd=0; NamespaceDef *nd=0;
GroupDef *gd=0; GroupDef *gd=0;
PageInfo *pi=0; PageInfo *pi=0;
bool found = getDefs(g_context,name,args,md,cd,fd,nd,gd,FALSE,0,TRUE); bool found = getDefs(g_context.latin1(),name.latin1(),args,md,cd,fd,nd,gd,FALSE,0,TRUE);
if (found && md) if (found && md)
{ {
*pDoc=md->documentation(); *pDoc=md->documentation();
...@@ -330,7 +330,7 @@ static bool findDocsForMemberOrCompound(const char *commandName, ...@@ -330,7 +330,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
int scopeOffset=g_context.length(); int scopeOffset=g_context.length();
do // for each scope do // for each scope
{ {
QCString fullName=cmdArg; QString fullName=cmdArg;
if (scopeOffset>0) if (scopeOffset>0)
{ {
fullName.prepend(g_context.left(scopeOffset)+"::"); fullName.prepend(g_context.left(scopeOffset)+"::");
...@@ -398,8 +398,9 @@ static bool defaultHandleToken(DocNode *parent,int tok, ...@@ -398,8 +398,9 @@ static bool defaultHandleToken(DocNode *parent,int tok,
static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
const QCString &cmdName) const QString &cmdName)
{ {
QString tokenName = g_token->name;
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) if (tok!=TK_WHITESPACE)
{ {
...@@ -407,7 +408,9 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, ...@@ -407,7 +408,9 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
cmdName.data()); cmdName.data());
return tok; return tok;
} }
while ((tok=doctokenizerYYlex()) && tok!=TK_WHITESPACE && tok!=TK_NEWPARA) while ((tok=doctokenizerYYlex()) &&
tok!=TK_WHITESPACE && tok!=TK_NEWPARA && tok!=TK_LISTITEM && tok!=TK_ENDLIST
)
{ {
if (!defaultHandleToken(parent,tok,children)) if (!defaultHandleToken(parent,tok,children))
{ {
...@@ -415,15 +418,15 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, ...@@ -415,15 +418,15 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
{ {
case TK_COMMAND: case TK_COMMAND:
warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command \\%s as the argument of a \\%s command", warn(g_fileName,doctokenizerYYlineno,"Error: Illegal command \\%s as the argument of a \\%s command",
g_token->name.data(),cmdName.data()); tokenName.data(),cmdName.data());
break; break;
case TK_SYMBOL: case TK_SYMBOL:
warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found", warn(g_fileName,doctokenizerYYlineno,"Error: Unsupported symbol %s found",
g_token->name.data()); tokenName.data());
break; break;
default: default:
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected token %s",
g_token->name.data()); tokenName.data());
break; break;
} }
} }
...@@ -540,7 +543,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children ...@@ -540,7 +543,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
DBG((" name=%s",g_token->name.data())); DBG((" name=%s",g_token->name.data()));
} }
DBG(("\n")); DBG(("\n"));
QCString tokenName = g_token->name; QString tokenName = g_token->name;
switch (tok) switch (tok)
{ {
case TK_COMMAND: case TK_COMMAND:
...@@ -803,7 +806,7 @@ handlepara: ...@@ -803,7 +806,7 @@ handlepara:
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DocSymbol::SymType DocSymbol::decodeSymbol(const QCString &symName,char *letter) DocSymbol::SymType DocSymbol::decodeSymbol(const QString &symName,char *letter)
{ {
int l=symName.length(); int l=symName.length();
DBG(("decodeSymbol(%s) l=%d\n",symName.data(),l)); DBG(("decodeSymbol(%s) l=%d\n",symName.data(),l));
...@@ -856,7 +859,7 @@ DocSymbol::SymType DocSymbol::decodeSymbol(const QCString &symName,char *letter) ...@@ -856,7 +859,7 @@ DocSymbol::SymType DocSymbol::decodeSymbol(const QCString &symName,char *letter)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children, static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children,
const QCString &doc) const QString &doc)
{ {
int retval = RetVal_OK; int retval = RetVal_OK;
...@@ -887,7 +890,7 @@ static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children, ...@@ -887,7 +890,7 @@ static int internalValidatingParseDoc(DocNode *parent,QList<DocNode> &children,
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
static void readTextFileByName(const QCString &file,QCString &text) static void readTextFileByName(const QString &file,QString &text)
{ {
bool ambig; bool ambig;
FileDef *fd; FileDef *fd;
...@@ -911,7 +914,7 @@ static void readTextFileByName(const QCString &file,QCString &text) ...@@ -911,7 +914,7 @@ static void readTextFileByName(const QCString &file,QCString &text)
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor) DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
: m_parent(parent) : m_parent(parent)
{ {
if (id.isEmpty()) if (id.isEmpty())
...@@ -1080,7 +1083,7 @@ void DocIncOperator::parse() ...@@ -1080,7 +1083,7 @@ void DocIncOperator::parse()
void DocCopy::parse() void DocCopy::parse()
{ {
QCString doc; QString doc;
Definition *def; Definition *def;
if (findDocsForMemberOrCompound(m_link,&doc,&def)) if (findDocsForMemberOrCompound(m_link,&doc,&def))
{ {
...@@ -1114,7 +1117,7 @@ void DocCopy::parse() ...@@ -1114,7 +1117,7 @@ void DocCopy::parse()
void DocXRefItem::parse() void DocXRefItem::parse()
{ {
QCString listName; QString listName;
switch(m_type) switch(m_type)
{ {
case Bug: listName="bug"; break; case Bug: listName="bug"; break;
...@@ -1143,7 +1146,7 @@ void DocXRefItem::parse() ...@@ -1143,7 +1146,7 @@ void DocXRefItem::parse()
DocFormula::DocFormula(DocNode *parent,int id) : DocFormula::DocFormula(DocNode *parent,int id) :
m_parent(parent) m_parent(parent)
{ {
QCString formCmd; QString formCmd;
formCmd.sprintf("\\form#%d",id); formCmd.sprintf("\\form#%d",id);
Formula *formula=Doxygen::formulaNameDict[formCmd]; Formula *formula=Doxygen::formulaNameDict[formCmd];
if (formula) if (formula)
...@@ -1306,7 +1309,7 @@ endsecreflist: ...@@ -1306,7 +1309,7 @@ endsecreflist:
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DocInternalRef::DocInternalRef(DocNode *parent,const QCString &ref) DocInternalRef::DocInternalRef(DocNode *parent,const QString &ref)
: m_parent(parent) : m_parent(parent)
{ {
int i=ref.find('#'); int i=ref.find('#');
...@@ -1357,11 +1360,12 @@ void DocInternalRef::parse() ...@@ -1357,11 +1360,12 @@ void DocInternalRef::parse()
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DocRef::DocRef(DocNode *parent,const QCString &target) : DocRef::DocRef(DocNode *parent,const QString &target) :
m_parent(parent), m_refToSection(FALSE), m_refToAnchor(FALSE) m_parent(parent), m_refToSection(FALSE), m_refToAnchor(FALSE)
{ {
Definition *compound = 0; Definition *compound = 0;
MemberDef *member = 0; PageInfo *pageInfo = 0;
QCString anchor;
ASSERT(!target.isEmpty()); ASSERT(!target.isEmpty());
SectionInfo *sec = Doxygen::sectionDict[target]; SectionInfo *sec = Doxygen::sectionDict[target];
if (sec) // ref to section or anchor if (sec) // ref to section or anchor
...@@ -1375,16 +1379,25 @@ DocRef::DocRef(DocNode *parent,const QCString &target) : ...@@ -1375,16 +1379,25 @@ DocRef::DocRef(DocNode *parent,const QCString &target) :
m_refToAnchor = sec->type==SectionInfo::Anchor; m_refToAnchor = sec->type==SectionInfo::Anchor;
m_refToSection = sec->type!=SectionInfo::Anchor; m_refToSection = sec->type!=SectionInfo::Anchor;
} }
else if (resolveRef(g_context,target,TRUE,&compound,&member)) else if (resolveLink(g_context,target,TRUE,&compound,&pageInfo,anchor))
{ {
if (member) // ref to member m_text = target;
m_anchor = anchor;
if (pageInfo) // ref to page
{ {
m_file = compound->getOutputFileBase(); m_file = pageInfo->getOutputFileBase();
m_ref = compound->getReference(); m_ref = pageInfo->getReference();
m_anchor = member->anchor();
} }
else // ref to compound else if (compound) // ref to compound
{
if (anchor.isEmpty() && /* compound link */
compound->definitionType()==Definition::TypeGroup && /* is group */
((GroupDef *)compound)->groupTitle() /* with title */
)
{ {
m_text=((GroupDef *)compound)->groupTitle(); // use group's title as l
}
m_file = compound->getOutputFileBase(); m_file = compound->getOutputFileBase();
m_ref = compound->getReference(); m_ref = compound->getReference();
} }
...@@ -1432,14 +1445,16 @@ void DocRef::parse() ...@@ -1432,14 +1445,16 @@ void DocRef::parse()
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
DocLink::DocLink(DocNode *parent,const QCString &target) : DocLink::DocLink(DocNode *parent,const QString &target) :
m_parent(parent) m_parent(parent)
{ {
Definition *compound; Definition *compound;
PageInfo *page; PageInfo *page;
QCString anchor;
if (resolveLink(g_context,stripKnownExtensions(target),g_inSeeBlock, if (resolveLink(g_context,stripKnownExtensions(target),g_inSeeBlock,
&compound,&page,m_anchor)) &compound,&page,anchor))
{ {
m_anchor = anchor;
if (compound) if (compound)
{ {
m_file = compound->getOutputFileBase(); m_file = compound->getOutputFileBase();
...@@ -1459,9 +1474,9 @@ DocLink::DocLink(DocNode *parent,const QCString &target) : ...@@ -1459,9 +1474,9 @@ DocLink::DocLink(DocNode *parent,const QCString &target) :
} }
QCString DocLink::parse(bool isJavaLink) QString DocLink::parse(bool isJavaLink)
{ {
QCString result; QString result;
g_nodeStack.push(this); g_nodeStack.push(this);
DBG(("DocLink::parse() start\n")); DBG(("DocLink::parse() start\n"));
...@@ -1495,7 +1510,7 @@ QCString DocLink::parse(bool isJavaLink) ...@@ -1495,7 +1510,7 @@ QCString DocLink::parse(bool isJavaLink)
case TK_WORD: case TK_WORD:
if (isJavaLink) // special case to detect closing } if (isJavaLink) // special case to detect closing }
{ {
QCString w = g_token->name; QString w = g_token->name;
uint l=w.length(); uint l=w.length();
int p; int p;
if (w=="}") if (w=="}")
...@@ -1882,7 +1897,7 @@ int DocIndexEntry::parse() ...@@ -1882,7 +1897,7 @@ int DocIndexEntry::parse()
warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after \\addindex command"); warn(g_fileName,doctokenizerYYlineno,"Error: expected whitespace after \\addindex command");
goto endindexentry; goto endindexentry;
} }
m_entry.resize(0); m_entry="";
while ((tok=doctokenizerYYlex()) && tok!=TK_WHITESPACE && tok!=TK_NEWPARA) while ((tok=doctokenizerYYlex()) && tok!=TK_WHITESPACE && tok!=TK_NEWPARA)
{ {
switch (tok) switch (tok)
...@@ -2078,7 +2093,7 @@ int DocHtmlRow::parse() ...@@ -2078,7 +2093,7 @@ int DocHtmlRow::parse()
// parse one or more cells // parse one or more cells
do do
{ {
cell=new DocHtmlCell(this,isHeading); cell=new DocHtmlCell(this,g_token->attribs,isHeading);
cell->markFirst(isFirst); cell->markFirst(isFirst);
isFirst=FALSE; isFirst=FALSE;
m_children.append(cell); m_children.append(cell);
...@@ -2125,7 +2140,7 @@ getrow: ...@@ -2125,7 +2140,7 @@ getrow:
} }
else else
{ {
m_caption = new DocHtmlCaption(this); m_caption = new DocHtmlCaption(this,g_token->attribs);
retval=m_caption->parse(); retval=m_caption->parse();
if (retval==RetVal_OK) // caption was parsed ok if (retval==RetVal_OK) // caption was parsed ok
...@@ -2154,7 +2169,7 @@ getrow: ...@@ -2154,7 +2169,7 @@ getrow:
// parse one or more rows // parse one or more rows
while (retval==RetVal_TableRow) while (retval==RetVal_TableRow)
{ {
DocHtmlRow *tr=new DocHtmlRow(this); DocHtmlRow *tr=new DocHtmlRow(this,g_token->attribs);
m_children.append(tr); m_children.append(tr);
retval=tr->parse(); retval=tr->parse();
} }
...@@ -2231,6 +2246,7 @@ endtitle: ...@@ -2231,6 +2246,7 @@ endtitle:
int DocHtmlDescData::parse() int DocHtmlDescData::parse()
{ {
m_attribs = g_token->attribs;
int retval=0; int retval=0;
g_nodeStack.push(this); g_nodeStack.push(this);
DBG(("DocHtmlDescData::parse() start\n")); DBG(("DocHtmlDescData::parse() start\n"));
...@@ -2295,7 +2311,7 @@ int DocHtmlDescList::parse() ...@@ -2295,7 +2311,7 @@ int DocHtmlDescList::parse()
do do
{ {
DocHtmlDescTitle *dt=new DocHtmlDescTitle(this); DocHtmlDescTitle *dt=new DocHtmlDescTitle(this,g_token->attribs);
m_children.append(dt); m_children.append(dt);
DocHtmlDescData *dd=new DocHtmlDescData(this); DocHtmlDescData *dd=new DocHtmlDescData(this);
m_children.append(dd); m_children.append(dd);
...@@ -2417,7 +2433,7 @@ int DocHtmlList::parse() ...@@ -2417,7 +2433,7 @@ int DocHtmlList::parse()
do do
{ {
DocHtmlListItem *li=new DocHtmlListItem(this); DocHtmlListItem *li=new DocHtmlListItem(this,g_token->attribs);
m_children.append(li); m_children.append(li);
retval=li->parse(); retval=li->parse();
} while (retval==RetVal_ListItem); } while (retval==RetVal_ListItem);
...@@ -2598,7 +2614,7 @@ int DocSimpleSect::parse(bool userTitle) ...@@ -2598,7 +2614,7 @@ int DocSimpleSect::parse(bool userTitle)
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
int DocParamList::parse(const QCString &cmdName) int DocParamList::parse(const QString &cmdName)
{ {
int retval=RetVal_OK; int retval=RetVal_OK;
DBG(("DocParamList::parse() start\n")); DBG(("DocParamList::parse() start\n"));
...@@ -2648,7 +2664,7 @@ int DocParamList::parse(const QCString &cmdName) ...@@ -2648,7 +2664,7 @@ int DocParamList::parse(const QCString &cmdName)
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
int DocParamSect::parse(const QCString &cmdName) int DocParamSect::parse(const QString &cmdName)
{ {
int retval=RetVal_OK; int retval=RetVal_OK;
DBG(("DocParamSect::parse() start\n")); DBG(("DocParamSect::parse() start\n"));
...@@ -2686,7 +2702,7 @@ int DocPara::handleSimpleSection(DocSimpleSect::Type t) ...@@ -2686,7 +2702,7 @@ int DocPara::handleSimpleSection(DocSimpleSect::Type t)
return (rv!=TK_NEWPARA) ? rv : RetVal_OK; return (rv!=TK_NEWPARA) ? rv : RetVal_OK;
} }
int DocPara::handleParamSection(const QCString &cmdName,DocParamSect::Type t) int DocPara::handleParamSection(const QString &cmdName,DocParamSect::Type t)
{ {
DocParamSect *ps=0; DocParamSect *ps=0;
...@@ -2722,7 +2738,7 @@ int DocPara::handleXRefItem(DocXRefItem::Type t) ...@@ -2722,7 +2738,7 @@ int DocPara::handleXRefItem(DocXRefItem::Type t)
return retval; return retval;
} }
void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t) void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type t)
{ {
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) if (tok!=TK_WHITESPACE)
...@@ -2772,7 +2788,7 @@ void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type ...@@ -2772,7 +2788,7 @@ void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type
op->parse(); op->parse();
} }
void DocPara::handleImage(const QCString &cmdName) void DocPara::handleImage(const QString &cmdName)
{ {
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) if (tok!=TK_WHITESPACE)
...@@ -2796,7 +2812,7 @@ void DocPara::handleImage(const QCString &cmdName) ...@@ -2796,7 +2812,7 @@ void DocPara::handleImage(const QCString &cmdName)
return; return;
} }
DocImage::Type t; DocImage::Type t;
QCString imgType = g_token->name.lower(); QString imgType = g_token->name.lower();
if (imgType=="html") t=DocImage::Html; if (imgType=="html") t=DocImage::Html;
else if (imgType=="latex") t=DocImage::Latex; else if (imgType=="latex") t=DocImage::Latex;
else if (imgType=="rtf") t=DocImage::Rtf; else if (imgType=="rtf") t=DocImage::Rtf;
...@@ -2821,7 +2837,7 @@ void DocPara::handleImage(const QCString &cmdName) ...@@ -2821,7 +2837,7 @@ void DocPara::handleImage(const QCString &cmdName)
img->parse(); img->parse();
} }
void DocPara::handleDotFile(const QCString &cmdName) void DocPara::handleDotFile(const QString &cmdName)
{ {
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) if (tok!=TK_WHITESPACE)
...@@ -2844,7 +2860,7 @@ void DocPara::handleDotFile(const QCString &cmdName) ...@@ -2844,7 +2860,7 @@ void DocPara::handleDotFile(const QCString &cmdName)
df->parse(); df->parse();
} }
void DocPara::handleLink(const QCString &cmdName,bool isJavaLink) void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
{ {
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) if (tok!=TK_WHITESPACE)
...@@ -2864,14 +2880,14 @@ void DocPara::handleLink(const QCString &cmdName,bool isJavaLink) ...@@ -2864,14 +2880,14 @@ void DocPara::handleLink(const QCString &cmdName,bool isJavaLink)
doctokenizerYYsetStatePara(); doctokenizerYYsetStatePara();
DocLink *lnk = new DocLink(this,g_token->name); DocLink *lnk = new DocLink(this,g_token->name);
m_children.append(lnk); m_children.append(lnk);
QCString leftOver = lnk->parse(isJavaLink); QString leftOver = lnk->parse(isJavaLink);
if (!leftOver.isEmpty()) if (!leftOver.isEmpty())
{ {
m_children.append(new DocWord(this,leftOver)); m_children.append(new DocWord(this,leftOver));
} }
} }
void DocPara::handleRef(const QCString &cmdName) void DocPara::handleRef(const QString &cmdName)
{ {
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) if (tok!=TK_WHITESPACE)
...@@ -2941,7 +2957,7 @@ endlang: ...@@ -2941,7 +2957,7 @@ endlang:
return retval; return retval;
} }
void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t) void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
{ {
int tok=doctokenizerYYlex(); int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE) if (tok!=TK_WHITESPACE)
...@@ -2971,7 +2987,7 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t) ...@@ -2971,7 +2987,7 @@ void DocPara::handleInclude(const QCString &cmdName,DocInclude::Type t)
} }
int DocPara::handleCommand(const QCString &cmdName) int DocPara::handleCommand(const QString &cmdName)
{ {
int retval = RetVal_OK; int retval = RetVal_OK;
switch (CmdMapper::map(cmdName)) switch (CmdMapper::map(cmdName))
...@@ -3310,23 +3326,23 @@ int DocPara::handleCommand(const QCString &cmdName) ...@@ -3310,23 +3326,23 @@ int DocPara::handleCommand(const QCString &cmdName)
} }
int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tagOptions) int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tagHtmlAttribs)
{ {
DBG(("handleHtmlStartTag(%s,%d)\n",tagName.data(),tagOptions.count())); DBG(("handleHtmlStartTag(%s,%d)\n",tagName.data(),tagHtmlAttribs.count()));
int retval=RetVal_OK; int retval=RetVal_OK;
int tagId = HtmlTagMapper::map(tagName); int tagId = HtmlTagMapper::map(tagName);
switch (tagId) switch (tagId)
{ {
case HTML_UL: case HTML_UL:
{ {
DocHtmlList *list = new DocHtmlList(this,DocHtmlList::Unordered); DocHtmlList *list = new DocHtmlList(this,tagHtmlAttribs,DocHtmlList::Unordered);
m_children.append(list); m_children.append(list);
retval=list->parse(); retval=list->parse();
} }
break; break;
case HTML_OL: case HTML_OL:
{ {
DocHtmlList *list = new DocHtmlList(this,DocHtmlList::Ordered); DocHtmlList *list = new DocHtmlList(this,tagHtmlAttribs,DocHtmlList::Ordered);
m_children.append(list); m_children.append(list);
retval=list->parse(); retval=list->parse();
} }
...@@ -3343,7 +3359,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag ...@@ -3343,7 +3359,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag
break; break;
case HTML_PRE: case HTML_PRE:
{ {
DocHtmlPre *pre = new DocHtmlPre(this); DocHtmlPre *pre = new DocHtmlPre(this,tagHtmlAttribs);
m_children.append(pre); m_children.append(pre);
retval=pre->parse(); retval=pre->parse();
} }
...@@ -3374,7 +3390,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag ...@@ -3374,7 +3390,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag
break; break;
case HTML_DL: case HTML_DL:
{ {
DocHtmlDescList *list = new DocHtmlDescList(this); DocHtmlDescList *list = new DocHtmlDescList(this,tagHtmlAttribs);
m_children.append(list); m_children.append(list);
retval=list->parse(); retval=list->parse();
} }
...@@ -3387,7 +3403,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag ...@@ -3387,7 +3403,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag
break; break;
case HTML_TABLE: case HTML_TABLE:
{ {
DocHtmlTable *table = new DocHtmlTable(this); DocHtmlTable *table = new DocHtmlTable(this,tagHtmlAttribs);
m_children.append(table); m_children.append(table);
retval=table->parse(); retval=table->parse();
} }
...@@ -3418,8 +3434,8 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag ...@@ -3418,8 +3434,8 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag
break; break;
case HTML_A: case HTML_A:
{ {
QListIterator<Option> li(tagOptions); HtmlAttribListIterator li(tagHtmlAttribs);
Option *opt; HtmlAttrib *opt;
for (li.toFirst();(opt=li.current());++li) for (li.toFirst();(opt=li.current());++li)
{ {
if (opt->name=="name") // <a name=label> tag if (opt->name=="name") // <a name=label> tag
...@@ -3428,7 +3444,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag ...@@ -3428,7 +3444,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag
{ {
DocAnchor *anc = new DocAnchor(this,opt->value,TRUE); DocAnchor *anc = new DocAnchor(this,opt->value,TRUE);
m_children.append(anc); m_children.append(anc);
break; // stop looking for other tag options break; // stop looking for other tag attribs
} }
else else
{ {
...@@ -3452,29 +3468,29 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag ...@@ -3452,29 +3468,29 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag
break; break;
case HTML_H1: case HTML_H1:
{ {
DocHtmlHeader *header = new DocHtmlHeader(this,1); DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,1);
m_children.append(header); m_children.append(header);
retval = header->parse(); retval = header->parse();
} }
break; break;
case HTML_H2: case HTML_H2:
{ {
DocHtmlHeader *header = new DocHtmlHeader(this,2); DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,2);
m_children.append(header); m_children.append(header);
retval = header->parse(); retval = header->parse();
} }
break; break;
case HTML_H3: case HTML_H3:
{ {
DocHtmlHeader *header = new DocHtmlHeader(this,3); DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,3);
m_children.append(header); m_children.append(header);
retval = header->parse(); retval = header->parse();
} }
break; break;
case HTML_IMG: case HTML_IMG:
{ {
QListIterator<Option> li(tagOptions); HtmlAttribListIterator li(tagHtmlAttribs);
Option *opt; HtmlAttrib *opt;
for (li.toFirst();(opt=li.current());++li) for (li.toFirst();(opt=li.current());++li)
{ {
if (opt->name=="src" && !opt->value.isEmpty()) if (opt->name=="src" && !opt->value.isEmpty())
...@@ -3496,7 +3512,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag ...@@ -3496,7 +3512,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const QList<Option> &tag
return retval; return retval;
} }
int DocPara::handleHtmlEndTag(const QCString &tagName) int DocPara::handleHtmlEndTag(const QString &tagName)
{ {
DBG(("handleHtmlEndTag(%s)\n",tagName.data())); DBG(("handleHtmlEndTag(%s)\n",tagName.data()));
int tagId = HtmlTagMapper::map(tagName); int tagId = HtmlTagMapper::map(tagName);
...@@ -3817,7 +3833,7 @@ reparsetoken: ...@@ -3817,7 +3833,7 @@ reparsetoken:
{ {
if (!g_token->endTag) // found a start tag if (!g_token->endTag) // found a start tag
{ {
retval = handleHtmlStartTag(g_token->name,g_token->options); retval = handleHtmlStartTag(g_token->name,g_token->attribs);
} }
else // found an end tag else // found an end tag
{ {
...@@ -4023,9 +4039,9 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, ...@@ -4023,9 +4039,9 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
const char *context,MemberDef *md, const char *context,MemberDef *md,
const char *input) const char *input)
{ {
//printf("---------------- input --------------------\n%s\n----------- end input -------------------\n",input);
//printf("========== validating %s at line %d\n",fileName,startLine); printf("========== validating %s at line %d\n",fileName,startLine);
printf("---------------- input --------------------\n%s\n----------- end input -------------------\n",input);
g_token = new TokenInfo; g_token = new TokenInfo;
g_context = context; g_context = context;
...@@ -4035,7 +4051,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine, ...@@ -4035,7 +4051,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
g_styleStack.clear(); g_styleStack.clear();
g_inSeeBlock = FALSE; g_inSeeBlock = FALSE;
g_insideHtmlLink = FALSE; g_insideHtmlLink = FALSE;
g_includeFileText.resize(0); g_includeFileText = "";
g_includeFileOffset = 0; g_includeFileOffset = 0;
g_includeFileLength = 0; g_includeFileLength = 0;
g_hasParamCommand = FALSE; g_hasParamCommand = FALSE;
......
...@@ -19,12 +19,14 @@ ...@@ -19,12 +19,14 @@
#ifndef _DOCPARSER_H #ifndef _DOCPARSER_H
#define _DOCPARSER_H #define _DOCPARSER_H
#include <stdio.h>
#include <qlist.h> #include <qlist.h>
#include <qstrlist.h> #include <qstrlist.h>
#include <stdio.h> #include <qstring.h>
#include "docvisitor.h" #include "docvisitor.h"
#include "doctokenizer.h" #include "htmlattrib.h"
class DocNode; class DocNode;
class MemberDef; class MemberDef;
...@@ -138,16 +140,16 @@ template<class T> class CompAccept ...@@ -138,16 +140,16 @@ template<class T> class CompAccept
class DocWord : public DocNode class DocWord : public DocNode
{ {
public: public:
DocWord(DocNode *parent,const QCString &word) : DocWord(DocNode *parent,const QString &word) :
m_parent(parent), m_word(word) {} m_parent(parent), m_word(word) {}
QCString word() const { return m_word; } QString word() const { return m_word; }
Kind kind() const { return Kind_Word; } Kind kind() const { return Kind_Word; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_word; QString m_word;
}; };
/*! @brief Node representing a word that can be linked to something /*! @brief Node representing a word that can be linked to something
...@@ -155,41 +157,41 @@ class DocWord : public DocNode ...@@ -155,41 +157,41 @@ class DocWord : public DocNode
class DocLinkedWord : public DocNode class DocLinkedWord : public DocNode
{ {
public: public:
DocLinkedWord(DocNode *parent,const QCString &word, DocLinkedWord(DocNode *parent,const QString &word,
const QCString &ref,const QCString &file, const QString &ref,const QString &file,
const QCString &anchor) : const QString &anchor) :
m_parent(parent), m_word(word), m_ref(ref), m_parent(parent), m_word(word), m_ref(ref),
m_file(file), m_anchor(anchor) {} m_file(file), m_anchor(anchor) {}
QCString word() const { return m_word; } QString word() const { return m_word; }
Kind kind() const { return Kind_Word; } Kind kind() const { return Kind_Word; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
QCString file() const { return m_file; } QString file() const { return m_file; }
QCString ref() const { return m_ref; } QString ref() const { return m_ref; }
QCString anchor() const { return m_anchor; } QString anchor() const { return m_anchor; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_word; QString m_word;
QCString m_ref; QString m_ref;
QCString m_file; QString m_file;
QCString m_anchor; QString m_anchor;
}; };
/*! @brief Node representing an URL (or email address) */ /*! @brief Node representing an URL (or email address) */
class DocURL : public DocNode class DocURL : public DocNode
{ {
public: public:
DocURL(DocNode *parent,const QCString &url) : DocURL(DocNode *parent,const QString &url) :
m_parent(parent), m_url(url) {} m_parent(parent), m_url(url) {}
QCString url() const { return m_url; } QString url() const { return m_url; }
Kind kind() const { return Kind_URL; } Kind kind() const { return Kind_URL; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_url; QString m_url;
}; };
/*! @brief Node representing a line break */ /*! @brief Node representing a line break */
...@@ -224,17 +226,17 @@ class DocHorRuler : public DocNode ...@@ -224,17 +226,17 @@ class DocHorRuler : public DocNode
class DocAnchor : public DocNode class DocAnchor : public DocNode
{ {
public: public:
DocAnchor(DocNode *parent,const QCString &id,bool newAnchor); DocAnchor(DocNode *parent,const QString &id,bool newAnchor);
Kind kind() const { return Kind_Anchor; } Kind kind() const { return Kind_Anchor; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
QCString anchor() const { return m_anchor; } QString anchor() const { return m_anchor; }
QCString file() const { return m_file; } QString file() const { return m_file; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_anchor; QString m_anchor;
QCString m_file; QString m_file;
}; };
/*! @brief Node representing a style change */ /*! @brief Node representing a style change */
...@@ -275,7 +277,7 @@ class DocSymbol : public DocNode ...@@ -275,7 +277,7 @@ class DocSymbol : public DocNode
Kind kind() const { return Kind_Symbol; } Kind kind() const { return Kind_Symbol; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
static SymType decodeSymbol(const QCString &symName,char *letter); static SymType decodeSymbol(const QString &symName,char *letter);
private: private:
DocNode *m_parent; DocNode *m_parent;
...@@ -287,15 +289,15 @@ class DocSymbol : public DocNode ...@@ -287,15 +289,15 @@ class DocSymbol : public DocNode
class DocWhiteSpace : public DocNode class DocWhiteSpace : public DocNode
{ {
public: public:
DocWhiteSpace(DocNode *parent,const QCString &chars) : DocWhiteSpace(DocNode *parent,const QString &chars) :
m_parent(parent), m_chars(chars) {} m_parent(parent), m_chars(chars) {}
Kind kind() const { return Kind_WhiteSpace; } Kind kind() const { return Kind_WhiteSpace; }
QCString chars() const { return m_chars; } QString chars() const { return m_chars; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_chars; QString m_chars;
}; };
/*! @brief Node representing a verbatim, unparsed text fragment */ /*! @brief Node representing a verbatim, unparsed text fragment */
...@@ -303,20 +305,20 @@ class DocVerbatim : public DocNode ...@@ -303,20 +305,20 @@ class DocVerbatim : public DocNode
{ {
public: public:
enum Type { Code, HtmlOnly, LatexOnly, Verbatim }; enum Type { Code, HtmlOnly, LatexOnly, Verbatim };
DocVerbatim(DocNode *parent,const QCString &context, DocVerbatim(DocNode *parent,const QString &context,
const QCString &text, Type t) : const QString &text, Type t) :
m_parent(parent), m_context(context), m_text(text), m_type(t) {} m_parent(parent), m_context(context), m_text(text), m_type(t) {}
Kind kind() const { return Kind_Verbatim; } Kind kind() const { return Kind_Verbatim; }
Type type() const { return m_type; } Type type() const { return m_type; }
QCString text() const { return m_text; } QString text() const { return m_text; }
QCString context() const { return m_context; } QString context() const { return m_context; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_context; QString m_context;
QCString m_text; QString m_text;
Type m_type; Type m_type;
}; };
...@@ -325,23 +327,23 @@ class DocInclude : public DocNode ...@@ -325,23 +327,23 @@ class DocInclude : public DocNode
{ {
public: public:
enum Type { Include, DontInclude, VerbInclude, HtmlInclude }; enum Type { Include, DontInclude, VerbInclude, HtmlInclude };
DocInclude(DocNode *parent,const QCString &file, DocInclude(DocNode *parent,const QString &file,
const QCString context, Type t) : const QString context, Type t) :
m_parent(parent), m_file(file), m_context(context), m_type(t) {} m_parent(parent), m_file(file), m_context(context), m_type(t) {}
Kind kind() const { return Kind_Include; } Kind kind() const { return Kind_Include; }
QCString file() const { return m_file; } QString file() const { return m_file; }
Type type() const { return m_type; } Type type() const { return m_type; }
QCString text() const { return m_text; } QString text() const { return m_text; }
QCString context() const { return m_context; } QString context() const { return m_context; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
void parse(); void parse();
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_file; QString m_file;
QCString m_context; QString m_context;
QCString m_text; QString m_text;
Type m_type; Type m_type;
}; };
...@@ -350,15 +352,15 @@ class DocIncOperator : public DocNode ...@@ -350,15 +352,15 @@ class DocIncOperator : public DocNode
{ {
public: public:
enum Type { Line, SkipLine, Skip, Until }; enum Type { Line, SkipLine, Skip, Until };
DocIncOperator(DocNode *parent,Type t,const QCString &pat, DocIncOperator(DocNode *parent,Type t,const QString &pat,
const QCString &context) : const QString &context) :
m_parent(parent), m_type(t), m_pattern(pat), m_context(context), m_parent(parent), m_type(t), m_pattern(pat), m_context(context),
m_isFirst(FALSE), m_isLast(FALSE) {} m_isFirst(FALSE), m_isLast(FALSE) {}
Kind kind() const { return Kind_IncOperator; } Kind kind() const { return Kind_IncOperator; }
Type type() const { return m_type; } Type type() const { return m_type; }
QCString text() const { return m_text; } QString text() const { return m_text; }
QCString pattern() const { return m_pattern; } QString pattern() const { return m_pattern; }
QCString context() const { return m_context; } QString context() const { return m_context; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
void parse(); void parse();
...@@ -370,9 +372,9 @@ class DocIncOperator : public DocNode ...@@ -370,9 +372,9 @@ class DocIncOperator : public DocNode
private: private:
DocNode *m_parent; DocNode *m_parent;
Type m_type; Type m_type;
QCString m_text; QString m_text;
QCString m_pattern; QString m_pattern;
QCString m_context; QString m_context;
bool m_isFirst; bool m_isFirst;
bool m_isLast; bool m_isLast;
}; };
...@@ -383,16 +385,16 @@ class DocFormula : public DocNode ...@@ -383,16 +385,16 @@ class DocFormula : public DocNode
public: public:
DocFormula(DocNode *parent,int id); DocFormula(DocNode *parent,int id);
Kind kind() const { return Kind_Formula; } Kind kind() const { return Kind_Formula; }
QCString name() const { return m_name; } QString name() const { return m_name; }
QCString text() const { return m_text; } QString text() const { return m_text; }
int id() const { return m_id; } int id() const { return m_id; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_name; QString m_name;
QCString m_text; QString m_text;
int m_id; int m_id;
}; };
...@@ -405,11 +407,11 @@ class DocIndexEntry : public DocNode ...@@ -405,11 +407,11 @@ class DocIndexEntry : public DocNode
int parse(); int parse();
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
QCString entry() { return m_entry; } QString entry() { return m_entry; }
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_entry; QString m_entry;
}; };
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
...@@ -418,17 +420,17 @@ class DocIndexEntry : public DocNode ...@@ -418,17 +420,17 @@ class DocIndexEntry : public DocNode
class DocCopy : public CompAccept<DocCopy>, public DocNode class DocCopy : public CompAccept<DocCopy>, public DocNode
{ {
public: public:
DocCopy(DocNode *parent,const QCString &link) DocCopy(DocNode *parent,const QString &link)
: m_parent(parent), m_link(link) { } : m_parent(parent), m_link(link) { }
Kind kind() const { return Kind_IndexEntry; } Kind kind() const { return Kind_IndexEntry; }
QCString link() const { return m_link; } QString link() const { return m_link; }
void parse(); void parse();
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocCopy>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocCopy>::accept(this,v); }
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_link; QString m_link;
}; };
/*! @brief Node representing an auto List */ /*! @brief Node representing an auto List */
...@@ -474,9 +476,9 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode ...@@ -474,9 +476,9 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode
m_parent(parent), m_id(id), m_type(t) {} m_parent(parent), m_id(id), m_type(t) {}
Kind kind() const { return Kind_XRefItem; } Kind kind() const { return Kind_XRefItem; }
Type type() const { return m_type; } Type type() const { return m_type; }
QCString file() const { return m_file; } QString file() const { return m_file; }
QCString anchor() const { return m_anchor; } QString anchor() const { return m_anchor; }
QCString title() const { return m_title; } QString title() const { return m_title; }
void parse(); void parse();
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocXRefItem>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocXRefItem>::accept(this,v); }
...@@ -485,9 +487,9 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode ...@@ -485,9 +487,9 @@ class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode
DocNode *m_parent; DocNode *m_parent;
int m_id; int m_id;
Type m_type; Type m_type;
QCString m_file; QString m_file;
QCString m_anchor; QString m_anchor;
QCString m_title; QString m_title;
}; };
/*! @brief Node representing an image */ /*! @brief Node representing an image */
...@@ -495,81 +497,81 @@ class DocImage : public CompAccept<DocImage>, public DocNode ...@@ -495,81 +497,81 @@ class DocImage : public CompAccept<DocImage>, public DocNode
{ {
public: public:
enum Type { Html, Latex, Rtf }; enum Type { Html, Latex, Rtf };
DocImage(DocNode *parent,const QCString &name,Type t) : DocImage(DocNode *parent,const QString &name,Type t) :
m_parent(parent), m_name(name), m_type(t) {} m_parent(parent), m_name(name), m_type(t) {}
Kind kind() const { return Kind_Image; } Kind kind() const { return Kind_Image; }
Type type() const { return m_type; } Type type() const { return m_type; }
QCString name() const { return m_name; } QString name() const { return m_name; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
bool hasCaption() const { return !m_children.isEmpty(); } bool hasCaption() const { return !m_children.isEmpty(); }
QCString width() const { return m_width; } QString width() const { return m_width; }
QCString height() const { return m_height; } QString height() const { return m_height; }
void accept(DocVisitor *v) { CompAccept<DocImage>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocImage>::accept(this,v); }
void parse(); void parse();
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_name; QString m_name;
Type m_type; Type m_type;
QCString m_width; QString m_width;
QCString m_height; QString m_height;
}; };
/*! @brief Node representing a dot file */ /*! @brief Node representing a dot file */
class DocDotFile : public CompAccept<DocDotFile>, public DocNode class DocDotFile : public CompAccept<DocDotFile>, public DocNode
{ {
public: public:
DocDotFile(DocNode *parent,const QCString &name) : DocDotFile(DocNode *parent,const QString &name) :
m_parent(parent), m_name(name) { } m_parent(parent), m_name(name) { }
void parse(); void parse();
Kind kind() const { return Kind_DotFile; } Kind kind() const { return Kind_DotFile; }
QCString name() const { return m_name; } QString name() const { return m_name; }
QCString file() const { return m_file; } QString file() const { return m_file; }
bool hasCaption() const { return !m_children.isEmpty(); } bool hasCaption() const { return !m_children.isEmpty(); }
QCString width() const { return m_width; } QString width() const { return m_width; }
QCString height() const { return m_height; } QString height() const { return m_height; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocDotFile>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocDotFile>::accept(this,v); }
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_name; QString m_name;
QCString m_file; QString m_file;
QCString m_width; QString m_width;
QCString m_height; QString m_height;
}; };
/*! @brief Node representing a link to some item */ /*! @brief Node representing a link to some item */
class DocLink : public CompAccept<DocLink>, public DocNode class DocLink : public CompAccept<DocLink>, public DocNode
{ {
public: public:
DocLink(DocNode *parent,const QCString &target); DocLink(DocNode *parent,const QString &target);
QCString parse(bool); QString parse(bool);
Kind kind() const { return Kind_Link; } Kind kind() const { return Kind_Link; }
QCString file() const { return m_file; } QString file() const { return m_file; }
QCString ref() const { return m_ref; } QString ref() const { return m_ref; }
QCString anchor() const { return m_anchor; } QString anchor() const { return m_anchor; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocLink>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocLink>::accept(this,v); }
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_file; QString m_file;
QCString m_ref; QString m_ref;
QCString m_anchor; QString m_anchor;
}; };
/*! @brief Node representing a reference to some item */ /*! @brief Node representing a reference to some item */
class DocRef : public CompAccept<DocRef>, public DocNode class DocRef : public CompAccept<DocRef>, public DocNode
{ {
public: public:
DocRef(DocNode *parent,const QCString &target); DocRef(DocNode *parent,const QString &target);
void parse(); void parse();
Kind kind() const { return Kind_Ref; } Kind kind() const { return Kind_Ref; }
QCString file() const { return m_file; } QString file() const { return m_file; }
QCString ref() const { return m_ref; } QString ref() const { return m_ref; }
QCString anchor() const { return m_anchor; } QString anchor() const { return m_anchor; }
QCString targetTitle() const { return m_text; } QString targetTitle() const { return m_text; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
bool hasLinkText() const { return !m_children.isEmpty(); } bool hasLinkText() const { return !m_children.isEmpty(); }
bool refToAnchor() const { return m_refToAnchor; } bool refToAnchor() const { return m_refToAnchor; }
...@@ -580,37 +582,37 @@ class DocRef : public CompAccept<DocRef>, public DocNode ...@@ -580,37 +582,37 @@ class DocRef : public CompAccept<DocRef>, public DocNode
DocNode * m_parent; DocNode * m_parent;
bool m_refToSection; bool m_refToSection;
bool m_refToAnchor; bool m_refToAnchor;
QCString m_file; QString m_file;
QCString m_ref; QString m_ref;
QCString m_anchor; QString m_anchor;
QCString m_text; QString m_text;
}; };
/*! @brief Node representing an internal reference to some item */ /*! @brief Node representing an internal reference to some item */
class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode
{ {
public: public:
DocInternalRef(DocNode *parent,const QCString &target); DocInternalRef(DocNode *parent,const QString &target);
void parse(); void parse();
Kind kind() const { return Kind_Ref; } Kind kind() const { return Kind_Ref; }
QCString file() const { return m_file; } QString file() const { return m_file; }
QCString anchor() const { return m_anchor; } QString anchor() const { return m_anchor; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocInternalRef>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocInternalRef>::accept(this,v); }
private: private:
DocNode * m_parent; DocNode * m_parent;
QCString m_file; QString m_file;
QCString m_anchor; QString m_anchor;
}; };
/*! @brief Node representing a Language specific section */ /*! @brief Node representing a Language specific section */
class DocLanguage : public CompAccept<DocLanguage>, public DocNode class DocLanguage : public CompAccept<DocLanguage>, public DocNode
{ {
public: public:
DocLanguage(DocNode *parent,const QCString &id) : DocLanguage(DocNode *parent,const QString &id) :
m_parent(parent), m_id(id) {} m_parent(parent), m_id(id) {}
QCString id() const { return m_id; } QString id() const { return m_id; }
int parse(); int parse();
Kind kind() const { return Kind_Language; } Kind kind() const { return Kind_Language; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
...@@ -618,83 +620,91 @@ class DocLanguage : public CompAccept<DocLanguage>, public DocNode ...@@ -618,83 +620,91 @@ class DocLanguage : public CompAccept<DocLanguage>, public DocNode
private: private:
DocNode * m_parent; DocNode * m_parent;
QCString m_id; QString m_id;
}; };
/*! @brief Node representing a Hypertext reference */ /*! @brief Node representing a Hypertext reference */
class DocHRef : public CompAccept<DocHRef>, public DocNode class DocHRef : public CompAccept<DocHRef>, public DocNode
{ {
public: public:
DocHRef(DocNode *parent,const QCString &url) : DocHRef(DocNode *parent,const QString &url) :
m_parent(parent), m_url(url) {} m_parent(parent), m_url(url) {}
int parse(); int parse();
QCString url() const { return m_url; } QString url() const { return m_url; }
Kind kind() const { return Kind_HRef; } Kind kind() const { return Kind_HRef; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocHRef>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocHRef>::accept(this,v); }
private: private:
DocNode * m_parent; DocNode * m_parent;
QCString m_url; QString m_url;
}; };
/*! @brief Node Html heading */ /*! @brief Node Html heading */
class DocHtmlHeader : public CompAccept<DocHtmlHeader>, public DocNode class DocHtmlHeader : public CompAccept<DocHtmlHeader>, public DocNode
{ {
public: public:
DocHtmlHeader(DocNode *parent,int level) : DocHtmlHeader(DocNode *parent,const HtmlAttribList &attribs,int level) :
m_parent(parent), m_level(level) {} m_parent(parent), m_level(level), m_attribs(attribs) {}
int parse(); int parse();
int level() const { return m_level; } int level() const { return m_level; }
Kind kind() const { return Kind_HtmlHeader; } Kind kind() const { return Kind_HtmlHeader; }
const HtmlAttribList &attribs() const { return m_attribs; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocHtmlHeader>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocHtmlHeader>::accept(this,v); }
private: private:
DocNode * m_parent; DocNode * m_parent;
int m_level; int m_level;
HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a Html description item */ /*! @brief Node representing a Html description item */
class DocHtmlDescTitle : public CompAccept<DocHtmlDescTitle>, public DocNode class DocHtmlDescTitle : public CompAccept<DocHtmlDescTitle>, public DocNode
{ {
public: public:
DocHtmlDescTitle(DocNode *parent) : m_parent(parent) {} DocHtmlDescTitle(DocNode *parent,const HtmlAttribList &attribs) :
m_parent(parent), m_attribs(attribs) {}
int parse(); int parse();
Kind kind() const { return Kind_HtmlDescTitle; } Kind kind() const { return Kind_HtmlDescTitle; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
const HtmlAttribList &attribs() const { return m_attribs; }
void accept(DocVisitor *v) { CompAccept<DocHtmlDescTitle>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocHtmlDescTitle>::accept(this,v); }
private: private:
DocNode * m_parent; DocNode * m_parent;
HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a Html description list */ /*! @brief Node representing a Html description list */
class DocHtmlDescList : public CompAccept<DocHtmlDescList>, public DocNode class DocHtmlDescList : public CompAccept<DocHtmlDescList>, public DocNode
{ {
public: public:
DocHtmlDescList(DocNode *parent) : m_parent(parent) {} DocHtmlDescList(DocNode *parent,const HtmlAttribList &attribs)
: m_parent(parent), m_attribs(attribs) {}
int parse(); int parse();
Kind kind() const { return Kind_HtmlDescList; } Kind kind() const { return Kind_HtmlDescList; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
const HtmlAttribList &attribs() const { return m_attribs; }
void accept(DocVisitor *v) { CompAccept<DocHtmlDescList>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocHtmlDescList>::accept(this,v); }
private: private:
DocNode * m_parent; DocNode * m_parent;
HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a normal section */ /*! @brief Node representing a normal section */
class DocSection : public CompAccept<DocSection>, public DocNode class DocSection : public CompAccept<DocSection>, public DocNode
{ {
public: public:
DocSection(DocNode *parent,int level,const QCString &id) : DocSection(DocNode *parent,int level,const QString &id) :
m_parent(parent), m_level(level), m_id(id) {} m_parent(parent), m_level(level), m_id(id) {}
Kind kind() const { return Kind_Section; } Kind kind() const { return Kind_Section; }
int level() const { return m_level; } int level() const { return m_level; }
QCString title() const { return m_title; } QString title() const { return m_title; }
QCString anchor() const { return m_anchor; } QString anchor() const { return m_anchor; }
QCString id() const { return m_id; } QString id() const { return m_id; }
QCString file() const { return m_file; } QString file() const { return m_file; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocSection>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocSection>::accept(this,v); }
int parse(); int parse();
...@@ -702,31 +712,31 @@ class DocSection : public CompAccept<DocSection>, public DocNode ...@@ -702,31 +712,31 @@ class DocSection : public CompAccept<DocSection>, public DocNode
private: private:
DocNode *m_parent; DocNode *m_parent;
int m_level; int m_level;
QCString m_id; QString m_id;
QCString m_title; QString m_title;
QCString m_anchor; QString m_anchor;
QCString m_file; QString m_file;
}; };
/*! @brief Node representing a reference to a section */ /*! @brief Node representing a reference to a section */
class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode
{ {
public: public:
DocSecRefItem(DocNode *parent,const QCString &target) : DocSecRefItem(DocNode *parent,const QString &target) :
m_parent(parent), m_target(target) {} m_parent(parent), m_target(target) {}
Kind kind() const { return Kind_SecRefItem; } Kind kind() const { return Kind_SecRefItem; }
QCString target() const { return m_target; } QString target() const { return m_target; }
QCString file() const { return m_file; } QString file() const { return m_file; }
QCString anchor() const { return m_anchor; } QString anchor() const { return m_anchor; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocSecRefItem>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocSecRefItem>::accept(this,v); }
void parse(); void parse();
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_target; QString m_target;
QCString m_file; QString m_file;
QCString m_anchor; QString m_anchor;
}; };
/*! @brief Node representing a list of section references */ /*! @brief Node representing a list of section references */
...@@ -776,16 +786,19 @@ class DocHtmlList : public CompAccept<DocHtmlList>, public DocNode ...@@ -776,16 +786,19 @@ class DocHtmlList : public CompAccept<DocHtmlList>, public DocNode
{ {
public: public:
enum Type { Unordered, Ordered }; enum Type { Unordered, Ordered };
DocHtmlList(DocNode *parent,Type t) : m_parent(parent), m_type(t) {} DocHtmlList(DocNode *parent,const HtmlAttribList &attribs,Type t) :
m_parent(parent), m_type(t), m_attribs(attribs) {}
Kind kind() const { return Kind_HtmlList; } Kind kind() const { return Kind_HtmlList; }
Type type() const { return m_type; } Type type() const { return m_type; }
const HtmlAttribList &attribs() const { return m_attribs; }
int parse(); int parse();
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocHtmlList>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocHtmlList>::accept(this,v); }
private: private:
DocNode *m_parent; DocNode * m_parent;
Type m_type; Type m_type;
HtmlAttribList m_attribs;
}; };
/*! Node representing a simple section */ /*! Node representing a simple section */
...@@ -820,7 +833,7 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode ...@@ -820,7 +833,7 @@ class DocParamSect : public CompAccept<DocParamSect>, public DocNode
Unknown, Param, RetVal, Exception Unknown, Param, RetVal, Exception
}; };
DocParamSect(DocNode *parent,Type t) : m_parent(parent), m_type(t) {} DocParamSect(DocNode *parent,Type t) : m_parent(parent), m_type(t) {}
int parse(const QCString &cmdName); int parse(const QString &cmdName);
Kind kind() const { return Kind_ParamSect; } Kind kind() const { return Kind_ParamSect; }
Type type() const { return m_type; } Type type() const { return m_type; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
...@@ -847,23 +860,23 @@ class DocPara : public CompAccept<DocPara>, public DocNode ...@@ -847,23 +860,23 @@ class DocPara : public CompAccept<DocPara>, public DocNode
bool isFirst() const { return m_isFirst; } bool isFirst() const { return m_isFirst; }
bool isLast() const { return m_isLast; } bool isLast() const { return m_isLast; }
int handleCommand(const QCString &cmdName); int handleCommand(const QString &cmdName);
int handleHtmlStartTag(const QCString &tagName,const QList<Option> &tagOptions); int handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tagHtmlAttribs);
int handleHtmlEndTag(const QCString &tagName); int handleHtmlEndTag(const QString &tagName);
int handleSimpleSection(DocSimpleSect::Type t); int handleSimpleSection(DocSimpleSect::Type t);
int handleXRefItem(DocXRefItem::Type t); int handleXRefItem(DocXRefItem::Type t);
int handleParamSection(const QCString &cmdName,DocParamSect::Type t); int handleParamSection(const QString &cmdName,DocParamSect::Type t);
void handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t); void handleIncludeOperator(const QString &cmdName,DocIncOperator::Type t);
void handleImage(const QCString &cmdName); void handleImage(const QString &cmdName);
void handleDotFile(const QCString &cmdName); void handleDotFile(const QString &cmdName);
void handleInclude(const QCString &cmdName,DocInclude::Type t); void handleInclude(const QString &cmdName,DocInclude::Type t);
void handleLink(const QCString &cmdName,bool isJavaLink); void handleLink(const QString &cmdName,bool isJavaLink);
void handleRef(const QCString &cmdName); void handleRef(const QString &cmdName);
int handleLanguageSwitch(); int handleLanguageSwitch();
private: private:
DocNode *m_parent; DocNode *m_parent;
QCString m_sectionId; QString m_sectionId;
bool m_isFirst; bool m_isFirst;
bool m_isLast; bool m_isLast;
}; };
...@@ -877,7 +890,7 @@ class DocParamList : public DocNode ...@@ -877,7 +890,7 @@ class DocParamList : public DocNode
{ m_paragraph=new DocPara(this); } { m_paragraph=new DocPara(this); }
virtual ~DocParamList() virtual ~DocParamList()
{ delete m_paragraph; } { delete m_paragraph; }
int parse(const QCString &cmdName); int parse(const QString &cmdName);
Kind kind() const { return Kind_ParamList; } Kind kind() const { return Kind_ParamList; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
const QStrList &parameters() { return m_params; } const QStrList &parameters() { return m_params; }
...@@ -890,8 +903,8 @@ class DocParamList : public DocNode ...@@ -890,8 +903,8 @@ class DocParamList : public DocNode
} }
private: private:
DocNode *m_parent; DocNode * m_parent;
DocPara *m_paragraph; DocPara * m_paragraph;
QStrList m_params; QStrList m_params;
DocParamSect::Type m_type; DocParamSect::Type m_type;
}; };
...@@ -943,28 +956,34 @@ class DocSimpleListItem : public DocNode ...@@ -943,28 +956,34 @@ class DocSimpleListItem : public DocNode
class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode
{ {
public: public:
DocHtmlListItem(DocNode *parent) : m_parent(parent) {} DocHtmlListItem(DocNode *parent,const HtmlAttribList &attribs) :
m_parent(parent), m_attribs(attribs) {}
int parse(); int parse();
Kind kind() const { return Kind_HtmlListItem; } Kind kind() const { return Kind_HtmlListItem; }
const HtmlAttribList &attribs() const { return m_attribs; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocHtmlListItem>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocHtmlListItem>::accept(this,v); }
private: private:
DocNode *m_parent; DocNode * m_parent;
HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a Html description data */ /*! @brief Node representing a Html description data */
class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode
{ {
public: public:
DocHtmlDescData(DocNode *parent) : m_parent(parent) {} DocHtmlDescData(DocNode *parent) :
m_parent(parent) {}
int parse(); int parse();
Kind kind() const { return Kind_HtmlDescData; } Kind kind() const { return Kind_HtmlDescData; }
const HtmlAttribList &attribs() const { return m_attribs; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocHtmlDescData>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocHtmlDescData>::accept(this,v); }
private: private:
DocNode * m_parent; DocNode * m_parent;
HtmlAttribList m_attribs;
}; };
...@@ -972,28 +991,32 @@ class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode ...@@ -972,28 +991,32 @@ class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode
class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode
{ {
public: public:
DocHtmlPre(DocNode *parent) : m_parent(parent) {} DocHtmlPre(DocNode *parent,const HtmlAttribList &attribs)
: m_parent(parent), m_attribs(attribs) {}
int parse(); int parse();
Kind kind() const { return Kind_HtmlPre; } Kind kind() const { return Kind_HtmlPre; }
const HtmlAttribList &attribs() const { return m_attribs; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocHtmlPre>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocHtmlPre>::accept(this,v); }
private: private:
DocNode *m_parent; DocNode * m_parent;
HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a Html table cell */ /*! @brief Node representing a Html table cell */
class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode
{ {
public: public:
DocHtmlCell(DocNode *parent,bool isHeading) : DocHtmlCell(DocNode *parent,const HtmlAttribList &attribs,bool isHeading) :
m_parent(parent), m_isHeading(isHeading), m_parent(parent), m_isHeading(isHeading),
m_isFirst(FALSE), m_isLast(FALSE) {} m_isFirst(FALSE), m_isLast(FALSE), m_attribs(attribs) {}
int parse(); int parse();
bool isHeading() const { return m_isHeading; } bool isHeading() const { return m_isHeading; }
bool isFirst() const { return m_isFirst; } bool isFirst() const { return m_isFirst; }
bool isLast() const { return m_isLast; } bool isLast() const { return m_isLast; }
Kind kind() const { return Kind_HtmlCell; } Kind kind() const { return Kind_HtmlCell; }
const HtmlAttribList &attribs() const { return m_attribs; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocHtmlCell>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocHtmlCell>::accept(this,v); }
void markFirst(bool v=TRUE) { m_isFirst=v; } void markFirst(bool v=TRUE) { m_isFirst=v; }
...@@ -1004,47 +1027,57 @@ class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode ...@@ -1004,47 +1027,57 @@ class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode
bool m_isHeading; bool m_isHeading;
bool m_isFirst; bool m_isFirst;
bool m_isLast; bool m_isLast;
HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a Html table caption */ /*! @brief Node representing a Html table caption */
class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode
{ {
public: public:
DocHtmlCaption(DocNode *parent) : m_parent(parent) {} DocHtmlCaption(DocNode *parent,const HtmlAttribList &attribs) :
m_parent(parent), m_attribs(attribs) {}
int parse(); int parse();
Kind kind() const { return Kind_HtmlCaption; } Kind kind() const { return Kind_HtmlCaption; }
const HtmlAttribList &attribs() const { return m_attribs; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { CompAccept<DocHtmlCaption>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocHtmlCaption>::accept(this,v); }
private: private:
DocNode * m_parent; DocNode * m_parent;
HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a Html table row */ /*! @brief Node representing a Html table row */
class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode
{ {
public: public:
DocHtmlRow(DocNode *parent) : m_parent(parent) {} DocHtmlRow(DocNode *parent,const HtmlAttribList &attribs)
: m_parent(parent), m_attribs(attribs) {}
int parse(); int parse();
Kind kind() const { return Kind_HtmlRow; } Kind kind() const { return Kind_HtmlRow; }
const HtmlAttribList &attribs() const { return m_attribs; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
uint numCells() const { return m_children.count(); } uint numCells() const { return m_children.count(); }
void accept(DocVisitor *v) { CompAccept<DocHtmlRow>::accept(this,v); } void accept(DocVisitor *v) { CompAccept<DocHtmlRow>::accept(this,v); }
private: private:
DocNode * m_parent; DocNode * m_parent;
HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a Html table */ /*! @brief Node representing a Html table */
class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode
{ {
public: public:
DocHtmlTable(DocNode *parent) : m_parent(parent) { m_caption=0; } DocHtmlTable(DocNode *parent,const HtmlAttribList &attribs)
: m_parent(parent), m_attribs(attribs)
{ m_caption=0; }
~DocHtmlTable() { delete m_caption; } ~DocHtmlTable() { delete m_caption; }
Kind kind() const { return Kind_HtmlTable; } Kind kind() const { return Kind_HtmlTable; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
uint numRows() const { return m_children.count(); } uint numRows() const { return m_children.count(); }
bool hasCaption() { return m_caption!=0; } bool hasCaption() { return m_caption!=0; }
const HtmlAttribList &attribs() const { return m_attribs; }
int parse(); int parse();
uint numCols() const uint numCols() const
{ {
...@@ -1071,6 +1104,7 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode ...@@ -1071,6 +1104,7 @@ class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode
private: private:
DocNode * m_parent; DocNode * m_parent;
DocHtmlCaption *m_caption; DocHtmlCaption *m_caption;
HtmlAttribList m_attribs;
}; };
......
...@@ -19,8 +19,9 @@ ...@@ -19,8 +19,9 @@
#ifndef _DOCTOKENIZER_H #ifndef _DOCTOKENIZER_H
#define _DOCTOKENIZER_H #define _DOCTOKENIZER_H
#include <qcstring.h> #include <qstring.h>
#include <qlist.h> #include <qlist.h>
#include "htmlattrib.h"
enum Tokens enum Tokens
{ {
...@@ -53,24 +54,16 @@ enum Tokens ...@@ -53,24 +54,16 @@ enum Tokens
RetVal_SwitchLang = 0x1000E RetVal_SwitchLang = 0x1000E
}; };
struct Option
{
QCString name;
QCString value;
};
struct TokenInfo struct TokenInfo
{ {
TokenInfo() { options.setAutoDelete(TRUE); }
// unknown token // unknown token
char unknownChar; char unknownChar;
// command token // command token
QCString name; QString name;
// command text (RCS tag) // command text (RCS tag)
QCString text; QString text;
// comment blocks // comment blocks
...@@ -79,23 +72,23 @@ struct TokenInfo ...@@ -79,23 +72,23 @@ struct TokenInfo
int indent; int indent;
// sections // sections
QCString sectionId; QString sectionId;
// simple section // simple section
QCString simpleSectName; QString simpleSectName;
// verbatim fragment // verbatim fragment
QCString verb; QString verb;
// xrefitem // xrefitem
int id; int id;
// html tag // html tag
QList<Option> options; HtmlAttribList attribs;
bool endTag; bool endTag;
// whitespace // whitespace
QCString chars; QString chars;
}; };
// globals // globals
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
%{ %{
#include <qfile.h> #include <qfile.h>
#include <qcstring.h> #include <qstring.h>
#include <qstack.h> #include <qstack.h>
#include <qdict.h> #include <qdict.h>
...@@ -36,7 +36,7 @@ static int g_commentState; ...@@ -36,7 +36,7 @@ static int g_commentState;
TokenInfo *g_token = 0; TokenInfo *g_token = 0;
static int g_inputPos = 0; static int g_inputPos = 0;
static const char *g_inputString; static const char *g_inputString;
static QCString g_fileName; static QString g_fileName;
struct DocLexerContext struct DocLexerContext
{ {
...@@ -122,69 +122,68 @@ static int computeIndent(const char *str,int length) ...@@ -122,69 +122,68 @@ static int computeIndent(const char *str,int length)
return indent; return indent;
} }
/*! converts input string \a opt into a list of Options. Each /*! converts input string \a opt into a list of Html Attributes. Each
* option is a name, value pair. The result is stored in g_token->options * attribute is a name, value pair. The result is stored in g_token->attribs
*/ */
static void parseOptions(const QCString &opt) static void parseHtmlAttribs(const char *att)
{ {
//printf("parseOptions(%s)\n",opt.data()); //printf("parseHtmlAttribs(%s)\n",opt.data());
QCString options=opt; QCString attribs=att;
g_token->options.clear(); int len = attribs.length();
int len = options.length();
char c; char c;
int i=0,startName,endName,startOption,endOption; int i=0,startName,endName,startAttrib,endAttrib;
while (i<len) while (i<len)
{ {
c=options.at(i); c=attribs.at(i);
// skip spaces // skip spaces
while (i<len && c==' ') { c=options.at(++i); } while (i<len && c==' ') { c=attribs.at(++i); }
startName=i; startName=i;
// search for end of name // search for end of name
while (i<len && c!=' ' && c!='=') { c=options.at(++i); } while (i<len && c!=' ' && c!='=') { c=attribs.at(++i); }
endName=i; endName=i;
Option *opt = new Option; HtmlAttrib opt;
opt->name = options.mid(startName,endName-startName).lower(); opt.name = attribs.mid(startName,endName-startName).lower();
// skip spaces // skip spaces
while (i<len && c==' ') { c=options.at(++i); } while (i<len && c==' ') { c=attribs.at(++i); }
if (options.at(i)=='=') // option has value if (attribs.at(i)=='=') // option has value
{ {
i++; i++;
// skip spaces // skip spaces
while (i<len && c==' ') { c=options.at(++i); } while (i<len && c==' ') { c=attribs.at(++i); }
if (options.at(i)=='\'') // option '...' if (attribs.at(i)=='\'') // option '...'
{ {
i++; i++;
startOption=i; startAttrib=i;
// search for matching quote // search for matching quote
while (i<len && c!='\'') { c=options.at(++i); } while (i<len && c!='\'') { c=attribs.at(++i); }
endOption=i; endAttrib=i;
i++; i++;
} }
else if (options.at(i)=='"') // option "..." else if (attribs.at(i)=='"') // option "..."
{ {
i++; i++;
startOption=i; startAttrib=i;
// search for matching quote // search for matching quote
while (i<len && c!='"') { c=options.at(++i); } while (i<len && c!='"') { c=attribs.at(++i); }
endOption=i; endAttrib=i;
i++; i++;
} }
else // value without any quotes else // value without any quotes
{ {
startOption=i; startAttrib=i;
// search for separator // search for separator
while (i<len && c!=' ') { c=options.at(++i); } while (i<len && c!=' ') { c=attribs.at(++i); }
endOption=i; endAttrib=i;
i++; i++;
} }
opt->value = options.mid(startOption,endOption-startOption); opt.value = attribs.mid(startAttrib,endAttrib-startAttrib);
} }
else // start next option else // start next option
{ {
} }
//printf("=====> Adding option name=<%s> value=<%s>\n", //printf("=====> Adding option name=<%s> value=<%s>\n",
// opt->name.data(),opt->value.data()); // opt->name.data(),opt->value.data());
g_token->options.append(opt); g_token->attribs.append(&opt);
} }
} }
...@@ -241,7 +240,7 @@ WORD1 [^ \t\n\r\\@<>&$#,.]+ ...@@ -241,7 +240,7 @@ WORD1 [^ \t\n\r\\@<>&$#,.]+
WORD2 "."|"," WORD2 "."|","
WORD1NQ [^ \t\n\r\\@<>&$#,."]+ WORD1NQ [^ \t\n\r\\@<>&$#,."]+
WORD2NQ "."|"," WORD2NQ "."|","
HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">" HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
%option noyywrap %option noyywrap
%option yylineno %option yylineno
...@@ -269,14 +268,14 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">" ...@@ -269,14 +268,14 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">"
%% %%
<St_Para>\r /* skip carriage return */ <St_Para>\r /* skip carriage return */
<St_Para>^{LISTITEM} { /* list item */ <St_Para>^{LISTITEM} { /* list item */
QCString text=yytext; QString text=yytext;
int dashPos = text.findRev('-'); int dashPos = text.findRev('-');
g_token->isEnumList = text.at(dashPos+1)=='#'; g_token->isEnumList = text.at(dashPos+1)=='#';
g_token->indent = computeIndent(yytext,dashPos); g_token->indent = computeIndent(yytext,dashPos);
return TK_LISTITEM; return TK_LISTITEM;
} }
<St_Para>{BLANK}*\n{LISTITEM} { /* list item on next line */ <St_Para>{BLANK}*\n{LISTITEM} { /* list item on next line */
QCString text=yytext; QString text=yytext;
text=text.right(text.length()-text.find('\n')-1); text=text.right(text.length()-text.find('\n')-1);
int dashPos = text.findRev('-'); int dashPos = text.findRev('-');
g_token->isEnumList = text.at(dashPos+1)=='#'; g_token->isEnumList = text.at(dashPos+1)=='#';
...@@ -284,12 +283,12 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">" ...@@ -284,12 +283,12 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">"
return TK_LISTITEM; return TK_LISTITEM;
} }
<St_Para>^{ENDLIST} { /* end list */ <St_Para>^{ENDLIST} { /* end list */
int dotPos = QCString(yytext).findRev('.'); int dotPos = QString(yytext).findRev('.');
g_token->indent = computeIndent(yytext,dotPos); g_token->indent = computeIndent(yytext,dotPos);
return TK_ENDLIST; return TK_ENDLIST;
} }
<St_Para>{BLANK}*\n{ENDLIST} { /* end list on next line */ <St_Para>{BLANK}*\n{ENDLIST} { /* end list on next line */
QCString text=yytext; QString text=yytext;
text=text.right(text.length()-text.find('\n')-1); text=text.right(text.length()-text.find('\n')-1);
int dotPos = text.findRev('.'); int dotPos = text.findRev('.');
g_token->indent = computeIndent(text,dotPos); g_token->indent = computeIndent(text,dotPos);
...@@ -302,7 +301,7 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">" ...@@ -302,7 +301,7 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">"
<St_Para>{SPCMD3} { <St_Para>{SPCMD3} {
g_token->name = "form"; g_token->name = "form";
bool ok; bool ok;
g_token->id = QCString(yytext).right(yyleng-6).toInt(&ok); g_token->id = QString(yytext).right(yyleng-6).toInt(&ok);
ASSERT(ok); ASSERT(ok);
return TK_COMMAND; return TK_COMMAND;
} }
...@@ -320,7 +319,7 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">" ...@@ -320,7 +319,7 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">"
return TK_URL; return TK_URL;
} }
<St_Para>"$"{ID}":"[^\n$]+"$" { /* RCS tag */ <St_Para>"$"{ID}":"[^\n$]+"$" { /* RCS tag */
QCString tagName(yytext+1); QString tagName(yytext+1);
int i=tagName.find(':'); int i=tagName.find(':');
g_token->name = tagName.left(i); g_token->name = tagName.left(i);
g_token->text = tagName.mid(i+1,tagName.length()-i-2); g_token->text = tagName.mid(i+1,tagName.length()-i-2);
...@@ -334,13 +333,14 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">" ...@@ -334,13 +333,14 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">"
} }
<St_Para>{HTMLTAG} { /* html tag */ <St_Para>{HTMLTAG} { /* html tag */
g_token->name = yytext; g_token->name = yytext;
g_token->attribs.clear();
int startNamePos=1; int startNamePos=1;
if (g_token->name.at(1)=='/') startNamePos++; if (g_token->name.at(1)=='/') startNamePos++;
int optSep = g_token->name.find(' '); int attSep = g_token->name.find(' ');
if (optSep!=-1) // tag has one or more options if (attSep!=-1) // tag has one or more options
{ {
parseOptions(g_token->name.mid(optSep+1,g_token->name.length()-optSep-2)); parseHtmlAttribs(g_token->name.mid(attSep+1,g_token->name.length()-attSep-2));
g_token->name=g_token->name.mid(startNamePos,optSep-1).lower(); g_token->name=g_token->name.mid(startNamePos,attSep-1).lower();
} }
else // tag without options, strip brackets else // tag without options, strip brackets
{ {
...@@ -539,7 +539,7 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">" ...@@ -539,7 +539,7 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">"
return 0; return 0;
} }
<St_XRefItem>[0-9]+\n { <St_XRefItem>[0-9]+\n {
QCString numStr=yytext; QString numStr=yytext;
numStr=numStr.left(yyleng-1); numStr=numStr.left(yyleng-1);
g_token->id=numStr.toInt(); g_token->id=numStr.toInt();
return RetVal_OK; return RetVal_OK;
...@@ -567,7 +567,7 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">" ...@@ -567,7 +567,7 @@ HTMLTAG "<"(("/")?){ID}({BLANK}+{ATTRIB})*">"
return TK_WORD; return TK_WORD;
} }
<St_File>"\""[^\n\"]+"\"" { <St_File>"\""[^\n\"]+"\"" {
QCString text=yytext; QString text=yytext;
g_token->name = text.mid(1,text.length()-2); g_token->name = text.mid(1,text.length()-2);
return TK_WORD; return TK_WORD;
} }
...@@ -615,25 +615,25 @@ void doctokenizerYYsetStateTitle() ...@@ -615,25 +615,25 @@ void doctokenizerYYsetStateTitle()
void doctokenizerYYsetStateCode() void doctokenizerYYsetStateCode()
{ {
g_token->verb.resize(0); g_token->verb="";
BEGIN(St_Code); BEGIN(St_Code);
} }
void doctokenizerYYsetStateHtmlOnly() void doctokenizerYYsetStateHtmlOnly()
{ {
g_token->verb.resize(0); g_token->verb="";
BEGIN(St_HtmlOnly); BEGIN(St_HtmlOnly);
} }
void doctokenizerYYsetStateLatexOnly() void doctokenizerYYsetStateLatexOnly()
{ {
g_token->verb.resize(0); g_token->verb="";
BEGIN(St_LatexOnly); BEGIN(St_LatexOnly);
} }
void doctokenizerYYsetStateVerbatim() void doctokenizerYYsetStateVerbatim()
{ {
g_token->verb.resize(0); g_token->verb="";
BEGIN(St_Verbatim); BEGIN(St_Verbatim);
} }
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#ifndef _DOCVISITOR_H #ifndef _DOCVISITOR_H
#define _DOCVISITOR_H #define _DOCVISITOR_H
// forward declarations
class DocWord; class DocWord;
class DocWhiteSpace; class DocWhiteSpace;
class DocAutoList; class DocAutoList;
...@@ -73,7 +74,9 @@ class DocCopy; ...@@ -73,7 +74,9 @@ class DocCopy;
class DocVisitor class DocVisitor
{ {
public: public:
/*! @name Visitor functions for leaf nodes */ /*! @name Visitor functions for leaf nodes
* @{
*/
virtual void visit(DocWord *) = 0; virtual void visit(DocWord *) = 0;
virtual void visit(DocWhiteSpace *) = 0; virtual void visit(DocWhiteSpace *) = 0;
virtual void visit(DocSymbol *) = 0; virtual void visit(DocSymbol *) = 0;
...@@ -88,8 +91,11 @@ class DocVisitor ...@@ -88,8 +91,11 @@ class DocVisitor
virtual void visit(DocFormula *) = 0; virtual void visit(DocFormula *) = 0;
virtual void visit(DocLinkedWord *) = 0; virtual void visit(DocLinkedWord *) = 0;
virtual void visit(DocIndexEntry *) = 0; virtual void visit(DocIndexEntry *) = 0;
/*! @} */
/*! @name Visitor functions for internal nodes */ /*! @name Visitor functions for internal nodes
* @{
*/
virtual void visitPre(DocAutoList *) = 0; virtual void visitPre(DocAutoList *) = 0;
virtual void visitPost(DocAutoList *) = 0; virtual void visitPost(DocAutoList *) = 0;
virtual void visitPre(DocAutoListItem *) = 0; virtual void visitPre(DocAutoListItem *) = 0;
...@@ -158,6 +164,7 @@ class DocVisitor ...@@ -158,6 +164,7 @@ class DocVisitor
virtual void visitPost(DocInternalRef *) = 0; virtual void visitPost(DocInternalRef *) = 0;
virtual void visitPre(DocCopy *) = 0; virtual void visitPre(DocCopy *) = 0;
virtual void visitPost(DocCopy *) = 0; virtual void visitPost(DocCopy *) = 0;
/*! @} */
}; };
#endif #endif
...@@ -1899,7 +1899,7 @@ static void buildFunctionList(Entry *root) ...@@ -1899,7 +1899,7 @@ static void buildFunctionList(Entry *root)
{ {
Debug::print(Debug::Functions,0, Debug::print(Debug::Functions,0,
"FUNCTION_SEC:\n" "FUNCTION_SEC:\n"
" `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d memSpec=%d proto=%d\n", " `%s' `%s'::`%s' `%s' relates=`%s' file=`%s' line=`%d' bodyLine=`%d' #tArgLists=%d mGrpId=%d memSpec=%d proto=%d docFile=%s\n",
root->type.data(), root->type.data(),
root->parent->name.data(), root->parent->name.data(),
root->name.data(), root->name.data(),
...@@ -1913,7 +1913,8 @@ static void buildFunctionList(Entry *root) ...@@ -1913,7 +1913,8 @@ static void buildFunctionList(Entry *root)
//root->mtArgList ? (int)root->mtArgList->count() : -1, //root->mtArgList ? (int)root->mtArgList->count() : -1,
root->mGrpId, root->mGrpId,
root->memSpec, root->memSpec,
root->proto root->proto,
root->docFile.data()
); );
bool isFriend=root->type.find("friend ")!=-1; bool isFriend=root->type.find("friend ")!=-1;
......
...@@ -186,6 +186,7 @@ void FileDef::writeDocumentation(OutputList &ol) ...@@ -186,6 +186,7 @@ void FileDef::writeDocumentation(OutputList &ol)
if (Config_getBool("DETAILS_AT_TOP")) if (Config_getBool("DETAILS_AT_TOP"))
{ {
writeDetailedDocumentation(ol); writeDetailedDocumentation(ol);
ol.newParagraph();
} }
else if (briefDescription()) else if (briefDescription())
{ {
......
...@@ -392,6 +392,7 @@ void GroupDef::writeDocumentation(OutputList &ol) ...@@ -392,6 +392,7 @@ void GroupDef::writeDocumentation(OutputList &ol)
if (Config_getBool("DETAILS_AT_TOP")) if (Config_getBool("DETAILS_AT_TOP"))
{ {
writeDetailedDocumentation(ol); writeDetailedDocumentation(ol);
ol.newParagraph();
} }
else if (!briefDescription().isEmpty()) else if (!briefDescription().isEmpty())
{ {
......
/******************************************************************************
*
*
*
* Copyright (C) 1997-2002 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
*/
#ifndef _HTMLATTRIB_H
#define _HTMLATTRIB_H
/*! A Html option. A name, value pair */
struct HtmlAttrib
{
QString name;
QString value;
};
/*! @brief A list of Html attributes.
*
* The Html attributes are deeply copied into the list.
*/
class HtmlAttribList : public QList<HtmlAttrib>
{
public:
HtmlAttribList() : QList<HtmlAttrib>() { setAutoDelete(TRUE); }
~HtmlAttribList() { clear(); }
HtmlAttribList(const HtmlAttribList &l) : QList<HtmlAttrib>()
{ operator=(l); }
HtmlAttribList &operator=(const HtmlAttribList &l)
{ clear(); QList<HtmlAttrib>::operator=(l); return *this; }
private:
QCollection::Item newItem( QCollection::Item d )
{ return (QCollection::Item)new HtmlAttrib(*(HtmlAttrib *)d); }
void deleteItem(QCollection::Item d)
{ delete (HtmlAttrib *)d; }
};
/*! @brief Html attribute list iterator */
class HtmlAttribListIterator : public QListIterator<HtmlAttrib>
{
public:
HtmlAttribListIterator(const HtmlAttribList &l) : QListIterator<HtmlAttrib>(l) {}
};
#endif
...@@ -25,6 +25,24 @@ ...@@ -25,6 +25,24 @@
#include "dot.h" #include "dot.h"
#include "message.h" #include "message.h"
static QString htmlAttribsToString(const HtmlAttribList &attribs)
{
QString result;
HtmlAttribListIterator li(attribs);
HtmlAttrib *att;
for (li.toFirst();(att=li.current());++li)
{
printf("Found attion name=`%s' value=`%s'\n",
att->name.data(),att->value.data());
result+=" ";
result+=att->name;
if (!att->value.isEmpty()) result+="=\""+att->value+"\"";
}
return result;
}
//-------------------------------------------------------------------------
HtmlDocVisitor::HtmlDocVisitor(QTextStream &t,BaseCodeDocInterface &ci) HtmlDocVisitor::HtmlDocVisitor(QTextStream &t,BaseCodeDocInterface &ci)
: m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE) : m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE)
{ {
...@@ -147,7 +165,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s) ...@@ -147,7 +165,7 @@ void HtmlDocVisitor::visit(DocVerbatim *s)
{ {
case DocVerbatim::Code: // fall though case DocVerbatim::Code: // fall though
m_t << "<div class=\"fragment\"><pre>"; m_t << "<div class=\"fragment\"><pre>";
parseCode(m_ci,s->context(),s->text(),FALSE,0); parseCode(m_ci,s->context(),s->text().latin1(),FALSE,0);
m_t << "</pre></div>"; m_t << "</pre></div>";
break; break;
case DocVerbatim::Verbatim: case DocVerbatim::Verbatim:
...@@ -177,7 +195,7 @@ void HtmlDocVisitor::visit(DocInclude *inc) ...@@ -177,7 +195,7 @@ void HtmlDocVisitor::visit(DocInclude *inc)
{ {
case DocInclude::Include: case DocInclude::Include:
m_t << "<div class=\"fragment\"><pre>"; m_t << "<div class=\"fragment\"><pre>";
parseCode(m_ci,inc->context(),inc->text(),FALSE,0); parseCode(m_ci,inc->context(),inc->text().latin1(),FALSE,0);
m_t << "</pre></div>"; m_t << "</pre></div>";
break; break;
case DocInclude::DontInclude: case DocInclude::DontInclude:
...@@ -204,7 +222,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op) ...@@ -204,7 +222,7 @@ void HtmlDocVisitor::visit(DocIncOperator *op)
} }
if (op->type()!=DocIncOperator::Skip) if (op->type()!=DocIncOperator::Skip)
{ {
parseCode(m_ci,op->context(),op->text(),FALSE,0); parseCode(m_ci,op->context(),op->text().latin1(),FALSE,0);
} }
if (op->isLast()) if (op->isLast())
{ {
...@@ -395,9 +413,9 @@ void HtmlDocVisitor::visitPost(DocSection *) ...@@ -395,9 +413,9 @@ void HtmlDocVisitor::visitPost(DocSection *)
void HtmlDocVisitor::visitPre(DocHtmlList *s) void HtmlDocVisitor::visitPre(DocHtmlList *s)
{ {
if (s->type()==DocHtmlList::Ordered) if (s->type()==DocHtmlList::Ordered)
m_t << "<ol>\n"; m_t << "<ol" << htmlAttribsToString(s->attribs()) << ">\n";
else else
m_t << "<ul>\n"; m_t << "<ul" << htmlAttribsToString(s->attribs()) << ">\n";
} }
void HtmlDocVisitor::visitPost(DocHtmlList *s) void HtmlDocVisitor::visitPost(DocHtmlList *s)
...@@ -408,9 +426,9 @@ void HtmlDocVisitor::visitPost(DocHtmlList *s) ...@@ -408,9 +426,9 @@ void HtmlDocVisitor::visitPost(DocHtmlList *s)
m_t << "</ul>\n"; m_t << "</ul>\n";
} }
void HtmlDocVisitor::visitPre(DocHtmlListItem *) void HtmlDocVisitor::visitPre(DocHtmlListItem *i)
{ {
m_t << "<li>\n"; m_t << "<li" << htmlAttribsToString(i->attribs()) << ">\n";
} }
void HtmlDocVisitor::visitPost(DocHtmlListItem *) void HtmlDocVisitor::visitPost(DocHtmlListItem *)
...@@ -418,9 +436,9 @@ void HtmlDocVisitor::visitPost(DocHtmlListItem *) ...@@ -418,9 +436,9 @@ void HtmlDocVisitor::visitPost(DocHtmlListItem *)
m_t << "</li>\n"; m_t << "</li>\n";
} }
void HtmlDocVisitor::visitPre(DocHtmlPre *) void HtmlDocVisitor::visitPre(DocHtmlPre *p)
{ {
m_t << "<pre>\n"; m_t << "<pre" << htmlAttribsToString(p->attribs()) << ">\n";
m_insidePre=TRUE; m_insidePre=TRUE;
} }
...@@ -430,9 +448,9 @@ void HtmlDocVisitor::visitPost(DocHtmlPre *) ...@@ -430,9 +448,9 @@ void HtmlDocVisitor::visitPost(DocHtmlPre *)
m_t << "</pre>\n"; m_t << "</pre>\n";
} }
void HtmlDocVisitor::visitPre(DocHtmlDescList *) void HtmlDocVisitor::visitPre(DocHtmlDescList *dl)
{ {
m_t << "<dl>\n"; m_t << "<dl" << htmlAttribsToString(dl->attribs()) << ">\n";
} }
void HtmlDocVisitor::visitPost(DocHtmlDescList *) void HtmlDocVisitor::visitPost(DocHtmlDescList *)
...@@ -440,9 +458,9 @@ void HtmlDocVisitor::visitPost(DocHtmlDescList *) ...@@ -440,9 +458,9 @@ void HtmlDocVisitor::visitPost(DocHtmlDescList *)
m_t << "</dl>\n"; m_t << "</dl>\n";
} }
void HtmlDocVisitor::visitPre(DocHtmlDescTitle *) void HtmlDocVisitor::visitPre(DocHtmlDescTitle *dt)
{ {
m_t << "<dt>"; m_t << "<dt" << htmlAttribsToString(dt->attribs()) << ">";
} }
void HtmlDocVisitor::visitPost(DocHtmlDescTitle *) void HtmlDocVisitor::visitPost(DocHtmlDescTitle *)
...@@ -450,9 +468,9 @@ void HtmlDocVisitor::visitPost(DocHtmlDescTitle *) ...@@ -450,9 +468,9 @@ void HtmlDocVisitor::visitPost(DocHtmlDescTitle *)
m_t << "</dt>\n"; m_t << "</dt>\n";
} }
void HtmlDocVisitor::visitPre(DocHtmlDescData *) void HtmlDocVisitor::visitPre(DocHtmlDescData *dd)
{ {
m_t << "<dd>"; m_t << "<dd" << htmlAttribsToString(dd->attribs()) << ">";
} }
void HtmlDocVisitor::visitPost(DocHtmlDescData *) void HtmlDocVisitor::visitPost(DocHtmlDescData *)
...@@ -460,9 +478,25 @@ void HtmlDocVisitor::visitPost(DocHtmlDescData *) ...@@ -460,9 +478,25 @@ void HtmlDocVisitor::visitPost(DocHtmlDescData *)
m_t << "</dd>\n"; m_t << "</dd>\n";
} }
void HtmlDocVisitor::visitPre(DocHtmlTable *) void HtmlDocVisitor::visitPre(DocHtmlTable *t)
{ {
m_t << "<table border=\"1\" cellspacing=\"3\" cellpadding=\"3\">\n"; bool hasBorder = FALSE;
bool hasCellSpacing = FALSE;
bool hasCellPadding = FALSE;
HtmlAttribListIterator li(t->attribs());
HtmlAttrib *att;
for (li.toFirst();(att=li.current());++li)
{
if (att->name=="border") hasBorder=TRUE;
else if (att->name=="cellspacing") hasCellSpacing=TRUE;
else if (att->name=="cellpadding") hasCellPadding=TRUE;
}
m_t << "<table" << htmlAttribsToString(t->attribs());
if (!hasBorder) m_t << " border=\"1\"";
if (!hasCellSpacing) m_t << " cellspacing=\"3\"";
if (!hasCellPadding) m_t << " cellpadding=\"3\"";
m_t << ">\n";
} }
void HtmlDocVisitor::visitPost(DocHtmlTable *) void HtmlDocVisitor::visitPost(DocHtmlTable *)
...@@ -470,9 +504,9 @@ void HtmlDocVisitor::visitPost(DocHtmlTable *) ...@@ -470,9 +504,9 @@ void HtmlDocVisitor::visitPost(DocHtmlTable *)
m_t << "</table>\n"; m_t << "</table>\n";
} }
void HtmlDocVisitor::visitPre(DocHtmlRow *) void HtmlDocVisitor::visitPre(DocHtmlRow *tr)
{ {
m_t << "<tr>\n"; m_t << "<tr" << htmlAttribsToString(tr->attribs()) << ">\n";
} }
void HtmlDocVisitor::visitPost(DocHtmlRow *) void HtmlDocVisitor::visitPost(DocHtmlRow *)
...@@ -482,7 +516,14 @@ void HtmlDocVisitor::visitPost(DocHtmlRow *) ...@@ -482,7 +516,14 @@ void HtmlDocVisitor::visitPost(DocHtmlRow *)
void HtmlDocVisitor::visitPre(DocHtmlCell *c) void HtmlDocVisitor::visitPre(DocHtmlCell *c)
{ {
if (c->isHeading()) m_t << "<th>"; else m_t << "<td>"; if (c->isHeading())
{
m_t << "<th" << htmlAttribsToString(c->attribs()) << ">";
}
else
{
m_t << "<td" << htmlAttribsToString(c->attribs()) << ">";
}
} }
void HtmlDocVisitor::visitPost(DocHtmlCell *c) void HtmlDocVisitor::visitPost(DocHtmlCell *c)
...@@ -490,9 +531,18 @@ void HtmlDocVisitor::visitPost(DocHtmlCell *c) ...@@ -490,9 +531,18 @@ void HtmlDocVisitor::visitPost(DocHtmlCell *c)
if (c->isHeading()) m_t << "</th>"; else m_t << "</td>"; if (c->isHeading()) m_t << "</th>"; else m_t << "</td>";
} }
void HtmlDocVisitor::visitPre(DocHtmlCaption *) void HtmlDocVisitor::visitPre(DocHtmlCaption *c)
{ {
m_t << "<caption align=\"bottom\">"; bool hasAlign = FALSE;
HtmlAttribListIterator li(c->attribs());
HtmlAttrib *att;
for (li.toFirst();(att=li.current());++li)
{
if (att->name=="align") hasAlign=TRUE;
}
m_t << "<caption" << htmlAttribsToString(c->attribs());
if (!hasAlign) m_t << " align=\"bottom\"";
m_t << ">";
} }
void HtmlDocVisitor::visitPost(DocHtmlCaption *) void HtmlDocVisitor::visitPost(DocHtmlCaption *)
...@@ -523,7 +573,8 @@ void HtmlDocVisitor::visitPost(DocHRef *) ...@@ -523,7 +573,8 @@ void HtmlDocVisitor::visitPost(DocHRef *)
void HtmlDocVisitor::visitPre(DocHtmlHeader *header) void HtmlDocVisitor::visitPre(DocHtmlHeader *header)
{ {
m_t << "<h" << header->level() << ">"; m_t << "<h" << header->level()
<< htmlAttribsToString(header->attribs()) << ">";
} }
void HtmlDocVisitor::visitPost(DocHtmlHeader *header) void HtmlDocVisitor::visitPost(DocHtmlHeader *header)
...@@ -535,7 +586,7 @@ void HtmlDocVisitor::visitPre(DocImage *img) ...@@ -535,7 +586,7 @@ void HtmlDocVisitor::visitPre(DocImage *img)
{ {
if (img->type()==DocImage::Html) if (img->type()==DocImage::Html)
{ {
QCString baseName=img->name(); QString baseName=img->name();
int i; int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1) if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{ {
...@@ -573,13 +624,13 @@ void HtmlDocVisitor::visitPost(DocImage *img) ...@@ -573,13 +624,13 @@ void HtmlDocVisitor::visitPost(DocImage *img)
void HtmlDocVisitor::visitPre(DocDotFile *df) void HtmlDocVisitor::visitPre(DocDotFile *df)
{ {
QCString baseName=df->file(); QString baseName=df->file();
int i; int i;
if ((i=baseName.findRev('/'))!=-1) if ((i=baseName.findRev('/'))!=-1)
{ {
baseName=baseName.right(baseName.length()-i-1); baseName=baseName.right(baseName.length()-i-1);
} }
QCString outDir = Config_getString("HTML_OUTPUT"); QString outDir = Config_getString("HTML_OUTPUT");
writeDotGraphFromFile(df->file(),outDir,baseName,BITMAP); writeDotGraphFromFile(df->file(),outDir,baseName,BITMAP);
m_t << "<div align=\"center\">" << endl; m_t << "<div align=\"center\">" << endl;
m_t << "<img src=\"" << baseName << "." m_t << "<img src=\"" << baseName << "."
...@@ -624,8 +675,9 @@ void HtmlDocVisitor::visitPost(DocRef *) ...@@ -624,8 +675,9 @@ void HtmlDocVisitor::visitPost(DocRef *)
void HtmlDocVisitor::visitPre(DocSecRefItem *ref) void HtmlDocVisitor::visitPre(DocSecRefItem *ref)
{ {
QCString refName=ref->file(); QString refName=ref->file();
if (refName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension) if (refName.right(Doxygen::htmlFileExtension.length())!=
QString(Doxygen::htmlFileExtension))
{ {
refName+=Doxygen::htmlFileExtension; refName+=Doxygen::htmlFileExtension;
} }
...@@ -752,7 +804,7 @@ void HtmlDocVisitor::filter(const char *str) ...@@ -752,7 +804,7 @@ void HtmlDocVisitor::filter(const char *str)
} }
} }
void HtmlDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor) void HtmlDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor)
{ {
QCString *dest; QCString *dest;
if (!ref.isEmpty()) // link to entity imported via tag file if (!ref.isEmpty()) // link to entity imported via tag file
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
class QTextStream; class QTextStream;
class BaseCodeDocInterface; class BaseCodeDocInterface;
class QCString; class QString;
/*! @brief Concrete visitor implementation for HTML output. */ /*! @brief Concrete visitor implementation for HTML output. */
class HtmlDocVisitor : public DocVisitor class HtmlDocVisitor : public DocVisitor
...@@ -130,8 +130,8 @@ class HtmlDocVisitor : public DocVisitor ...@@ -130,8 +130,8 @@ class HtmlDocVisitor : public DocVisitor
//-------------------------------------- //--------------------------------------
void filter(const char *str); void filter(const char *str);
void startLink(const QCString &ref,const QCString &file, void startLink(const QString &ref,const QString &file,
const QCString &anchor); const QString &anchor);
void endLink(); void endLink();
//-------------------------------------- //--------------------------------------
......
...@@ -336,8 +336,11 @@ void HtmlGenerator::writeStyleInfo(int part) ...@@ -336,8 +336,11 @@ void HtmlGenerator::writeStyleInfo(int part)
} }
else else
{ {
// convert style sheet to string
QCString fileStr = fileToString(cssname);
// write the string into the output dir
startPlainFile(cssfi.fileName()); startPlainFile(cssfi.fileName());
t << fileToString(cssname); t << fileStr;
endPlainFile(); endPlainFile();
} }
} }
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#include "util.h" #include "util.h"
#include "message.h" #include "message.h"
static QCString escapeLabelName(const char *s) static QString escapeLabelName(const char *s)
{ {
QCString result; QString result;
const char *p=s; const char *p=s;
char c; char c;
while ((c=*p++)) while ((c=*p++))
...@@ -44,9 +44,9 @@ static QCString escapeLabelName(const char *s) ...@@ -44,9 +44,9 @@ static QCString escapeLabelName(const char *s)
return result; return result;
} }
QCString LatexDocVisitor::escapeMakeIndexChars(const char *s) QString LatexDocVisitor::escapeMakeIndexChars(const char *s)
{ {
QCString result; QString result;
const char *p=s; const char *p=s;
char str[2]; str[1]=0; char str[2]; str[1]=0;
char c; char c;
...@@ -211,7 +211,7 @@ void LatexDocVisitor::visit(DocVerbatim *s) ...@@ -211,7 +211,7 @@ void LatexDocVisitor::visit(DocVerbatim *s)
{ {
case DocVerbatim::Code: // fall though case DocVerbatim::Code: // fall though
m_t << "\n\n\\footnotesize\\begin{verbatim}"; m_t << "\n\n\\footnotesize\\begin{verbatim}";
parseCode(m_ci,s->context(),s->text(),FALSE,0); parseCode(m_ci,s->context(),s->text().latin1(),FALSE,0);
m_t << "\\end{verbatim}\\normalsize" << endl; m_t << "\\end{verbatim}\\normalsize" << endl;
break; break;
case DocVerbatim::Verbatim: case DocVerbatim::Verbatim:
...@@ -246,7 +246,7 @@ void LatexDocVisitor::visit(DocInclude *inc) ...@@ -246,7 +246,7 @@ void LatexDocVisitor::visit(DocInclude *inc)
{ {
case DocInclude::Include: case DocInclude::Include:
m_t << "\n\n\\footnotesize\\begin{verbatim}"; m_t << "\n\n\\footnotesize\\begin{verbatim}";
parseCode(m_ci,inc->context(),inc->text(),FALSE,0); parseCode(m_ci,inc->context(),inc->text().latin1(),FALSE,0);
m_t << "\\end{verbatim}\\normalsize" << endl; m_t << "\\end{verbatim}\\normalsize" << endl;
break; break;
case DocInclude::DontInclude: case DocInclude::DontInclude:
...@@ -272,7 +272,7 @@ void LatexDocVisitor::visit(DocIncOperator *op) ...@@ -272,7 +272,7 @@ void LatexDocVisitor::visit(DocIncOperator *op)
} }
if (op->type()!=DocIncOperator::Skip) if (op->type()!=DocIncOperator::Skip)
{ {
parseCode(m_ci,op->context(),op->text(),FALSE,0); parseCode(m_ci,op->context(),op->text().latin1(),FALSE,0);
} }
if (op->isLast()) if (op->isLast())
{ {
...@@ -648,7 +648,7 @@ void LatexDocVisitor::visitPre(DocImage *img) ...@@ -648,7 +648,7 @@ void LatexDocVisitor::visitPre(DocImage *img)
{ {
m_t << "\\mbox{"; m_t << "\\mbox{";
} }
QCString gfxName = img->name(); QString gfxName = img->name();
if (gfxName.right(4)==".eps" || gfxName.right(4)==".pdf") if (gfxName.right(4)==".eps" || gfxName.right(4)==".pdf")
{ {
gfxName=gfxName.left(gfxName.length()-4); gfxName=gfxName.left(gfxName.length()-4);
...@@ -693,7 +693,7 @@ void LatexDocVisitor::visitPost(DocImage *img) ...@@ -693,7 +693,7 @@ void LatexDocVisitor::visitPost(DocImage *img)
void LatexDocVisitor::visitPre(DocDotFile *df) void LatexDocVisitor::visitPre(DocDotFile *df)
{ {
QCString baseName=df->file(); QString baseName=df->file();
int i; int i;
if ((i=baseName.findRev('/'))!=-1) if ((i=baseName.findRev('/'))!=-1)
{ {
...@@ -703,7 +703,7 @@ void LatexDocVisitor::visitPre(DocDotFile *df) ...@@ -703,7 +703,7 @@ void LatexDocVisitor::visitPre(DocDotFile *df)
{ {
baseName=baseName.left(baseName.length()-4); baseName=baseName.left(baseName.length()-4);
} }
QCString outDir = Config_getString("LATEX_OUTPUT"); QString outDir = Config_getString("LATEX_OUTPUT");
writeDotGraphFromFile(df->file(),outDir,baseName,EPS); writeDotGraphFromFile(df->file(),outDir,baseName,EPS);
if (df->hasCaption()) if (df->hasCaption())
{ {
...@@ -883,7 +883,7 @@ void LatexDocVisitor::filter(const char *str) ...@@ -883,7 +883,7 @@ void LatexDocVisitor::filter(const char *str)
filterLatexString(m_t,str,FALSE,m_insidePre); filterLatexString(m_t,str,FALSE,m_insidePre);
} }
void LatexDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor) void LatexDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor)
{ {
if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS")) if (ref.isEmpty() && Config_getBool("PDF_HYPERLINKS"))
{ {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
class QTextStream; class QTextStream;
class BaseCodeDocInterface; class BaseCodeDocInterface;
class QCString; class QString;
/*! @brief Concrete visitor implementation for LaTeX output. */ /*! @brief Concrete visitor implementation for LaTeX output. */
class LatexDocVisitor : public DocVisitor class LatexDocVisitor : public DocVisitor
...@@ -130,10 +130,10 @@ class LatexDocVisitor : public DocVisitor ...@@ -130,10 +130,10 @@ class LatexDocVisitor : public DocVisitor
//-------------------------------------- //--------------------------------------
void filter(const char *str); void filter(const char *str);
void startLink(const QCString &ref,const QCString &file, void startLink(const QString &ref,const QString &file,
const QCString &anchor); const QString &anchor);
void endLink(); void endLink();
QCString escapeMakeIndexChars(const char *s); QString escapeMakeIndexChars(const char *s);
//-------------------------------------- //--------------------------------------
// state variables // state variables
......
...@@ -45,6 +45,7 @@ HEADERS = bufstr.h \ ...@@ -45,6 +45,7 @@ HEADERS = bufstr.h \
formula.h \ formula.h \
ftvhelp.h \ ftvhelp.h \
groupdef.h \ groupdef.h \
htmlattrib.h \
htmldocvisitor.h \ htmldocvisitor.h \
htmlgen.h \ htmlgen.h \
htmlhelp.h \ htmlhelp.h \
...@@ -55,6 +56,7 @@ HEADERS = bufstr.h \ ...@@ -55,6 +56,7 @@ HEADERS = bufstr.h \
latexdocvisitor.h \ latexdocvisitor.h \
latexgen.h \ latexgen.h \
logos.h \ logos.h \
mandocvisitor.h \
mangen.h \ mangen.h \
memberdef.h \ memberdef.h \
membergroup.h \ membergroup.h \
...@@ -152,6 +154,7 @@ SOURCES = ce_lex.cpp \ ...@@ -152,6 +154,7 @@ SOURCES = ce_lex.cpp \
latexdocvisitor.cpp \ latexdocvisitor.cpp \
latexgen.cpp \ latexgen.cpp \
logos.cpp \ logos.cpp \
mandocvisitor.cpp \
mangen.cpp \ mangen.cpp \
memberdef.cpp \ memberdef.cpp \
membergroup.cpp \ membergroup.cpp \
......
/******************************************************************************
*
*
*
*
* Copyright (C) 1997-2002 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#include "mandocvisitor.h"
#include "docparser.h"
#include "language.h"
#include "doxygen.h"
#include "outputgen.h"
#include "code.h"
#include "dot.h"
#include "util.h"
#include "message.h"
ManDocVisitor::ManDocVisitor(QTextStream &t,BaseCodeDocInterface &ci)
: m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE)
{
}
//--------------------------------------
// visitor functions for leaf nodes
//--------------------------------------
void ManDocVisitor::visit(DocWord *w)
{
if (m_hide) return;
filter(w->word());
}
void ManDocVisitor::visit(DocLinkedWord *w)
{
if (m_hide) return;
m_t << "\\fB";
filter(w->word());
m_t << "\\fP";
}
void ManDocVisitor::visit(DocWhiteSpace *w)
{
if (m_hide) return;
if (m_insidePre)
{
m_t << w->chars();
}
else
{
m_t << " ";
}
}
void ManDocVisitor::visit(DocSymbol *s)
{
if (m_hide) return;
switch(s->symbol())
{
case DocSymbol::BSlash: m_t << "$\\backslash$"; break;
case DocSymbol::At: m_t << "@"; break;
case DocSymbol::Less: m_t << "$<$"; break;
case DocSymbol::Greater: m_t << "$>$"; break;
case DocSymbol::Amp: m_t << "\\&"; break;
case DocSymbol::Dollar: m_t << "\\$"; break;
case DocSymbol::Hash: m_t << "\\#"; break;
case DocSymbol::Percent: m_t << "\\%"; break;
case DocSymbol::Copy: m_t << "\\copyright"; break;
case DocSymbol::Apos: m_t << "'"; break;
case DocSymbol::Quot: m_t << "''"; break;
case DocSymbol::Uml:
if (s->letter()=='i')
m_t << "\\\"{\\i}";
else
m_t << "\\\"{" << s->letter() << "}";
break;
case DocSymbol::Acute:
if (s->letter()=='i')
m_t << "\\'{\\i}";
else
m_t << "\\'{" << s->letter() << "}";
break;
case DocSymbol::Grave:
if (s->letter()=='i')
m_t << "\\`{\\i}";
else
m_t << "\\`{" << s->letter() << "}";
break;
case DocSymbol::Circ:
if (s->letter()=='i')
m_t << "\\^{\\i}";
else
m_t << "\\^{" << s->letter() << "}";
break;
case DocSymbol::Tilde: m_t << "\\~{" << s->letter() << "}"; break;
case DocSymbol::Szlig: m_t << "\"s"; break;
case DocSymbol::Cedil: m_t << "\\c{" << s->letter() << "}"; break;
case DocSymbol::Ring: m_t << "\\" << s->letter() << s->letter(); break;
case DocSymbol::Nbsp: m_t << "\\ "; break;
default:
err("Error: unknown symbol found\n");
}
}
void ManDocVisitor::visit(DocURL *u)
{
if (m_hide) return;
if (Config_getBool("PDF_HYPERLINKS"))
{
m_t << "\\href{" << u->url() << "}";
}
m_t << "{\\tt " << u->url() << "}";
}
void ManDocVisitor::visit(DocLineBreak *)
{
if (m_hide) return;
m_t << "\\par\n";
}
void ManDocVisitor::visit(DocHorRuler *)
{
if (m_hide) return;
m_t << "\n\n";
}
void ManDocVisitor::visit(DocStyleChange *s)
{
if (m_hide) return;
switch (s->style())
{
case DocStyleChange::Bold:
if (s->enable()) m_t << "{\\bf "; else m_t << "} ";
break;
case DocStyleChange::Italic:
if (s->enable()) m_t << "{\\em "; else m_t << "} ";
break;
case DocStyleChange::Code:
if (s->enable()) m_t << "{\\tt "; else m_t << "} ";
break;
case DocStyleChange::Subscript:
if (s->enable()) m_t << "$_{\\mbox{"; else m_t << "}}$ ";
break;
case DocStyleChange::Superscript:
if (s->enable()) m_t << "$^{\\mbox{"; else m_t << "}}$ ";
break;
case DocStyleChange::Center:
if (s->enable()) m_t << "\\begin{center}"; else m_t << "\\end{center} ";
break;
case DocStyleChange::Small:
if (s->enable()) m_t << "\\footnotesize "; else m_t << "\\normalsize ";
break;
}
}
void ManDocVisitor::visit(DocVerbatim *s)
{
if (m_hide) return;
switch(s->type())
{
case DocVerbatim::Code: // fall though
m_t << "\n\n\\footnotesize\\begin{verbatim}";
parseCode(m_ci,s->context(),s->text().latin1(),FALSE,0);
m_t << "\\end{verbatim}\\normalsize" << endl;
break;
case DocVerbatim::Verbatim:
m_t << "\n\n\\footnotesize\\begin{verbatim}";
m_t << s->text();
m_t << "\\end{verbatim}\\normalsize" << endl;
break;
case DocVerbatim::HtmlOnly:
/* nothing */
break;
case DocVerbatim::LatexOnly:
/* nothing */
break;
}
}
void ManDocVisitor::visit(DocAnchor *anc)
{
if (m_hide) return;
m_t << "\\label{" << anc->anchor() << "}" << endl;
if (!anc->file().isEmpty() && Config_getBool("PDF_HYPERLINKS"))
{
m_t << "\\hypertarget{" << anc->file() << "_" << anc->anchor()
<< "}{}" << endl;
}
}
void ManDocVisitor::visit(DocInclude *inc)
{
if (m_hide) return;
switch(inc->type())
{
case DocInclude::Include:
m_t << "\n\n\\footnotesize\\begin{verbatim}";
parseCode(m_ci,inc->context(),inc->text().latin1(),FALSE,0);
m_t << "\\end{verbatim}\\normalsize" << endl;
break;
case DocInclude::DontInclude:
break;
case DocInclude::HtmlInclude:
break;
case DocInclude::VerbInclude:
m_t << "\n\n\\footnotesize\\begin{verbatim}";
m_t << inc->text();
m_t << "\\end{verbatim}\\normalsize" << endl;
break;
}
}
void ManDocVisitor::visit(DocIncOperator *op)
{
//printf("DocIncOperator: type=%d first=%d, last=%d text=`%s'\n",
// op->type(),op->isFirst(),op->isLast(),op->text().data());
if (op->isFirst())
{
m_t << "\n\n\\footnotesize\\begin{verbatim}";
m_hide = TRUE;
}
if (op->type()!=DocIncOperator::Skip)
{
parseCode(m_ci,op->context(),op->text().latin1(),FALSE,0);
}
if (op->isLast())
{
m_hide = FALSE;
m_t << "\\end{verbatim}\\normalsize" << endl;
}
else
{
m_t << endl;
}
}
void ManDocVisitor::visit(DocFormula *f)
{
if (m_hide) return;
m_t << f->text();
}
void ManDocVisitor::visit(DocIndexEntry *i)
{
m_t << "\\index{" << i->entry() << "@{";
m_t << "}}";
}
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
void ManDocVisitor::visitPre(DocAutoList *l)
{
if (l->isEnumList())
{
m_t << "\\begin{enumerate}" << endl;
}
else
{
m_t << "\\begin{itemize}" << endl;
}
}
void ManDocVisitor::visitPost(DocAutoList *l)
{
if (l->isEnumList())
{
m_t << "\\end{enumerate}" << endl;
}
else
{
m_t << "\\end{itemize}" << endl;
}
}
void ManDocVisitor::visitPre(DocAutoListItem *)
{
m_t << "\\item ";
}
void ManDocVisitor::visitPost(DocAutoListItem *)
{
}
void ManDocVisitor::visitPre(DocPara *)
{
}
void ManDocVisitor::visitPost(DocPara *p)
{
if (!p->isLast() && // omit <p> for last paragraph
!(p->parent() && // and for parameter sections
p->parent()->kind()==DocNode::Kind_ParamSect
)
) m_t << endl << endl;
}
void ManDocVisitor::visitPre(DocRoot *)
{
}
void ManDocVisitor::visitPost(DocRoot *)
{
}
void ManDocVisitor::visitPre(DocSimpleSect *s)
{
m_t << "\\begin{Desc}\n\\item[";
switch(s->type())
{
case DocSimpleSect::See:
m_t << theTranslator->trSeeAlso(); break;
case DocSimpleSect::Return:
m_t << theTranslator->trReturns(); break;
case DocSimpleSect::Author:
m_t << theTranslator->trAuthor(TRUE,TRUE); break;
case DocSimpleSect::Authors:
m_t << theTranslator->trAuthor(TRUE,FALSE); break;
case DocSimpleSect::Version:
m_t << theTranslator->trVersion(); break;
case DocSimpleSect::Since:
m_t << theTranslator->trSince(); break;
case DocSimpleSect::Date:
m_t << theTranslator->trDate(); break;
case DocSimpleSect::Note:
m_t << theTranslator->trNote(); break;
case DocSimpleSect::Warning:
m_t << theTranslator->trWarning(); break;
case DocSimpleSect::Pre:
m_t << theTranslator->trPrecondition(); break;
case DocSimpleSect::Post:
m_t << theTranslator->trPostcondition(); break;
case DocSimpleSect::Invar:
m_t << theTranslator->trInvariant(); break;
case DocSimpleSect::Remark:
m_t << theTranslator->trRemarks(); break;
case DocSimpleSect::Attention:
m_t << theTranslator->trAttention(); break;
case DocSimpleSect::User: break;
case DocSimpleSect::Unknown: break;
}
// special case 1: user defined title
if (s->type()!=DocSimpleSect::User)
{
m_t << ":]";
}
}
void ManDocVisitor::visitPost(DocSimpleSect *)
{
m_t << "\\end{Desc}" << endl;
}
void ManDocVisitor::visitPre(DocTitle *)
{
}
void ManDocVisitor::visitPost(DocTitle *)
{
m_t << "]";
}
void ManDocVisitor::visitPre(DocSimpleList *)
{
m_t << "\\begin{itemize}" << endl;
}
void ManDocVisitor::visitPost(DocSimpleList *)
{
m_t << "\\end{itemize}" << endl;
}
void ManDocVisitor::visitPre(DocSimpleListItem *)
{
m_t << "\\item ";
}
void ManDocVisitor::visitPost(DocSimpleListItem *)
{
}
void ManDocVisitor::visitPre(DocSection *s)
{
if (Config_getBool("PDF_HYPERLINKS"))
{
m_t << "\\hypertarget{" << s->file() << "_" << s->anchor() << "}{}";
}
if (Config_getBool("COMPACT_LATEX"))
{
switch(s->level())
{
case 1: m_t << "\\subsubsection{"; break;
case 2: m_t << "\\paragraph{"; break;
case 3: m_t << "\\subparagraph{"; break;
case 4: m_t << "\\subparagraph{"; break;
}
}
else
{
switch(s->level())
{
case 1: m_t << "\\subsection{"; break;
case 2: m_t << "\\subsubsection{"; break;
case 3: m_t << "\\paragraph{"; break;
case 4: m_t << "\\subparagraph{"; break;
}
}
filter(s->title());
m_t << "}\\label{" << s->anchor() << "}" << endl;
}
void ManDocVisitor::visitPost(DocSection *)
{
}
void ManDocVisitor::visitPre(DocHtmlList *s)
{
if (s->type()==DocHtmlList::Ordered)
m_t << "\\begin{enumerate}" << endl;
else
m_t << "\\begin{itemize}" << endl;
}
void ManDocVisitor::visitPost(DocHtmlList *s)
{
if (s->type()==DocHtmlList::Ordered)
m_t << "\\end{enumerate}" << endl;
else
m_t << "\\end{itemize}" << endl;
}
void ManDocVisitor::visitPre(DocHtmlListItem *)
{
m_t << "\\item ";
}
void ManDocVisitor::visitPost(DocHtmlListItem *)
{
}
void ManDocVisitor::visitPre(DocHtmlPre *)
{
m_t << "\\small\\begin{alltt}";
m_insidePre=TRUE;
}
void ManDocVisitor::visitPost(DocHtmlPre *)
{
m_insidePre=FALSE;
m_t << "\\end{alltt}\\normalsize " << endl;
}
void ManDocVisitor::visitPre(DocHtmlDescList *)
{
m_t << "\\begin{description}" << endl;
}
void ManDocVisitor::visitPost(DocHtmlDescList *)
{
m_t << "\\end{description}" << endl;
}
void ManDocVisitor::visitPre(DocHtmlDescTitle *)
{
m_t << "\\item[";
}
void ManDocVisitor::visitPost(DocHtmlDescTitle *)
{
m_t << "]";
}
void ManDocVisitor::visitPre(DocHtmlDescData *)
{
}
void ManDocVisitor::visitPost(DocHtmlDescData *)
{
}
void ManDocVisitor::visitPre(DocHtmlTable *t)
{
if (t->hasCaption())
{
m_t << "\\begin{table}[h]";
}
m_t << "\\begin{TabularC}{" << t->numCols() << "}\n\\hline\n";
}
void ManDocVisitor::visitPost(DocHtmlTable *t)
{
if (t->hasCaption())
{
m_t << "\\end{table}\n";
}
else
{
m_t << "\\\\\\hline\n\\end{TabularC}\n";
}
}
void ManDocVisitor::visitPre(DocHtmlCaption *)
{
m_t << "\\\\\\hline\n\\end{TabularC}\n\\centering\n\\caption{";
}
void ManDocVisitor::visitPost(DocHtmlCaption *)
{
m_t << "}\n";
}
void ManDocVisitor::visitPre(DocHtmlRow *)
{
}
void ManDocVisitor::visitPost(DocHtmlRow *)
{
m_t << "\\\\\\hline\n";
}
void ManDocVisitor::visitPre(DocHtmlCell *)
{
}
void ManDocVisitor::visitPost(DocHtmlCell *c)
{
if (!c->isLast()) m_t << "&";
}
void ManDocVisitor::visitPre(DocInternal *)
{
m_t << "\\begin{Desc}" << endl
<< "\\item[" << theTranslator->trForInternalUseOnly() << "]" << endl;
}
void ManDocVisitor::visitPost(DocInternal *)
{
m_t << "\\end{Desc}" << endl;
}
void ManDocVisitor::visitPre(DocHRef *href)
{
if (Config_getBool("PDF_HYPERLINKS"))
{
m_t << "\\href{";
m_t << href->url();
m_t << "}";
}
m_t << "{\\tt ";
}
void ManDocVisitor::visitPost(DocHRef *)
{
m_t << "}";
}
void ManDocVisitor::visitPre(DocHtmlHeader *header)
{
if (Config_getBool("COMPACT_LATEX"))
{
switch(header->level())
{
case 1: m_t << "\\subsection*{"; break;
case 2: m_t << "\\subsubsection*{"; break;
case 3: m_t << "\\paragraph*{"; break;
}
}
else
{
switch(header->level())
{
case 1: m_t << "\\section*{"; break;
case 2: m_t << "\\subsection*{"; break;
case 3: m_t << "\\subsubsection*{"; break;
}
}
}
void ManDocVisitor::visitPost(DocHtmlHeader *)
{
m_t << "}";
}
void ManDocVisitor::visitPre(DocImage *img)
{
if (img->type()==DocImage::Latex)
{
if (img->hasCaption())
{
m_t << "\\begin{figure}[H]" << endl;
m_t << "\\begin{center}" << endl;
}
else
{
m_t << "\\mbox{";
}
QString gfxName = img->name();
if (gfxName.right(4)==".eps" || gfxName.right(4)==".pdf")
{
gfxName=gfxName.left(gfxName.length()-4);
}
m_t << "\\includegraphics";
if (!img->width().isEmpty())
{
m_t << "[width=" << img->width() << "]";
}
else if (!img->height().isEmpty())
{
m_t << "[height=" << img->height() << "]";
}
m_t << "{" << gfxName << "}";
if (img->hasCaption())
{
m_t << "\\caption{";
}
}
else // other format -> skip
{
m_hide=TRUE;
}
}
void ManDocVisitor::visitPost(DocImage *img)
{
if (img->type()==DocImage::Latex)
{
m_t << "}" << endl; // end mbox or caption
if (img->hasCaption())
{
m_t << "\\end{center}" << endl;
m_t << "\\end{figure}" << endl;
}
}
else // other format
{
m_hide=FALSE;
}
}
void ManDocVisitor::visitPre(DocDotFile *df)
{
QString baseName=df->file();
int i;
if ((i=baseName.findRev('/'))!=-1)
{
baseName=baseName.right(baseName.length()-i-1);
}
if (baseName.right(4)==".eps" || baseName.right(4)==".pdf")
{
baseName=baseName.left(baseName.length()-4);
}
QString outDir = Config_getString("LATEX_OUTPUT");
writeDotGraphFromFile(df->file(),outDir,baseName,EPS);
if (df->hasCaption())
{
m_t << "\\begin{figure}[H]" << endl;
m_t << "\\begin{center}" << endl;
}
else
{
m_t << "\\mbox{";
}
m_t << "\\includegraphics";
if (!df->width().isEmpty())
{
m_t << "[width=" << df->width() << "]";
}
else if (!df->height().isEmpty())
{
m_t << "[height=" << df->height() << "]";
}
m_t << "{" << baseName << "}";
if (df->hasCaption())
{
m_t << "\\caption{";
}
}
void ManDocVisitor::visitPost(DocDotFile *df)
{
m_t << "}" << endl; // end mbox or caption
if (df->hasCaption())
{
m_t << "\\end{center}" << endl;
m_t << "\\end{figure}" << endl;
}
}
void ManDocVisitor::visitPre(DocLink *)
{
m_t << "\\fB ";
}
void ManDocVisitor::visitPost(DocLink *)
{
m_t << "\\fP ";
}
void ManDocVisitor::visitPre(DocRef *ref)
{
m_t << "\\fB ";
if (!ref->hasLinkText()) filter(ref->targetTitle());
}
void ManDocVisitor::visitPost(DocRef *)
{
m_t << "\\fP ";
}
void ManDocVisitor::visitPre(DocSecRefItem *)
{
m_t << "\\item \\contentsline{section}{";
}
void ManDocVisitor::visitPost(DocSecRefItem *ref)
{
m_t << "}{\\ref{" << ref->anchor() << "}}{}" << endl;
}
void ManDocVisitor::visitPre(DocSecRefList *)
{
m_t << "\\footnotesize" << endl;
m_t << "\\begin{multicols}{2}" << endl;
m_t << "\\begin{CompactList}" << endl;
}
void ManDocVisitor::visitPost(DocSecRefList *)
{
m_t << "\\end{CompactList}" << endl;
m_t << "\\end{multicols}" << endl;
m_t << "\\normalsize" << endl;
}
void ManDocVisitor::visitPre(DocLanguage *)
{
}
void ManDocVisitor::visitPost(DocLanguage *)
{
}
void ManDocVisitor::visitPre(DocParamSect *s)
{
m_t << "\\begin{Desc}" << endl;
m_t << "\\item[";
switch(s->type())
{
case DocParamSect::Param:
m_t << theTranslator->trParameters(); break;
case DocParamSect::RetVal:
m_t << theTranslator->trReturnValues(); break;
case DocParamSect::Exception:
m_t << theTranslator->trExceptions(); break;
default:
ASSERT(0);
}
m_t << ":]" << endl;
m_t << "\\begin{description}" << endl;
}
void ManDocVisitor::visitPost(DocParamSect *)
{
m_t << "\\end{description}" << endl;
m_t << "\\end{Desc}" << endl;
}
void ManDocVisitor::visitPre(DocParamList *pl)
{
m_t << "\\item[{\\em ";
QStrListIterator li(pl->parameters());
const char *s;
bool first=TRUE;
for (li.toFirst();(s=li.current());++li)
{
if (!first) m_t << ","; else first=FALSE;
m_t << s;
}
m_t << "}]";
}
void ManDocVisitor::visitPost(DocParamList *)
{
}
void ManDocVisitor::visitPre(DocXRefItem *x)
{
m_t << "\\begin{Desc}" << endl;
m_t << "\\item[";
if (Config_getBool("PDF_HYPERLINKS"))
{
m_t << "\\hyperlink{" << x->file() << "_" << x->anchor() << "}{";
}
else
{
m_t << "{\\bf ";
}
filter(x->title());
m_t << "}]";
}
void ManDocVisitor::visitPost(DocXRefItem *)
{
m_t << "\\end{Desc}" << endl;
}
void ManDocVisitor::visitPre(DocInternalRef *)
{
m_t << "\\fB ";
}
void ManDocVisitor::visitPost(DocInternalRef *)
{
m_t << "\\fP ";
}
void ManDocVisitor::visitPre(DocCopy *)
{
}
void ManDocVisitor::visitPost(DocCopy *)
{
}
void ManDocVisitor::filter(const char *str)
{
if (str)
{
const char *p=str;
char c=0;
while ((c=*p++))
{
switch(c)
{
case '\\': m_t << "\\\\"; break;
case '"': c = '\''; // fall through
default: m_t << c; break;
}
}
}
}
/******************************************************************************
*
*
*
*
* Copyright (C) 1997-2002 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#ifndef _MANDOCVISITOR_H
#define _MANDOCVISITOR_H
#include "docvisitor.h"
class QTextStream;
class BaseCodeDocInterface;
class QString;
/*! @brief Concrete visitor implementation for LaTeX output. */
class ManDocVisitor : public DocVisitor
{
public:
ManDocVisitor(QTextStream &t,BaseCodeDocInterface &ci);
//--------------------------------------
// visitor functions for leaf nodes
//--------------------------------------
void visit(DocWord *);
void visit(DocLinkedWord *);
void visit(DocWhiteSpace *);
void visit(DocSymbol *);
void visit(DocURL *);
void visit(DocLineBreak *);
void visit(DocHorRuler *);
void visit(DocStyleChange *);
void visit(DocVerbatim *);
void visit(DocAnchor *);
void visit(DocInclude *);
void visit(DocIncOperator *);
void visit(DocFormula *);
void visit(DocIndexEntry *);
//--------------------------------------
// visitor functions for compound nodes
//--------------------------------------
void visitPre(DocAutoList *);
void visitPost(DocAutoList *);
void visitPre(DocAutoListItem *);
void visitPost(DocAutoListItem *);
void visitPre(DocPara *);
void visitPost(DocPara *);
void visitPre(DocRoot *);
void visitPost(DocRoot *);
void visitPre(DocSimpleSect *);
void visitPost(DocSimpleSect *);
void visitPre(DocTitle *);
void visitPost(DocTitle *);
void visitPre(DocSimpleList *);
void visitPost(DocSimpleList *);
void visitPre(DocSimpleListItem *);
void visitPost(DocSimpleListItem *);
void visitPre(DocSection *s);
void visitPost(DocSection *);
void visitPre(DocHtmlList *s);
void visitPost(DocHtmlList *s);
void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *);
void visitPre(DocHtmlPre *);
void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *);
void visitPost(DocHtmlDescTitle *);
void visitPre(DocHtmlDescData *);
void visitPost(DocHtmlDescData *);
void visitPre(DocHtmlTable *t);
void visitPost(DocHtmlTable *t);
void visitPre(DocHtmlCaption *);
void visitPost(DocHtmlCaption *);
void visitPre(DocHtmlRow *);
void visitPost(DocHtmlRow *) ;
void visitPre(DocHtmlCell *);
void visitPost(DocHtmlCell *);
void visitPre(DocInternal *);
void visitPost(DocInternal *);
void visitPre(DocHRef *);
void visitPost(DocHRef *);
void visitPre(DocHtmlHeader *);
void visitPost(DocHtmlHeader *) ;
void visitPre(DocImage *);
void visitPost(DocImage *);
void visitPre(DocDotFile *);
void visitPost(DocDotFile *);
void visitPre(DocLink *lnk);
void visitPost(DocLink *);
void visitPre(DocRef *ref);
void visitPost(DocRef *);
void visitPre(DocSecRefItem *);
void visitPost(DocSecRefItem *);
void visitPre(DocSecRefList *);
void visitPost(DocSecRefList *);
void visitPre(DocLanguage *);
void visitPost(DocLanguage *);
void visitPre(DocParamSect *);
void visitPost(DocParamSect *);
void visitPre(DocParamList *);
void visitPost(DocParamList *);
void visitPre(DocXRefItem *);
void visitPost(DocXRefItem *);
void visitPre(DocInternalRef *);
void visitPost(DocInternalRef *);
void visitPre(DocCopy *);
void visitPost(DocCopy *);
private:
//--------------------------------------
// helper functions
//--------------------------------------
void filter(const char *str);
//--------------------------------------
// state variables
//--------------------------------------
QTextStream &m_t;
BaseCodeDocInterface &m_ci;
bool m_insidePre;
bool m_hide;
};
#endif
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "doxygen.h" #include "doxygen.h"
#include <string.h> #include <string.h>
#include "docparser.h" #include "docparser.h"
#include "mandocvisitor.h"
static QCString getExtension() static QCString getExtension()
{ {
...@@ -613,7 +614,10 @@ void ManGenerator::endParamList() ...@@ -613,7 +614,10 @@ void ManGenerator::endParamList()
{ {
} }
void ManGenerator::printDoc(DocNode *) void ManGenerator::printDoc(DocNode *n)
{ {
ManDocVisitor *visitor = new ManDocVisitor(t,*this);
n->accept(visitor);
delete visitor;
} }
...@@ -554,8 +554,8 @@ bool MemberDef::isBriefSectionVisible() const ...@@ -554,8 +554,8 @@ bool MemberDef::isBriefSectionVisible() const
{ {
//printf("Member %s grpId=%d docs=%s file=%s args=%s\n", //printf("Member %s grpId=%d docs=%s file=%s args=%s\n",
// name().data(), // name().data(),
// grpId,grpId==-1?"<none>":Doxygen::memberDocDict[grpId]->data(), // 0,"", //grpId,grpId==-1?"<none>":Doxygen::memberDocDict[grpId]->data(),
// getFileDef()->name().data(), // "", //getFileDef()->name().data(),
// argsString()); // argsString());
bool hasDocs = hasDocumentation() || bool hasDocs = hasDocumentation() ||
// part of a documented member group // part of a documented member group
...@@ -600,8 +600,10 @@ bool MemberDef::isBriefSectionVisible() const ...@@ -600,8 +600,10 @@ bool MemberDef::isBriefSectionVisible() const
); );
// hide member if it overrides a member in a superclass and has no // hide member if it overrides a member in a superclass and has no
// documentation // documentation of its own
bool visibleIfDocVirtual = (reimplements() || hasDocs); //bool visibleIfDocVirtual = !reimplements() ||
// !Config_getBool("INHERIT_DOCS") ||
// hasDocs;
// true if this member is a constructor or destructor // true if this member is a constructor or destructor
bool cOrDTor = isConstructor() || isDestructor(); bool cOrDTor = isConstructor() || isDestructor();
...@@ -624,7 +626,7 @@ bool MemberDef::isBriefSectionVisible() const ...@@ -624,7 +626,7 @@ bool MemberDef::isBriefSectionVisible() const
bool visible = visibleIfStatic && visibleIfDocumented && bool visible = visibleIfStatic && visibleIfDocumented &&
visibleIfEnabled && visibleIfPrivate && visibleIfEnabled && visibleIfPrivate &&
visibleIfDocVirtual && visibleIfNotDefaultCDTor && /*visibleIfDocVirtual &&*/ visibleIfNotDefaultCDTor &&
visibleIfFriendCompound && visibleIfFriendCompound &&
!annScope; !annScope;
//printf("MemberDef::isBriefSectionVisible() %d\n",visible); //printf("MemberDef::isBriefSectionVisible() %d\n",visible);
...@@ -1539,6 +1541,10 @@ void MemberDef::warnIfUndocumented() ...@@ -1539,6 +1541,10 @@ void MemberDef::warnIfUndocumented()
else else
t="file", d=fd; t="file", d=fd;
//printf("warnIfUndoc: d->isLinkable()=%d isLinkable()=%d "
// "isDocumentedFriendClass()=%d name()=%s prot=%d\n",
// d->isLinkable(),isLinkable(),isDocumentedFriendClass(),
// name().data(),prot);
if (d && d->isLinkable() && !isLinkable() && if (d && d->isLinkable() && !isLinkable() &&
!isDocumentedFriendClass() && !isDocumentedFriendClass() &&
name().find('@')==-1 && name().find('@')==-1 &&
......
...@@ -248,6 +248,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol) ...@@ -248,6 +248,7 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
if (Config_getBool("DETAILS_AT_TOP")) if (Config_getBool("DETAILS_AT_TOP"))
{ {
writeDetailedDocumentation(ol); writeDetailedDocumentation(ol);
ol.newParagraph();
} }
else if (!briefDescription().isEmpty()) else if (!briefDescription().isEmpty())
{ {
......
...@@ -32,9 +32,9 @@ RTFDocVisitor::RTFDocVisitor(QTextStream &t,BaseCodeDocInterface &ci) ...@@ -32,9 +32,9 @@ RTFDocVisitor::RTFDocVisitor(QTextStream &t,BaseCodeDocInterface &ci)
{ {
} }
QCString RTFDocVisitor::getStyle(const char *name) QString RTFDocVisitor::getStyle(const char *name)
{ {
QCString n; QString n;
n.sprintf("%s%d",name,m_indentLevel); n.sprintf("%s%d",name,m_indentLevel);
StyleData *sd = rtf_Style[n]; StyleData *sd = rtf_Style[n];
ASSERT(sd!=0); ASSERT(sd!=0);
...@@ -271,7 +271,7 @@ void RTFDocVisitor::visit(DocVerbatim *s) ...@@ -271,7 +271,7 @@ void RTFDocVisitor::visit(DocVerbatim *s)
m_t << "{" << endl; m_t << "{" << endl;
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample"); m_t << rtf_Style_Reset << getStyle("CodeExample");
parseCode(m_ci,s->context(),s->text(),FALSE,0); parseCode(m_ci,s->context(),s->text().latin1(),FALSE,0);
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << "}" << endl; m_t << "}" << endl;
break; break;
...@@ -295,7 +295,7 @@ void RTFDocVisitor::visit(DocVerbatim *s) ...@@ -295,7 +295,7 @@ void RTFDocVisitor::visit(DocVerbatim *s)
void RTFDocVisitor::visit(DocAnchor *anc) void RTFDocVisitor::visit(DocAnchor *anc)
{ {
if (m_hide) return; if (m_hide) return;
QCString anchor; QString anchor;
if (!anc->file().isEmpty()) if (!anc->file().isEmpty())
{ {
anchor+=anc->file(); anchor+=anc->file();
...@@ -321,7 +321,7 @@ void RTFDocVisitor::visit(DocInclude *inc) ...@@ -321,7 +321,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
m_t << "{" << endl; m_t << "{" << endl;
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample"); m_t << rtf_Style_Reset << getStyle("CodeExample");
parseCode(m_ci,inc->context(),inc->text(),FALSE,0); parseCode(m_ci,inc->context(),inc->text().latin1(),FALSE,0);
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << "}" << endl; m_t << "}" << endl;
break; break;
...@@ -353,7 +353,7 @@ void RTFDocVisitor::visit(DocIncOperator *op) ...@@ -353,7 +353,7 @@ void RTFDocVisitor::visit(DocIncOperator *op)
} }
if (op->type()!=DocIncOperator::Skip) if (op->type()!=DocIncOperator::Skip)
{ {
parseCode(m_ci,op->context(),op->text(),FALSE,0); parseCode(m_ci,op->context(),op->text().latin1(),FALSE,0);
} }
if (op->isLast()) if (op->isLast())
{ {
...@@ -534,7 +534,7 @@ void RTFDocVisitor::visitPre(DocSection *s) ...@@ -534,7 +534,7 @@ void RTFDocVisitor::visitPre(DocSection *s)
{ {
m_t << "{" // start section m_t << "{" // start section
<< rtf_Style_Reset; << rtf_Style_Reset;
QCString heading; QString heading;
int level = QMIN(s->level()+2,4); int level = QMIN(s->level()+2,4);
heading.sprintf("Heading%d",level); heading.sprintf("Heading%d",level);
// set style // set style
...@@ -750,7 +750,7 @@ void RTFDocVisitor::visitPre(DocHtmlHeader *header) ...@@ -750,7 +750,7 @@ void RTFDocVisitor::visitPre(DocHtmlHeader *header)
{ {
m_t << "{" // start section m_t << "{" // start section
<< rtf_Style_Reset; << rtf_Style_Reset;
QCString heading; QString heading;
int level = QMIN(header->level()+2,4); int level = QMIN(header->level()+2,4);
heading.sprintf("Heading%d",level); heading.sprintf("Heading%d",level);
// set style // set style
...@@ -793,13 +793,13 @@ void RTFDocVisitor::visitPost(DocImage *) ...@@ -793,13 +793,13 @@ void RTFDocVisitor::visitPost(DocImage *)
void RTFDocVisitor::visitPre(DocDotFile *df) void RTFDocVisitor::visitPre(DocDotFile *df)
{ {
QCString baseName=df->file(); QString baseName=df->file();
int i; int i;
if ((i=baseName.findRev('/'))!=-1) if ((i=baseName.findRev('/'))!=-1)
{ {
baseName=baseName.right(baseName.length()-i-1); baseName=baseName.right(baseName.length()-i-1);
} }
QCString outDir = Config_getString("RTF_OUTPUT"); QString outDir = Config_getString("RTF_OUTPUT");
writeDotGraphFromFile(df->file(),outDir,baseName,BITMAP); writeDotGraphFromFile(df->file(),outDir,baseName,BITMAP);
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << "{" << endl; m_t << "{" << endl;
...@@ -927,7 +927,7 @@ void RTFDocVisitor::visitPre(DocXRefItem *x) ...@@ -927,7 +927,7 @@ void RTFDocVisitor::visitPre(DocXRefItem *x)
m_t << "\\par" << endl; m_t << "\\par" << endl;
if (Config_getBool("RTF_HYPERLINKS")) if (Config_getBool("RTF_HYPERLINKS"))
{ {
QCString refName; QString refName;
if (!x->file().isEmpty()) if (!x->file().isEmpty())
{ {
refName+=x->file(); refName+=x->file();
...@@ -1033,11 +1033,11 @@ void RTFDocVisitor::filter(const char *str) ...@@ -1033,11 +1033,11 @@ void RTFDocVisitor::filter(const char *str)
} }
} }
void RTFDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor) void RTFDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor)
{ {
if (ref.isEmpty() && Config_getBool("RTF_HYPERLINKS")) if (ref.isEmpty() && Config_getBool("RTF_HYPERLINKS"))
{ {
QCString refName; QString refName;
if (!file.isEmpty()) if (!file.isEmpty())
{ {
refName+=file; refName+=file;
...@@ -1059,7 +1059,7 @@ void RTFDocVisitor::startLink(const QCString &ref,const QCString &file,const QCS ...@@ -1059,7 +1059,7 @@ void RTFDocVisitor::startLink(const QCString &ref,const QCString &file,const QCS
} }
} }
void RTFDocVisitor::endLink(const QCString &ref) void RTFDocVisitor::endLink(const QString &ref)
{ {
if (ref.isEmpty() && Config_getBool("RTF_HYPERLINKS")) if (ref.isEmpty() && Config_getBool("RTF_HYPERLINKS"))
{ {
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
class QTextStream; class QTextStream;
class BaseCodeDocInterface; class BaseCodeDocInterface;
class QCString; class QString;
/*! @brief Concrete visitor implementation for RTF output. */ /*! @brief Concrete visitor implementation for RTF output. */
class RTFDocVisitor : public DocVisitor class RTFDocVisitor : public DocVisitor
...@@ -130,10 +130,10 @@ class RTFDocVisitor : public DocVisitor ...@@ -130,10 +130,10 @@ class RTFDocVisitor : public DocVisitor
//-------------------------------------- //--------------------------------------
void filter(const char *str); void filter(const char *str);
void startLink(const QCString &ref,const QCString &file, void startLink(const QString &ref,const QString &file,
const QCString &anchor); const QString &anchor);
void endLink(const QCString &ref); void endLink(const QString &ref);
QCString getStyle(const char *name); QString getStyle(const char *name);
void incIndentLevel(); void incIndentLevel();
void decIndentLevel(); void decIndentLevel();
......
...@@ -3925,33 +3925,33 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3925,33 +3925,33 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
yyLineNr++; yyLineNr++;
} }
<SkipSection>"//"|"*/" <SkipSection>"//"|"*/"
<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"elseif"/[^a-z_A-Z0-9] { <ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"elseif"/[^a-z_A-Z0-9] {
// previous section enabled => skip now // previous section enabled => skip now
depthIf=1; depthIf=1;
BEGIN(SkipSection); BEGIN(SkipSection);
} }
<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"else"/[^a-z_A-Z0-9] { <ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"else"/[^a-z_A-Z0-9] {
// section was enabled => skip now // section was enabled => skip now
depthIf=1; depthIf=1;
BEGIN(SkipSection); BEGIN(SkipSection);
} }
<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"endif"/[^a-z_A-Z0-9] { <ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc,PageDoc,ExampleDoc>{CMD}"endif"/[^a-z_A-Z0-9] {
// section enabled => absorb endif // section enabled => absorb endif
} }
<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"ingroup"{B}+ { <ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"ingroup"{B}+ {
lastGroupContext = YY_START; lastGroupContext = YY_START;
lineCount(); lineCount();
BEGIN( GroupName ); BEGIN( GroupName );
} }
<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"nosubgrouping"/[^a-z_A-Z0-9] { <ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"nosubgrouping"/[^a-z_A-Z0-9] {
current->subGrouping = FALSE; current->subGrouping = FALSE;
} }
<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"showinitializer"/[^a-z_A-Z0-9] { <ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"showinitializer"/[^a-z_A-Z0-9] {
current->initLines = 100000; // ON current->initLines = 100000; // ON
} }
<ClassDoc,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"hideinitializer"/[^a-z_A-Z0-9] { <ClassDoc,ClassDocBrief,LineDoc,AfterDocLine,AfterDocBrief,Doc,JavaDoc,AfterDoc>{CMD}"hideinitializer"/[^a-z_A-Z0-9] {
current->initLines = 0; // OFF current->initLines = 0; // OFF
} }
<GroupName>{ID} { <GroupName>{ID} {
...@@ -3992,7 +3992,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3992,7 +3992,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
} }
else else
{ {
yyLineNr++; if (yytext[yyleng-1]=='\n') yyLineNr++;
} }
BEGIN( lastBriefContext ); BEGIN( lastBriefContext );
} }
...@@ -4295,7 +4295,18 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -4295,7 +4295,18 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text <Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text
current->doc+=yytext; current->doc+=yytext;
} }
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,CopyArgComment,SkipSection>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { <SkipSection>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
QCString *pValue=Doxygen::aliasDict[yytext+1];
if (pValue)
{
int i,l=pValue->length();
for (i=l-1;i>=0;i--)
{
unput(pValue->at(i));
}
}
}
<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,CopyArgComment>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
bool handled=FALSE; bool handled=FALSE;
if ( useOverrideCommands) if ( useOverrideCommands)
{ {
...@@ -4338,9 +4349,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -4338,9 +4349,12 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
if (pValue) if (pValue)
{ {
int i,l=pValue->length(); int i,l=pValue->length();
char c;
for (i=l-1;i>=0;i--) for (i=l-1;i>=0;i--)
{ {
unput(pValue->at(i)); c=pValue->at(i);
unput(c);
if (c=='\n') yyLineNr--;
} }
} }
else else
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
* -------------+------------------------------------------------------------ * -------------+------------------------------------------------------------
* 2002-07-11 | Update for new since 1.2.16 * 2002-07-11 | Update for new since 1.2.16
* -------------+------------------------------------------------------------ * -------------+------------------------------------------------------------
* 2002-09-24 | Update for new since 1.2.17
* -------------+------------------------------------------------------------
*/ */
#ifndef TRANSLATOR_FR_H #ifndef TRANSLATOR_FR_H
#define TRANSLATOR_FR_H #define TRANSLATOR_FR_H
...@@ -1268,6 +1270,17 @@ class TranslatorFrench : public TranslatorAdapter_1_2_17 ...@@ -1268,6 +1270,17 @@ class TranslatorFrench : public TranslatorAdapter_1_2_17
return "Table des matières"; return "Table des matières";
} }
//////////////////////////////////////////////////////////////////////////
// new since 1.2.17
//////////////////////////////////////////////////////////////////////////
/*! Used as the header of the list of item that have been
* flagged deprecated
*/
virtual QCString trDeprecatedList()
{
return "Liste obsolète";
}
}; };
......
...@@ -2569,9 +2569,11 @@ bool generateLink(OutputDocInterface &od,const char *clName, ...@@ -2569,9 +2569,11 @@ bool generateLink(OutputDocInterface &od,const char *clName,
} }
else if (compound) // link to compound else if (compound) // link to compound
{ {
if (lt==0 && compound->definitionType()==Definition::TypeGroup) if (lt==0 && anchor.isEmpty() && /* compound link */
compound->definitionType()==Definition::TypeGroup /* is group */
)
{ {
linkText=((GroupDef *)compound)->groupTitle(); linkText=((GroupDef *)compound)->groupTitle(); // use group's title as link
} }
od.writeObjectLink(compound->getReference(), od.writeObjectLink(compound->getReference(),
compound->getOutputFileBase(),anchor,linkText); compound->getOutputFileBase(),anchor,linkText);
......
...@@ -148,7 +148,7 @@ void XmlDocVisitor::visit(DocVerbatim *s) ...@@ -148,7 +148,7 @@ void XmlDocVisitor::visit(DocVerbatim *s)
{ {
case DocVerbatim::Code: // fall though case DocVerbatim::Code: // fall though
m_t << "<programlisting>"; m_t << "<programlisting>";
parseCode(m_ci,s->context(),s->text(),FALSE,0); parseCode(m_ci,s->context(),s->text().latin1(),FALSE,0);
m_t << "</programlisting>"; m_t << "</programlisting>";
break; break;
case DocVerbatim::Verbatim: case DocVerbatim::Verbatim:
...@@ -182,7 +182,7 @@ void XmlDocVisitor::visit(DocInclude *inc) ...@@ -182,7 +182,7 @@ void XmlDocVisitor::visit(DocInclude *inc)
{ {
case DocInclude::Include: case DocInclude::Include:
m_t << "<programlisting>"; m_t << "<programlisting>";
parseCode(m_ci,inc->context(),inc->text(),FALSE,0); parseCode(m_ci,inc->context(),inc->text().latin1(),FALSE,0);
m_t << "</programlisting>"; m_t << "</programlisting>";
break; break;
case DocInclude::DontInclude: case DocInclude::DontInclude:
...@@ -211,7 +211,7 @@ void XmlDocVisitor::visit(DocIncOperator *op) ...@@ -211,7 +211,7 @@ void XmlDocVisitor::visit(DocIncOperator *op)
} }
if (op->type()!=DocIncOperator::Skip) if (op->type()!=DocIncOperator::Skip)
{ {
parseCode(m_ci,op->context(),op->text(),FALSE,0); parseCode(m_ci,op->context(),op->text().latin1(),FALSE,0);
} }
if (op->isLast()) if (op->isLast())
{ {
...@@ -536,7 +536,7 @@ void XmlDocVisitor::visitPre(DocImage *img) ...@@ -536,7 +536,7 @@ void XmlDocVisitor::visitPre(DocImage *img)
} }
m_t << "\""; m_t << "\"";
QCString baseName=img->name(); QString baseName=img->name();
int i; int i;
if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1) if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
{ {
...@@ -719,7 +719,7 @@ void XmlDocVisitor::filter(const char *str) ...@@ -719,7 +719,7 @@ void XmlDocVisitor::filter(const char *str)
} }
} }
void XmlDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor) void XmlDocVisitor::startLink(const QString &ref,const QString &file,const QString &anchor)
{ {
m_t << "<ref refid=\"" << file; m_t << "<ref refid=\"" << file;
if (!anchor.isEmpty()) m_t << "_1" << anchor; if (!anchor.isEmpty()) m_t << "_1" << anchor;
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
class QTextStream; class QTextStream;
class BaseCodeDocInterface; class BaseCodeDocInterface;
class QCString; class QString;
/*! @brief Concrete visitor implementation for HTML output. */ /*! @brief Concrete visitor implementation for XML output. */
class XmlDocVisitor : public DocVisitor class XmlDocVisitor : public DocVisitor
{ {
public: public:
...@@ -130,8 +130,8 @@ class XmlDocVisitor : public DocVisitor ...@@ -130,8 +130,8 @@ class XmlDocVisitor : public DocVisitor
//-------------------------------------- //--------------------------------------
void filter(const char *str); void filter(const char *str);
void startLink(const QCString &ref,const QCString &file, void startLink(const QString &ref,const QString &file,
const QCString &anchor); const QString &anchor);
void endLink(); void endLink();
//-------------------------------------- //--------------------------------------
......
...@@ -1199,7 +1199,7 @@ static void writeXMLDocBlock(QTextStream &t, ...@@ -1199,7 +1199,7 @@ static void writeXMLDocBlock(QTextStream &t,
const QCString &text) const QCString &text)
{ {
QCString stext = text.stripWhiteSpace(); QCString stext = text.stripWhiteSpace();
if (text.isEmpty()) return; if (stext.isEmpty()) return;
// convert the documentation string into an abstract syntax tree // convert the documentation string into an abstract syntax tree
DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,stext); DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,stext);
// create a code generator // create a code generator
...@@ -1489,20 +1489,20 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De ...@@ -1489,20 +1489,20 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
t << "</initializer>" << endl; t << "</initializer>" << endl;
} }
t << " <briefdescription>" << endl; t << " <briefdescription>" << endl;
writeXMLDocBlock(t,emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->briefDescription()); writeXMLDocBlock(t,emd->briefFile(),emd->briefLine(),scopeName,emd,emd->briefDescription());
t << " </briefdescription>" << endl; t << " </briefdescription>" << endl;
t << " <detaileddescription>" << endl; t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,emd->getDefFileName(),emd->getDefLine(),scopeName,emd,emd->documentation()); writeXMLDocBlock(t,emd->docFile(),emd->docLine(),scopeName,emd,emd->documentation());
t << " </detaileddescription>" << endl; t << " </detaileddescription>" << endl;
t << " </enumvalue>" << endl; t << " </enumvalue>" << endl;
} }
} }
} }
t << " <briefdescription>" << endl; t << " <briefdescription>" << endl;
writeXMLDocBlock(t,md->getDefFileName(),md->getDefLine(),scopeName,md,md->briefDescription()); writeXMLDocBlock(t,md->briefFile(),md->briefLine(),scopeName,md,md->briefDescription());
t << " </briefdescription>" << endl; t << " </briefdescription>" << endl;
t << " <detaileddescription>" << endl; t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,md->getDefFileName(),md->getDefLine(),scopeName,md,md->documentation()); writeXMLDocBlock(t,md->docFile(),md->docLine(),scopeName,md,md->documentation());
t << " </detaileddescription>" << endl; t << " </detaileddescription>" << endl;
if (md->getDefLine()!=-1) if (md->getDefLine()!=-1)
{ {
...@@ -1763,10 +1763,10 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti) ...@@ -1763,10 +1763,10 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
generateXMLSection(cd,ti,t,&cd->related,"related"); generateXMLSection(cd,ti,t,&cd->related,"related");
t << " <briefdescription>" << endl; t << " <briefdescription>" << endl;
writeXMLDocBlock(t,cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->briefDescription()); writeXMLDocBlock(t,cd->briefFile(),cd->briefLine(),cd->name(),0,cd->briefDescription());
t << " </briefdescription>" << endl; t << " </briefdescription>" << endl;
t << " <detaileddescription>" << endl; t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,cd->getDefFileName(),cd->getDefLine(),cd->name(),0,cd->documentation()); writeXMLDocBlock(t,cd->docFile(),cd->docLine(),cd->name(),0,cd->documentation());
t << " </detaileddescription>" << endl; t << " </detaileddescription>" << endl;
DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance); DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
if (!inheritanceGraph.isTrivial()) if (!inheritanceGraph.isTrivial())
...@@ -1868,10 +1868,10 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti) ...@@ -1868,10 +1868,10 @@ static void generateXMLForNamespace(NamespaceDef *nd,QTextStream &ti)
generateXMLSection(nd,ti,t,&nd->decVarMembers,"var"); generateXMLSection(nd,ti,t,&nd->decVarMembers,"var");
t << " <briefdescription>" << endl; t << " <briefdescription>" << endl;
writeXMLDocBlock(t,nd->getDefFileName(),nd->getDefLine(),0,0,nd->briefDescription()); writeXMLDocBlock(t,nd->briefFile(),nd->briefLine(),0,0,nd->briefDescription());
t << " </briefdescription>" << endl; t << " </briefdescription>" << endl;
t << " <detaileddescription>" << endl; t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,nd->getDefFileName(),nd->getDefLine(),0,0,nd->documentation()); writeXMLDocBlock(t,nd->docFile(),nd->docLine(),0,0,nd->documentation());
t << " </detaileddescription>" << endl; t << " </detaileddescription>" << endl;
t << " <location file=\"" t << " <location file=\""
<< nd->getDefFileName() << "\" line=\"" << nd->getDefFileName() << "\" line=\""
...@@ -2002,10 +2002,10 @@ static void generateXMLForFile(FileDef *fd,QTextStream &ti) ...@@ -2002,10 +2002,10 @@ static void generateXMLForFile(FileDef *fd,QTextStream &ti)
generateXMLSection(fd,ti,t,&fd->decVarMembers,"var"); generateXMLSection(fd,ti,t,&fd->decVarMembers,"var");
t << " <briefdescription>" << endl; t << " <briefdescription>" << endl;
writeXMLDocBlock(t,fd->getDefFileName(),fd->getDefLine(),0,0,fd->briefDescription()); writeXMLDocBlock(t,fd->briefFile(),fd->briefLine(),0,0,fd->briefDescription());
t << " </briefdescription>" << endl; t << " </briefdescription>" << endl;
t << " <detaileddescription>" << endl; t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,fd->getDefFileName(),fd->getDefLine(),0,0,fd->documentation()); writeXMLDocBlock(t,fd->docFile(),fd->docLine(),0,0,fd->documentation());
t << " </detaileddescription>" << endl; t << " </detaileddescription>" << endl;
t << " <programlisting>" << endl; t << " <programlisting>" << endl;
writeXMLCodeBlock(t,fd); writeXMLCodeBlock(t,fd);
...@@ -2125,10 +2125,10 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti) ...@@ -2125,10 +2125,10 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
generateXMLSection(gd,ti,t,&gd->decVarMembers,"var"); generateXMLSection(gd,ti,t,&gd->decVarMembers,"var");
t << " <briefdescription>" << endl; t << " <briefdescription>" << endl;
writeXMLDocBlock(t,gd->getDefFileName(),gd->getDefLine(),0,0,gd->briefDescription()); writeXMLDocBlock(t,gd->briefFile(),gd->briefLine(),0,0,gd->briefDescription());
t << " </briefdescription>" << endl; t << " </briefdescription>" << endl;
t << " <detaileddescription>" << endl; t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,gd->getDefFileName(),gd->getDefLine(),0,0,gd->documentation()); writeXMLDocBlock(t,gd->docFile(),gd->docLine(),0,0,gd->documentation());
t << " </detaileddescription>" << endl; t << " </detaileddescription>" << endl;
t << " </compounddef>" << endl; t << " </compounddef>" << endl;
t << "</doxygen>" << endl; t << "</doxygen>" << endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment